Page 1 of 1

Handling a Sequoia Image given a custom affine matrix

Posted: 2017-02-03T09:54:55-07:00
by pski
I've been trying to figure out how to handle the barrel distortion of a Sequoia camera. Fortunately, they provide the affine transformation but it appears to not fall under the default behavior of ImageMagick. This is how it's described: https://support.pix4d.com/hc/en-us/arti ... &gsc.tab=0 The camera will include all the information available on that page in the exif, here's a sample image: https://www.dropbox.com/s/obd8p10ypokku ... E.tif?dl=0

And for the various parameters as defined in the exif:
Fisheye Affine Matrix : C,D,E,F
Fisheye Polynomial : For fisheye camera: Polynomial separated by comma
Fisheye Affine Symmetric : (Boolean of whether or not the affine matrix should be used)

Re: Handling a Sequoia Image given a custom affine matrix

Posted: 2017-02-03T10:48:39-07:00
by snibgo
Exiftool says the image contains:

Code: Select all

Fisheye Polynomial              : 0,1,0.012587389,-0.150281072
I don't know how those numbers correspond to IM's abcd, but this gives a plausible result:

Code: Select all

convert IMG_170126_203020_0000_GRE.tif -distort Barrel 0,0.012587389,-0.150281072 out.png

Re: Handling a Sequoia Image given a custom affine matrix

Posted: 2017-02-03T14:21:04-07:00
by pski
Thanks a ton, I was trying the barrel distort, but hadn't considered that setup. That should be good enough for my purposes.