Posted by
Alan Hewat on
URL: http://imagej.273.s1.nabble.com/Applying-calibrated-geometrical-distortion-to-an-image-tp5001968p5001971.html
Thanks Albert.
As I understand, this is a method of correcting for distortion without
using a special calibration image. You just take a matrix of partly
overlapping images of the object, stitch them together and fit the
individual images to the average. Iteration with a new average will
then converge to give a correction field that can be applied to any
image. I used a simpler 1D version of this technique ~30 years ago to
calibrate 64 detectors scanning a linear object. It depends on having
sufficient overlap between adjacent images, and then it does a great
job and converges quickly.
Unfortunately I can't do that with my current problem. The camera has
a fixed geometry w.r.t. the object, and can't scan. It is an
instrument with two fixed cameras looking at a fixed screen in a box.
After correcting each camera for distortion, I have to stitch them
together, and measure precise points in the composite image. Although
the cameras are nominally identical, the overlap is not sufficient for
your method to work in my case
http://neutronoptics.com/laue.htmlWith my fixed geometry I should be able to use a calibration pattern
such as a grid or checkerboard.
Thanks also to Giuseppe for pointing out that such techniques exist in
MatLab. I was hoping to find that some-one had done such a distortion
correction with ImageJ using a calibration pattern. The examples I
found are almost what I need, but not quite appropriate.
Alan.
On 3 March 2013 15:09, Albert Cardona <
[hidden email]> wrote:
> Alan,
>
> Have a look here:
>
>
http://fiji.sc/wiki/index.php/Distortion_Correction>
> This is a protocol to calculate the distortion of your camera. The resulting transformation you could apply using Stephan Saalfeld's mpicbg library functions.
>
> Albert
>
> On Mar 3, 2013, at 3:33 AM, Alan Hewat <
[hidden email]> wrote:
>
>> I have a camera instrument with a fixed geometry that produces slightly distorted images.
>>
>> I want to determine the distortion correction field, by comparing the distorted image with the undistorted image, eg of a grid. I then want to apply that calibrated correction field to any image with the same camera, without user interaction. I need a precise automatic correction, since the user must measure positions within the corrected image.
>>
>> I tried
http://biocomp.cnb.csic.es/~iarganda/SplineDeformationGenerator/ which allows a choice of distortion models with a small number of parameters. This works, but calibration requires an a priori choice of the type of distortion (fisheye, barrel etc...) and then manual adjustment of the parameters to obtain what <b>appears</b> to be the least distorted image. It is too subjective, and difficult to obtain parameters that remove all distortion.
>>
>> Then
http://biocomp.cnb.csic.es/~iarganda/bUnwarpJ/ looked promising. This determines the distortion field that will transform between an un-distorted and distorted image pair. But again it appears to be a manual process and I couldn't see from the tutorial how I could store the distortion field and automatically apply it to new images with the same distortion.
>>
>> I would have thought that calibrated distortion correction was a common need for many fixed geometry cameras, but couldn't find much more on the WWW. Any suggestions would be welcome.
>>
>> Alan.
>>
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
______________________________________________
Dr Alan Hewat, NeutronOptics, Grenoble, FRANCE
<
[hidden email]> +33.476.98.41.68
http://www.NeutronOptics.com/hewat______________________________________________
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html