[ptx] new command line tool for vignetting,
radial distortion and TCA correction
Bruno Postle
bruno at postle.net
Fri Mar 10 14:30:02 GMT 2006
On Thu 09-Mar-2006 at 09:03 +0100, Pablo d'Angelo wrote:
>
> I have written a command line tool, whose working title is fulla,
> to perform vignetting, radial distortion and transversal chromatic
> abberation correction.
I've played with the aberration correction and it works nicely, some
detail from a photo enlarged:
http://bugbear.blackfish.org.uk/~bruno/fulla/dscn3079-before.jpg
http://bugbear.blackfish.org.uk/~bruno/fulla/dscn3079-correct.jpg
The workflow to figure-out the parameters goes something like this:
1. Use a RAW or TIFF photo, trying to correct chromatic aberration
of a JPEG photo is a big waste of time.
2. Split the image into red, green and blue files. I used the gimp
decompose filter and saved them each as PNG.
3. Load them into hugin, set the green image as the anchor.
4. Give each image a separate 'lens'.
5. Set the output to the same FoV as the green image, set output
type to rectilinear if the input is rectilinear.
6. Use the 'g' key to create lots of control points between the
green & blue and green & red images.
7. Fine tune all points. delete any points with less than 98%
correlation.
8. Optimise FoV, a, b & c for the red and blue images.
9. Delete any bogus control points (with large errors) and
reoptimise.
10. With any luck you should now have several hundred control-points
with an average error of around 0.2 pixels. If not, go back to 7.
11. Now write down the a, b & c values for the red and blue images.
Calculate the d parameters by dividing the FoV of the green image
by the FoV of the optimised image.
12. Run fulla on the command-line, something like this:
fulla -b -0.001344:0.003245:-0.002050:1.0000714 \
-r -0.000980:0.001960:-0.000540:1.0005016 \
dscn3079.tif dscn3079-correct.png
That's it, in principle these parameters should be the same for all
future pictures taken with the same lens combination.
--
Bruno
More information about the ptx
mailing list