Invalid multi-camera images with Large Multispectral Dataset

I am having an issue with processing large multispectral data sets.

The DJI Phantom 4 Multispectral (5 band) drone will take pictures labeled as “DJI_0011” “DJI_0012” “DJI_0013” “DJI_0014” “DJI_0015”. This is the first image taken by each sensor/band. Then it continues to image two labeled as “DJI_0021” “DJI_0022” “DJI_0023” “DJI_0024” “DJI_0025” and so on for each image. The first 3 numbers are the image count and the last one is the band number. When it runs out of labels it will make a new folder and start over with the same labeling system. When we combine all the images into one folder, Windows prompts “Which image do you want to keep” because there will be images with the same name. We select “keep both” and all of the images in the second folder will have “ (2)” added onto the end, [that is a space then (2)]. So now there will be “DJI_0011” “DJI_0011 (2)” for as many images as are in the second folder from the last part of the flight.

The issue is that WebODM seems to be labeling all the images from the second folder as one band, as a 6th band. So, when I process, it will error saying that the number of images is not correct for a multi-sensor camera.

I was thinking we could change ALL the image names so there are 5 digits instead of 4. So, it could look like DJI_10011 for the first round (folder) of images, DJI_20011 for the second round of images that are labeled with a space and (2). I thought that the program might be using the last digit to separate the bands, so I wanted to keep the last digit consistent with how it was originally labeled.
I came across the same error when all the images had the same format as DJI_10011 for the first folder and DJI_20011 for the second folder.

I made a google docs to share some of the data. There are 30 images that are from folder one and 15 images from folder two. This should show how the duplication happens and how the count would come out as “incorrect”

The full data set has 545 images that have been duplicated from the second folder and last part of the flight. There are 359 images of each band (1-5) from the first folder of images created.

359 * 5 bands = 1795 total images from folder 1 + 545 total images from folder 2 = 2340 total images for the flight

I have included the console.txt file for the first run with the names unchanged, and the second run with the names changed. Any help would be appreciated.


[INFO] Initializing ODM 2.8.8 - Tue Aug 09 12:26:18 2022
[INFO] ==============
[INFO] 3d_tiles: False
[INFO] auto_boundary: True
[INFO] auto_boundary_distance: 0
[INFO] boundary: {}
[INFO] build_overviews: False
[INFO] camera_lens: auto
[INFO] cameras: {}
[INFO] cog: True
[INFO] copy_to: None
[INFO] crop: 3
[INFO] debug: False
[INFO] dem_decimation: 1
[INFO] dem_euclidean_map: False
[INFO] dem_gapfill_steps: 3
[INFO] dem_resolution: 5
[INFO] depthmap_resolution: 640
[INFO] dsm: False
[INFO] dtm: False
[INFO] end_with: odm_postprocess
[INFO] fast_orthophoto: False
[INFO] feature_quality: high
[INFO] feature_type: sift
[INFO] force_gps: False
[INFO] gcp: D:\WebODM\resources\app\apps\NodeODM\data\a7e21e3c-199f-4e34-bda6-f4cadb055689\gcp\NorthHam_multispec_gcp_list.txt
[INFO] geo: None
[INFO] gps_accuracy: 10
[INFO] ignore_gsd: False
[INFO] matcher_neighbors: 0
[INFO] matcher_type: flann
[INFO] max_concurrency: 28
[INFO] merge: all
[INFO] mesh_octree_depth: 11
[INFO] mesh_size: 200000
[INFO] min_num_features: 10000
[INFO] name: a7e21e3c-199f-4e34-bda6-f4cadb055689
[INFO] no_gpu: False
[INFO] optimize_disk_space: False
[INFO] orthophoto_compression: DEFLATE
[INFO] orthophoto_cutline: False
[INFO] orthophoto_kmz: False
[INFO] orthophoto_no_tiled: False
[INFO] orthophoto_png: False
[INFO] orthophoto_resolution: 3.5
[INFO] pc_classify: False
[INFO] pc_copc: False
[INFO] pc_csv: False
[INFO] pc_ept: True
[INFO] pc_filter: 2.5
[INFO] pc_geometric: False
[INFO] pc_las: False
[INFO] pc_quality: medium
[INFO] pc_rectify: False
[INFO] pc_sample: 0
[INFO] pc_tile: False
[INFO] primary_band: auto
[INFO] project_path: D:\WebODM\resources\app\apps\NodeODM\data
[INFO] radiometric_calibration: none
[INFO] rerun: None
[INFO] rerun_all: False
[INFO] rerun_from: None
[INFO] resize_to: 2048
[INFO] rolling_shutter: False
[INFO] rolling_shutter_readout: 0
[INFO] sfm_algorithm: incremental
[INFO] skip_3dmodel: True
[INFO] skip_band_alignment: False
[INFO] skip_orthophoto: False
[INFO] skip_report: False
[INFO] sky_removal: False
[INFO] sm_cluster: None
[INFO] smrf_scalar: 1.25
[INFO] smrf_slope: 0.15
[INFO] smrf_threshold: 0.5
[INFO] smrf_window: 18.0
[INFO] split: 999999
[INFO] split_image_groups: None
[INFO] split_overlap: 150
[INFO] texturing_data_term: gmi
[INFO] texturing_keep_unseen_faces: False
[INFO] texturing_outlier_removal_type: gauss_clamping
[INFO] texturing_skip_global_seam_leveling: True
[INFO] texturing_skip_local_seam_leveling: False
[INFO] texturing_tone_mapping: none
[INFO] tiles: False
[INFO] time: False
[INFO] use_3dmesh: False
[INFO] use_exif: False
[INFO] use_fixed_camera_params: False
[INFO] use_hybrid_bundle_adjustment: False
[INFO] verbose: False
[INFO] ==============
[INFO] Running dataset stage
[INFO] Loading dataset from: D:\WebODM\resources\app\apps\NodeODM\data\a7e21e3c-199f-4e34-bda6-f4cadb055689\images
[INFO] Loading 2340 images
[INFO] Found 2340 usable images
[ERROR] Multi-camera setup detected, but band “RGB” (identified from “DJI_0011_2.TIF”) has only 545 images (instead of 359), perhaps images are missing or are corrupted. Please include all necessary files to process all bands and try again.
Traceback (most recent call last):
File “D:\WebODM\resources\app\apps\ODM\”, line 59, in
retcode = app.execute()
File “D:\WebODM\resources\app\apps\ODM\stages\”, line 124, in execute
raise e
File “D:\WebODM\resources\app\apps\ODM\stages\”, line 88, in execute
File “D:\WebODM\resources\app\apps\ODM\opendm\”, line 352, in run
self.process(self.args, outputs)
File “D:\WebODM\resources\app\apps\ODM\stages\”, line 206, in process
reconstruction = types.ODM_Reconstruction(photos)
File “D:\WebODM\resources\app\apps\ODM\opendm\”, line 28, in init
self.multi_camera = self.detect_multi_camera()
File “D:\WebODM\resources\app\apps\ODM\opendm\”, line 55, in detect_multi_camera
raise RuntimeError(“Invalid multi-camera images”)
RuntimeError: Invalid multi-camera images

