This little tutorial is about determining the distortion parameter of your camera or optics by using open source software:
Preparation
- download and install the open source software hugin (http://hugin.sourceforge.net/)
- print out that image:
- take a video clip depicting that print out (note: camera should be parallel to print-out to avoid tangential distortion)
- take a still image from that clip where the print-out is centered, e.g.
Use Hugin's "Lens calibration GUI"
The open source software Hugin is able to determine the 3 parameter of ptlens model (a,b,c):
- add Image
- enter any value for focal length and crop factor
- click button Find lines, if no sufficient number of lines were found:
- increase edge detection scale
- and/or decrease minimum len length
- check ratio buttons
- a, b, c
- click optimise button
- check preview with "Corrected" option and verify that lines are straight
- if lines are straight, note these 3 parameter (a,b,c) for VEGAS plugin (which are named as k1, k2, k3)