Agisoft Metashape Professional supports the processing of multispectral images captured with DJI P4 Multispectral drone. *The parameters shown in the images in the article are recommended for this type of data.
This tutorial covers the main processing stages related to the DJI multispectral data processing. We are grateful to Gembloux Agro-Bio Tech (University of Liège) for the provided dataset.
This article describes the following processing steps:
- Add photos
- Calibrate Reflectance
- Align photos
- Optimize Cameras
- Build Dense Cloud
- Build DEM
- Build Orthomosaic
- Raster Transform
- Export Orthomosaic
To add photos select Add Folder... command from the Workflow menu. In the Add Photos dialog browse the source folder and select files to be processed. Select Multi-camera system data layout in the Add Photos dialog - thus Metashape will automatically arrange the bands according to the information in the image metadata.
Note: add images only in TIFF format to the project (all selected at once). Don't add JPG files from the RGB camera that may also be present in the images folder.
The coordinate information will be automatically loaded from the image meta data to the Reference pane. It is suggested that prior to adding images to the project the following options are to be enabled in the Advanced tab in the Preferences dialog: "load camera orientation angles from XMP meta data" and "load camera location accuracy from XMP meta data".
Information about accuracy can be export from XMP meta data if you use data from RTK drone. Enable checkbox - "Load camera location accuracy from XMP meta data" on the Advanced tab in the Metashape Preferences dialog window. To open the Preferences dialog select Tools > Preferences...
If this data is missing, then set accuracy (m) manually. Select Set Accuracy... command from the context menu of an image on the Reference pane and input accuracy data both for a position (i.e. x,y,z coordinates) and orientation (i.e. [yaw, pitch, roll] angles) data. It is possible to select several cameras and apply Set Accuracy... command simultaneously to all of them.
Only the Sun sensor option is to be used for the Reflectance calibration if no radiometric panel had been used and no calibration images had been provided for the dataset.
Open Tools Menu and choose to Calibrate Reflectance option. Enable Sun sensor for calibration and press OK button:
Note: if you have images of the radiometric panel, it is recommended to include them in the calibration process. You can find the workflow for such a case in our article - MicaSense Altum processing workflow (including Reflectance Calibration) in Agisoft Metashape Professional (both for automatic detection and manual masking of the calibration images).
Once the images are loaded into Metashape, they need to be aligned. At this stage, Metashape estimates the camera position and orientation for each multi-camera system and generates a sparse point cloud consisting of the tie points. Additionally, the relative offsets of the sensors in the rig and the interior orientation (calibration) parameters for each sensor are estimated.
1. Select Align Photos... command from the Workflow menu.
2. In the Align Photos dialog box select the desired alignment options. The settings presented on the image below are set based on the particular dataset parameters and can be referred to as example values, the settings may differ depending on the project.
Note: Disabling Generic preselection option may be helpful for the low resolution images of the areas with dense vegetation, such as crop fields or forests.
3. Click OK button.
4. The progress dialog box will appear displaying the current processing status. To cancel the processing click Cancel button.
The result of the align photos operation will be shown in the Model view as the estimated camera locations and tie point cloud (representing the matching points between the images):
Note: If you have ground control points (GCPs), you can find useful information about workflow with markers in our solution - Aerial data processing (with GCPs). If you used GCPs, you should place markers and load the coordinates before optimization. For a multi-camera system, it will be enough to specify the projection of the marker on only one channel (not necessarily on all).
To improve the accuracy of the alignment use Optimize Cameras option from the Tools menu and select the parameters for optimization as presented in the image below.
Note: usually, "Fit additional corrections" can actually give an improved result for the RTK drone in a project without using GCP. This option allows you to compensate for calibration inaccuracies for lenses that are not exactly described by the current Brown's camera model used in Metashape.
Build Dense Cloud
1. If necessary, adjust the reconstruction volume (bounding box) in the Model view mode using Rotate Region, Resize Region, and Move Region instruments.
2. Select the Build Dense Cloud... command from the Workflow menu.
3. In the Build Dense Cloud dialog box select the desired reconstruction parameters. The settings presented on the image below are set based on the particular dataset parameters and can be referred to as example values, the settings may differ depending on the project.
4. Click OK button when done.
5. The progress dialog box will appear displaying the current processing status. To cancel processing click Cancel button.
Note: You can adjust image brightness and contrast for a more convenient display. The dialog Set Brightness is available from the Tools menu.
1. Open Build DEM dialog from the Workflow menu and set the parameters as presented in the image below.
Note: It is recommended to use the resolution value provided by default thus achieving the best possible resolution for DEM in the particular dataset.
2. After processing is finished open Ortho view mode. To display the reconstructed DEM surface double-click on the DEM instance in the chunk's contents on the Workspace pane.
1. Open Build Orthomosaic dialog from the Workflow menu and set the parameters
Note: The units of measurement for resolution correspond to the selected coordinate system. Use the Meters button if you need to convert the m/pix value to degrees/pix and vice versa. It is recommended to use the pixel size values provided by default thus achieving the best resolution for Orthomosaic.
2. To review the orthomosaic generation result switch back to Ortho view mode by double-clicking on the orthomosaic label in the Workspace pane.
For multispectral imagery projects, orthomosaic can represent NDVI and other vegetation indices information. Use Set Raster Transform option from the Tools menu to open Raster Calculator dialog. On the Transform tab specify the formula for the index that you would like to calculate from the source data.
To export the results of the orthomosaic generation use File > Export > Export Orthomosaic section.
In the Raster Transform section of the Export Orthomosaic dialog the following options are available:
- None - means that the exported orthomosaic will contain the same number of bands as there are in the source data, any transformation formulas will be ignored;
- Index Value - this option allows to save the output bands defined by the transformation formula set in the Raster Calculator dialog;
- Index Colors - saves the orthomosaic in RGB colors according to the Palette settings in the Raster Calculator dialog. The exported raster image will look identical to the orthomosaic display in the Ortho view mode, providing that Enable transform option is checked on in the Transform section of the Raster Calculator dialog.