ideal parameters for -distort Barrel correction?
Posted: 2013-07-22T12:48:35-07:00
I've read thru the IM Lens Correction page (http://www.imagemagick.org/Usage/lens/) and Dersch's page and need a little help figuring out transformation parameters to do a proper barrel distortion correction. My raw images are Hasselblad H4D-50 .3fr images that I've converted to TIFF using dcraw. I have the following camera calibration parameters provided to me from Hasselblad:
but I thought there might be a more quantitative approach to arrive at these values based on the parameters provided by Hasselblad. If I use Hasselblad's Phocus software to export the images from .3fr to TIFF, I can select a "lens correction" option that does (among other things?) a barrel distortion correction. This feature is poorly documented in the User Manual, so I'm not really sure what's happening behind the scenes, but the corrected TIFF images have a small barrel distortion correction applied, as evident by comparing corrected vs. non-corrected images. I arrived at the values above (0 0 -.015 1.015) by comparing images created using the IM barrel correction to Hasselblad's lens distortion corrected images. If there's a better way to arrive at these values, please inform.
Another thing: the raw .3fr images (and the raw TIFFs created by dcraw) are 8282x6240 with some black space around the images; when I export a TIFF using Phocus, however, these images are just 8176x6132, which is the nominal resolution of the camera. Perhaps this--and the Principal Point xp and yp--need to be considered when doing the Barrel Distortion correction to dcraw-converted TIFFs? If I add the Principal Point info from Hasselblad like so:
it has no effect on the correction, which seems odd given the center of a 8282x6240 image would be 4141,3120... much different than 4082,3049.
Anyway, any suggestions much appreciated. Thanks!
From these parameters, above, is it possible to calculate ideal parameters for IM's barrel distortion correction? My images are digital aerial photographs from a remote location with few linear features; I can play with various settings in IM to get rough approximations of what I want, i.e.:Focal Length 8450.200450379736 pixel (50.7 mm)
Principal Pt xp 4081.938998397167 pixel
Principal Pt yp 3049.108644739739 pixel
Radial_1 -0.084086506315842
Radial_2 0.205627582811823
Radial_3 -0.385333159221336
Tangent_1 -0.000646847534623633
Tangent_2 0.000700697532591567
Code: Select all
-distort Barrel "0.0 0.0 -0.015 1.015"
Another thing: the raw .3fr images (and the raw TIFFs created by dcraw) are 8282x6240 with some black space around the images; when I export a TIFF using Phocus, however, these images are just 8176x6132, which is the nominal resolution of the camera. Perhaps this--and the Principal Point xp and yp--need to be considered when doing the Barrel Distortion correction to dcraw-converted TIFFs? If I add the Principal Point info from Hasselblad like so:
Code: Select all
-distort Barrel "0.0 0.0 -0.015 1.015 4082 3049"
Anyway, any suggestions much appreciated. Thanks!