Page 1 of 1

Convert Brown-Conrady lens calibration parameters to the format used by ImageMagick

Posted: 2015-10-28T16:45:02-07:00
by Photointerpreter
Good evening,

I have to rectify a series of images produced by a drone camera. I have a camera calibration file supplied with the images containing the distortion parameters following the Brown-Conrady model: Symmetrical distortion parameters in the form of a polynomial (K0,K1,K2,K3 of the even terms) and tangential distortion parameters.

The distort -barrel option of the ImageMagick convert command uses a different lens distortion model, in fact the same that is used in the PTLens software. Is it possible to convert from one model (Brown-Conrady) to the PTLens model using some transformation equations, or either to use the lens distortion parameters following the Brown-Conrady model directly in Imagemagick ?

Thanks in advance,

Jean Vezina

Re: Convert Brown-Conrady lens calibration parameters to the format used by ImageMagick

Posted: 2015-10-28T18:04:47-07:00
by fmw42
Is it possible to convert from one model (Brown-Conrady) to the PTLens model using some transformation equations,
I would not know how, since the current IM model only seems to include radial distortion and not tangential (torsional) distortion. You should be able to use just K1 and K2 terms in Imagemagick to do the radial distortion correction. Try comparing the order of terms in the two sets of equations. http://www.imagemagick.org/Usage/distorts/#barrel and https://en.wikipedia.org/wiki/Distortion_(optics). But I think A=0, B=K1, C=0 and D=1, but IM is missing the r^4 term. So I do not know what to do with K2. (My script pinbarrel at my link below will be slow, but does allow for a r^4 term).

From the reference below:

"Experience shows that the effects of radial lens distortion f(r) exceed those of torsional distortion g(r,α) at least by an order of magnitude. Consequently, most software only models radial distortion"

(see http://www.imagemagick.org/Usage/lens/c ... rtions.pdf). Perhaps your camera system is in the PTlens data base or can be added. Also you might inquire of someone more expert in the area such as the author Wolfgang Hugemann (whugemann on this forum) or Professor Helmut Dersch (http://webuser.fh-furtwangen.de/~dersch/)
or either to use the lens distortion parameters following the Brown-Conrady model directly in Imagemagick ?
It is certainly possible, but would require new implementation. I do not think this would be high priority for the IM developers, but they would have to comment. But any one can contribute code.

Re: Convert Brown-Conrady lens calibration parameters to the format used by ImageMagick

Posted: 2015-10-29T08:45:39-07:00
by Photointerpreter
Good morning,

Thanks a lot!

I will try your suggestion.

Best regards,

Jean