Calibration

The SVS calibration procedure is simple, automatic, and quick. It works with almost any camera pair, even with very wide-angle lenses, and camera positions that are nonstandard, e.g., verged cameras. It corrects for distortion in the lens (internal calibration) and determines the relative placement of the two cameras (external calibration).

Calibration is an off-line procedure. The cameras are calibrated by placing a known target into their view, and then running a calibration algorithm to determine internal and external parameters. These parameters are stored in a file. At runtime, the parameters are loaded into the stereo program, and the two stereo images are warped according to the parameters, to produce rectified images that are appropriate for the stereo matching algorithms.

Typically, calibration will produce results that are within 0.2 to 0.4 pixel from an ideal camera, across the entire field.  Relative error is much lower.

unwarp640-L.jpg (40334 bytes) unwarp640-R.jpg (40821 bytes)
Left image
Right image
Uncalibrated Images (640x480, full frame)

Here are a set of uncalibrated stereo images from the MEGA-D stereo head with an 8.5 mm lens, 57 degree field-of-view (click on the thumbnails for a full-size image). Although the lenses are quite good, there is still some curvature in the door at the right edge of the picture, a sure sign of lens distortion. Also, the images are not aligned vertically. There are other subtle problems, such as rotational differences, that are harder to determine by inspection.

 

warp640-L.jpg (37684 bytes) warp640-R.jpg (37034 bytes)
Left image
Right image
Calibrated Images (640 x 480, full frame)

These images are the calibrated versions of the ones above. Lens distortion has been removed, and as a consequence the images have expanded by a little. All scene lines are now straight in the images. The vertical offset has been removed. There are still horizontal offsets for close objects, but far objects appear at about the same horizontal point in each image.

 

Wide-Angle Lens Example

The calibration procedure can produce rectified images even from severely distorted images.  The images at left were produced with OmniTech's 1.3 mm hemispheric lens.  When calibrated, the images are rectified to remove the large radial distortion of the lens.  Note the blurring of the edges of the image, caused by low resolution from that portion of the original image.

 

 

 

 

Target Left Image

Target Right Image

calwin.jpg (73352 bytes)
How It's Done

The Small Vision System software contains a calibration procedure that uses a simple planar calibration target. This procedure is automatic, and works with any set of stereo cameras and lenses, including the MEGA-DCS, or user-supplied stereo rigs.

The calibration procedure shows a dialog that lets the user capture a set of up to 10 stereo pairs with the planar target. The target itself is supplied with the SVS software as a PDF file that can be printed on a standard printer, then pasted onto a flat surface. The image below shows a sample calibration pair.

After acquiring at least five image pairs with the target in different (arbitrary) positions, the calibration algorithm finds corner features automatically for all the targets, and then computes an appropriate set of transformation parameters to correct for internal distortions and the external position of the cameras.