DJI Phantom 4 Pro V2 camera calibration

Hi all.

I am trying to obtain the lens distortion parameters for a DJI Phantom 4 Pro V2. I followed the instructions from the ODM documentation, but each time I get different results.

I tried with a 10x8 checkerboard on the computer screen, then on a A4 paper sheet. I also did a 19x14 checkerboard printed on an A1 paper sheet.

Below are my distortion parameters for each trial:

2019-09-09_104745

For each set of checkerboard pictured, I get different lens correction parameter values.
When I applying them in the images the difference is minimal.

I’ve read that the Phantom 4 Pro have its lens profile built-in in the opcode, but I am not sure what this means exactly.
Are the JPGs from the camera already undistorted based on the built-ins lens profile ?

In that case, is it still worth processing the images using the checkerborad parameters ?
Below is a link for the original JPG and undistorted image using results from the last column above.


Thanks for your help

In general, it’s best to fly following best practices (capture images at different elevations, in a cross-pattern, maximizing angle and scale variation between pictures) and ODM will generate a calibration file (cameras.json) that works better than the checkerboard pattern method. You can then transfer the camera model to another dataset by using the --cameras parameter.

Docs should probably be updated to reflect this. (Interested in contributing @skualos ?) https://github.com/OpenDroneMap/docs

2 Likes

Piero is right, better to fly a good pattern than use a calibration checkboard pattern. For commodity cameras, the calibration changes regularly with temperature, focus, vibration, and a host of other factors. James and Robson (2014) address the problem of calibration of these systems here:

Open Access Link

The practical takeaways for the purposes of topographic modeling of UAV data as I see it are as follows:

  • Either randomly vary pitch, yaw, and roll of the photos by a random amount up to 5° (usually impractical) or use a forward looking camera pitched at 5°

  • Avoid parallel flight lines by flying a set of lines at one angle and then a second with 20° separation.

If doing this over your entire flight area is too expensive/time consuming, you can, as Piero indicates, do it for a portion, fly the rest using a more efficient technique, and then process the smaller flight and export the camera parameters for that flight to be used in the larger flight.

  • Avoid parallel flight lines by flying a set of lines at one angle and then a second with 20° separation.

In a practical sense, this means: fly a normal pattern at your target overlap and side lap. Then fly again, but for the second flight, change your flight direction by 160° (180° - 20°) in order to get converging shots 20 degrees off the original.

Docs should be up to date shortly here: https://docs.opendronemap.org/using.html#camera-calibration

1 Like

Thanks for your replies @pierotofy and @smathermather-cm

I am trying to figure out what are the best flight settings to map canopy cover and height of sparse vegetation as in the linked pictures above.
The recently added sections about high quality orthomosaics and DEM were certainly very helpful.

I flew the same 100x100m area with different settings combinations using Pix4D:

  • 50 and 80meters height
  • single grind and double grid
  • in double grid, camera angle of 80 an 70 degrees

However I do not have a flight with images at a 20° angle as suggested, and will not be able to get them anytime soon. I guess if I process all those images combined I should obtain robust lens distortion parameters.

I am happy to contribute to the Docs once I get a better handle on this.

I noticed that some of my ODM outputs folder do not include cameras.json, images.json and img_list.txt
Maybe is because of my folders mapping on the docker instance ? Below is the command I’ve been using:

docker run -it --rm
-v “$(pwd)/images:/code/images”
-v “$(pwd)/odm_georeferencing:/code/odm_georeferencing”
-v “$(pwd)/odm_meshing:/code/odm_meshing”
-v “$(pwd)/odm_orthophoto:/code/odm_orthophoto”
-v “$(pwd)/odm_texturing:/code/odm_texturing”
-v “$(pwd)/opensfm:/code/opensfm”
-v “$(pwd)/odm_dem:/code/odm_dem”
odm_082_image
–time
–skip-3dmodel
–dsm --dtm \

You have 10 degrees separation between two flights?

Maybe a little off topic, but did anyone check this out?

https://github.com/dronemapper-io/dji-dewarp (its from the folks, that made NodeMicmac.)

Nice! I’d say that’s relevant.

I have 10 degrees between flights in camera angle towards the ground.
But I do not have the suggested 20 degrees convergent flights (I flew a north-south / east-west grid at all times)