It is troubling that the DJI P4 Multispectral image file names “always” start with the same name, DJI_0011.TIFF …

If the flight mission takes long time and the landing is required for changing batteries, for example, we get image files with the same name in separate folders.

My manner is …
Folder A / DJI_0011.TIFF → 20220812_A_0011.TIF
Folder B / DJI_0011.TIFF - → 20220812_B_0011.TIF

rename the file names to unique like that, and then merge them into a single folder.

This is tedious and a source of mistakes …

1 Like


I’ve been processing some a lot of P4 MS imagesets last month. Two things I had to do and check:

  1. If you have multiple flights, you get multiple image folders.

Rename the files from multiple flights, for example based on the folder / date.
Folder A has 0010.tiff → rename to → A_0010.tiff
Folder B has 0010.tiff → rename to → B_0010.tiff
Folder C has 0010.tiff → etc

One of the tools that comes in pretty handy is the open source image tool Irfanview, which has a batch rename function.

Merge the images from Folder A B C etc into a new folder and create a project in ODM. When you process these combined image folders you get a nice result :slight_smile:. The following image contains a MS job taken from 4 flights.

  1. One thing to keep in mind is the following thing. It’s not a ODM bug but rather a DJI issue.
    It seems that the drone (at least in all of my datasets) sometimes writes a 0kb Tiff file instead of the expected 4080 kb filesize. When you try to process this dataset inclulding the 0kb images in ODM it will result in an error.

So check if there are any 0kb image file sizes in your datasets.

Solution is to remove the 5 images relating to this 0 kb file from your image folder and process the remaining images. So for example if DJI_0695.tiff is 0kb remove


from your dataset and process the remaining images.

1 Like

Thank you for your response!
I did try a test run on a smaller set of images using your file naming “A_0011” and “B_0011” but I came across the same error. I also checked for any images with 0kb and there wasn’t any to delete. I’m wondering if the metadata could be messing things up? It would be helpful to know how the band “Blue” is identified and what factors could effect it.

test_Screenshot 2022-08-12 112928

[ERROR] Multi-camera setup detected, but band “Blue” (identified from “A_0011.TIF”) has only 3 images (instead of 10), perhaps images are missing or are corrupted. Please include all necessary files to process all bands and try again.

It seems the metadata has been corrupted/lost after calibrating all of the images for reflectance. It only effected the images labeled “DJI_0011 (2)” in the second folder. We had done the calibration before I found out there was an issue in processing, so when I changed the image names I was changing these already calibrated images with the corrupt metadata attached. I will make corrections and test then update on this thread.

1 Like

On the P4 Multispectral, about once every few hundred times or so, some of the EXIF data is not written.
This is a DJI bug.
There is no problem with the file size, so it is not obvious at first glance.

1 Like

I have retraced my steps and changed the image names straight from the original files and then calibrated for reflectance. This has fixed the error in processing. Thank you for your feedback!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.