ECOVI | Computer Vision

L3.1: Stereo calibration

Calibration of two cameras in stereo configuration

Stereo geometry

From Wikipedia, the free encyclopedia: A stereo camera is a type of camera with two or more lenses with a separate image sensor or film frame for each lens. This allows the camera to simulate human binocular vision, and therefore gives it the ability to capture three-dimensional images, a process known as stereo photography.

The basic phenomenon, which allows for calculation of distance based on two shifted pictures is parallax - the same point in space, observed from different points of view, will have different position on the picture. To make the calculations easier, we may assume, that both imaging planes are parallel (optical axes are parallel) and both cameras have the same orientation. In this case point in space is mapped on both images on the same horizontal line (in general case those are called epipolar lines).

The important parameters of the stereo system are presented on the picture below.

Stereo calibration

In order to be able to retrieve 3D information from pairs of stereo images it is necessary to know the intrinsic parameters of each camera (i.e. f and c, described also during first tutorial) as well as extrinsic parameters of the system (i.e. position of one camera relative to the other). In real world applications it is impossible to have perfectly aligned cameras, so extrinsic parameters contain both translation and rotation between cameras.

Use Stereo Calibrator App to calibrate both intrinsic and extrinsic parameters.

Stereo rectification

When two cameras are calibrated, it is possible to simulate perfect parallel cameras, using the process called rectification. Given two images and stereo parameters, pictures are transformed in such a way, that for a given point in space, its y coordinate is the same in both pictures.

You can view the rectified pictures in after calibrating stereo camera by clicking on the “Show rectified” button. Horizontal lines can be treated as guides to check, whether the calibration was successful and the corresponding points are really on the same line.

Export parameters

After calibration export the parameters to Matlab. Following tasks require those parameters to be known.

Dataset