Bi-radial distortion in drone camera lens

46 views
Skip to first unread message

James Hollingsworth

unread,
Feb 4, 2024, 2:07:07 PMFeb 4
to Ames Stereo Pipeline Support
Hi Oleg,

I'm finding the distortion in some drone images (DJI Air2S) is not well handled by a simple distortion model. The intersection error maps show a clear bi-radial distortion pattern. This paper discusses a distortion model for such cameras: 
(sorry, it's mdpi)
Would this be hard to implement? Or maybe the RPC distortion option would be ok?

Cheers,

James

Oleg Alexandrov

unread,
Feb 4, 2024, 5:06:48 PMFeb 4
to James Hollingsworth, Ames Stereo Pipeline Support
James, 

I read the paper you point out about distortion. It says:

> With the adapted Brown model, the standard deviation of the unit weight 𝑠0 (polynomial fit) can be decreased to 1.01 µm (0.65 px) and 0.98 µm (0.63 px) when using five or seven parameters, respectively.

It looks that going from degree 5 to degree 7 distortion only decreases residuals by 0.02 pixels, so likely it is not worth it.

One can use ASP with the CSM frame camera model. That one has the OpenCV radial-tangential distortion model (polynomial of degree 7 for radial distortion and degree 3 for tangential distortion (https://docs.opencv.org/3.4/dc/dbb/tutorial_py_calibration.html).

I just made the cam_gen tool find the best-fit distortion coefficients to this model (https://stereopipeline.readthedocs.io/en/latest/tools/cam_gen.html#csm-frame-cameras). 

I am also working on joint intrinsics optimization for linescan and frame cameras (to be done soon), so it will be able to use linescan cameras to make frame cameras behave (frame cameras usually have cheaper optics).

Then, CSM supports the "transverse" distortion, which is a polynomial of degree 3 with all possible coefficients being non-zero (that's 10 degrees of freedom). See the formulas here: https://github.com/DOI-USGS/usgscsm/blob/main/src/Distortion.cpp

I have not looked for a while at the RPC lens distortion in ASP. That one likely can fit anything. For now undistortion is implemented as fitting a new RPC model. That should be converted to using Newton-Rhapson, as done in CSM which is more accurate and very fast. 

There may be enough for you to try, maybe.

Oleg





--
You received this message because you are subscribed to the Google Groups "Ames Stereo Pipeline Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ames-stereo-pipeline...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ames-stereo-pipeline-support/39128b6a-bb28-4c0f-b877-2cb8c6b7c9c6n%40googlegroups.com.

James Hollingsworth

unread,
Feb 4, 2024, 5:35:34 PMFeb 4
to Ames Stereo Pipeline Support
Super interesting Oleg... many thanks.

Ok, so if I convert some pinhole models (in which k1,k2,p1,p2 are set to zero) to CSM frames using cam_gen, would I use --distortion '1e-12 1e-12 1e-12 1e-12 1e-12', to get a CSM frame camera with the same pose as the initial tsai pinhole model but setting the distortion to zero (for a radial-tangential distortion model)? ... then I could bundle_adjust using these new CSM cameras, and optimize the distortion with this more expressive distortion model?

Also, if you must specify the 5 parameters needed for the radial-tangential distortion model when using cam_gen, but you don't know them, what do you do?... start with zero and optimize with bundle_adjust? And if you already have a model, e.g. tsai, would you pass k1,k2,p1,p2 and set k3 to zero, then optimize?

So is it not currently possible to create a CSM frame camera model with the "transverse" distortion model (e.g. using cam_gen)?

FInally, I'm looking forward to Newton-Rhapson update to RPC generation (when it comes)... that sounds great! 

Many thanks as always Oleg. You're awesome.

J

Alexandrov, Oleg (ARC-TI)[KBR Wyle Services, LLC]

unread,
Feb 4, 2024, 5:57:09 PMFeb 4
to James Hollingsworth, Ames Stereo Pipeline Support
Yeah, cam_gen can optimize these radtan distortion parameters to fit best your input model, if that is desired, or these can be left with some values you set in and then bundle_adjust can optimize them.

The cam_gen tool does not for now create "transverse" distortion model. The produced model is in plain text though, and can be edited to change the number of distortion coefficients and distortion type. The transverse one has distortion type 1 (https://github.com/DOI-USGS/usgscsm/blob/main/include/usgscsm/Distortion.h). 

If there is a solid case for why ASP must do more for distortion, so if the current approaches fail, I could likely do some more improvement, such as making the RPC undistortion better. Note that the forward RPC as it exists (going from ground to camera) is enough to fit the distortion and evaluate its accuracy. The undistortion operation is only needed for stereo triangulation.

From: ames-stereo-pi...@googlegroups.com <ames-stereo-pi...@googlegroups.com> on behalf of James Hollingsworth <hollings...@gmail.com>
Sent: Sunday, February 4, 2024 2:35 PM
To: Ames Stereo Pipeline Support <ames-stereo-pi...@googlegroups.com>
Subject: [EXTERNAL] [BULK] Re: Bi-radial distortion in drone camera lens
 
CAUTION: This email originated from outside of NASA.  Please take care when clicking links or opening attachments.  Use the "Report Message" button to report suspicious messages to the NASA SOC.



Reply all
Reply to author
Forward
0 new messages