[ptx] Lens correction of a cheap webcam

Marko Mäkelä marko.makela at hut.fi
Tue Jul 13 22:11:04 BST 2004


Hi all,

A construction company is looking for a cheap web cam installation that
would be set up on construction sites they are working on, as a reference
on their web page.  I have figured out most of it: I prepared a boot floppy
with SYSLINUX, a monolithic Linux kernel, BusyBox and a simple program
I wrote to capture and serve uncompressed images from a webcam.

The software (which I intend to release under the GPL) works well, but 
the webcam I'm using has some problems with image quality: noise, burning,
and lens distortion.  (See http://www.funet.fi/~msmakela/webcam.jpg)  The
total cost of hardware is under 100 euros (18 for the PCI firewire adapter,
some 60 for the web cam, plus the cost of an obsolete ISA combo Ethernet
adapter and an old 200 MHz PC).

I would appreciate some help with the treatment of lens distortion.  I tried
to follow the tutorial at
http://hugin.sourceforge.net/tutorials/architectural/en.shtml, setting four
pairs of vertical control points and one pair of horizontal control points.
(It wouldn't let me to set multiple pairs of horizontal control points.)
The distortion was corrected somewhat, but not fully.  There's another tutorial
at http://epaperpress.com/pano/calDistort.html.  Unfortunately, PTLens is
only available as Windows executables, violating the license of Panorama Tools.

Is there any simple C implementation of the radial shift algorithm described
at http://www.path.unimelb.edu.au/~dersch/barrel/barrel.html, working on
images with 8 bits per colour component?

	Marko


More information about the ptX mailing list