Handling a Sequoia Image given a custom affine matrix

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
pski
Posts: 10
Joined: 2016-07-27T13:05:07-07:00
Authentication code: 1151

Handling a Sequoia Image given a custom affine matrix

Post 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)
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Handling a Sequoia Image given a custom affine matrix

Post 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
snibgo's IM pages: im.snibgo.com
pski
Posts: 10
Joined: 2016-07-27T13:05:07-07:00
Authentication code: 1151

Re: Handling a Sequoia Image given a custom affine matrix

Post 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.
Post Reply