On Sun, 29 Mar 2009 20:15:15 +0200
Wolfgang Hugemann <[email protected]> wrote:
| Anthony and Fred,
|
| I have tested a few tools that claimed to determine the correct
| distortion correction coefficients for a certain camera type, but could
| not find one that did the job reliably. Some of them used specific test
| images of a special target (like equally spaced lines) that had to be
| photographed.
|
| This really complicates the process of calibrating a certain camera
| type, as these target have to be quite large in order to be photographed
| from some distance. Thus I think that the approach taken by PTlens is
| much more promising, i.e. using modern architecture buildings as
| ready-made targets. Anyway, I would like to know which programm you were
| referring to, Anthony, in order to give it a try.
|
The program is not available anymore and I do not have a copy.
I believe it is used more for photo scanning of documents and books
rather than real world images at a longer distance.
However taking a straight on photo of a picket fence or equally spaced
houses, should be able to produce a similar set of lines. Though one
which an automatic coordinate extraction program would not be able to
directly handle.
But I understand how the program works in automatically finding the
line crossings of the equally spaced parallel lines, and once it has
determined those coordinates the rest is much like your spread sheet
but with far more coordinates, spread over a larger radial range.
That allows for better matching by least squares function fitting.
Something IM already does for handing large numbers of 'control
points' than the minimum needed for affine, perspective, or (still
undocumented) polynomial distortions, in pixel coordinates.
FYI Polynomial Distortion
-distort polynomial 'order, coordinate-pairs, ....'
Where order is largest X or Y power of for the polynomial
and determines the minimum number of coordinates needed
order function minimum coodinates
0 constant 1
1 affine 3
1.5 bilinear 4
2 quadratic 6
3 cubic 10
4 quartic 15
5 quintic 21
For example a cubic distortion (order 3)
distorts the image using the reverse mapping function
Xsrc = a0 + a1*x + a2*y # affine terms
+ a3*x*y # bi-linear term
+ a4*x^2 + a5*y^2 # quadratic terms
+ a6*x^3 + a7*x^2*y + a8*x*y^2 + a9*y^3 # cubic terms
and a similar but completely separate Y coordinate mapping function.
| So far, I didn't know that this distortion has already been implemented
| in IM, so thanks for the hint. But as I said, as long as we do not have
| a reliable tool to determine the parameters of a certain camera type,
| this program option is rather academic.
|
I understand that, and want to create a tutorial users can follow to
determine the right parameters.
Eg: take photo, Extract diagonal crossing, feed coordinates to IM
polynomial least squares fit, and then adjust parameters from pixel
coordinates to minimal radial coordinates.
| I will try to work out the approach in somewhat more detail, applying it
| to a real test photograph and then come back on the subject again. This
| will hopefully be a matter of a few days...
|
I wish I had some time to do this myself. Busy Busy Busy!
Anthony Thyssen ( System Programmer ) <[email protected]>
-----------------------------------------------------------------------------
Occult Primer... Chapter Fifteen... Elementry Necromancy
Lesson One: Correct use of a Shovel -- Terry Pratchett, "Jingo"
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users