Take a photo of a calibration grid, and run dotfind and dotfit (on the powerwall in
~olawlor/dev/osl/bin/) on the photo to determine your camera's radial distortion and
field of view parameters. Put these values into a file called "p2.txt". Here's how to run dotfind and dotfit:
~olawlor/dev/osl/bin/dotfind dscf0001.jpg 100
# This program will generate a text file giving the dot locations called "pts.txt".
# 100 is the approximate spacing between dots, in pixels
xv marked.ppm
# Make sure the dots line up with the grid
~olawlor/dev/osl/bin/dotfit pts.txt 5.0 0.25
# Fit a function to the grid in "pts.txt", assuming the camera is 5 inches from a 1/4 inch grid.
# This program will print out the radial distortion and field of view parameters.