Agisoft Metashape

Agisoft Metashape => General => Topic started by: c-r-o-n-o-s on April 16, 2021, 10:30:19 AM

Title: Processing "dewarped" P4 RTK images....
Post by: c-r-o-n-o-s on April 16, 2021, 10:30:19 AM
Hello.

My software for the DJI P4 RTK drone has a disadvantage.
Photos taken manually are lens corrected by default. (dewarp)
I have also turned this off on 4 from 5 jobs.
I forgot to do it on the last job.

Now I have a chunk of about 1000 "correct undewarped" photos and 100 photos that unfortunately don't fit (dewarped).
The correction parameters are saved in each image and also read out by Metashape.

Can't Metashape take these values to create uncorrected versions for me again or include them in the calculation?

Thank you!
Title: Re: Processing "dewarped" P4 RTK images....
Post by: c-r-o-n-o-s on April 16, 2021, 12:32:07 PM
It works in part now, but is it right?
I have set the correction values to zero except for the focus.
Then I "fixed" these values. (Picture)

Now it aligns the pictures at least roughly.
After that I can also "optimise the cameras".

I'm not quite sure about the precision of the result yet.

Title: Re: Processing "dewarped" P4 RTK images....
Post by: Paulo on April 16, 2021, 12:40:09 PM
Hi cronos,

in the optimize part I would only fix k1 to k4,p1,p2 and b1, b2 parameters and let the program adjust f and cx, cy....

see what you get....
Title: Re: Processing "dewarped" P4 RTK images....
Post by: c-r-o-n-o-s on April 17, 2021, 04:47:58 PM
I have seen some things in the FAQ section of DJI.

Frankly, I find it a bit confusing, especially the last section. (BOLD)


Does the Phantom 4 RTK camera digital signal processor (DSP) support distortion correction?

No, you can enable the distortion correction in the camera but the images will be less precise compared to distortion elimination in post-processing software.

How is the Phantom 4 RTK camera calibrated?

Each Phantom 4 RTK camera goes through a calibration process that measures the distortions of the lens, and records the corresponding undistort parameters in XMP DewarpData. When the “distortion correction” is switched off, the original image with distortion will be generated. When the “distortion correction” is switched on, the parameters used to eliminate distortion is not the parameters calibrated, but the design parameters of the camera. When eliminating the distortions, it is not done pixel by pixel.


So the camera internally does NOT use the data stored in the file for distortion correction?
Title: Re: Processing "dewarped" P4 RTK images....
Post by: Paulo on April 17, 2021, 09:34:18 PM
Hello cronos,

you can check if DJI dewarped images are really images with distorsion removed by looking at its footprint on the ground. On attached screen I compare footprint of 2 images: one normal (with distorsion) and the other with distorsion removed (_undistorted).

As expected the undistorted image has a rectangular footprint compared to stretched footprint of normal image (because of significant radial distorsion). For example with 2.6 cm GSD, the undistorted diagonal covers 174 m on ground compared to about 231 m for normal image (with distorsion).

2nd attachment shows the 2 images side by side and how their footprint vaties....
Title: Re: Processing "dewarped" P4 RTK images....
Post by: c-r-o-n-o-s on April 19, 2021, 09:57:35 AM
Thank you,

The "normal" SHOW IMAGES from menu help also.

Title: Re: Processing "dewarped" P4 RTK images....
Post by: Paulo on April 19, 2021, 10:03:09 PM
Exactly, cronos,

from your example projected images, it does seem that dewarped image does remove distorsion.

But projected dewarped does not seem to fit with point cloud as well as projected distorted, or is it just my impression?