5.5. Intrinsic camera parameters calibration

In order to map the camera coordinates to pixel coordinates (to map virtual objects in the real world), we need to find the intrinsic camera parameters. The following image shows a representation of the elements involved in a camera calibration.

Intrinsic camera parameters calibration

Fig. 5.4 Intrinsic camera parameters calibration

Intrinsic parameters include:

  • Scale factor (often equal to 1)

  • Focal length (distance between the centre of projection an the image plane)

  • principal point (assume pixel 0,0 to be at the centre of the image)

  • Skew (when the principal point is not exactly at the centre of the image plane)

  • Geometric distortion (due to the lens).

Assuming the following pinhole camera model:

Pinhole model

Fig. 5.5 Pinhole model

To map a 2D point (u,v) to a 3D point (X,Y,Z) the following equation needs to be solved:

../_images/camera_eq1.png

Where s is the scaling factor, [R t] the extrinsic camera parameters (R the rotation and t the translation of the camera to the world frame) and K corresponds to the intrinsic camera parameters, and is defined as follows:

../_images/camera_eq2.png

Where f is the focal length, m the scaling factor in x and y (usually 1) and (u,v) the principal point.

The general idea to solve this equation is to take several images of a particular pattern (e.g., chessboard) from different positions and extract features from the images (e.g., corners or dots). Then, the equation can be solved in order to find the camera parameters.

Behnam Asadi provides a couple of good videos explaining how to find the intrinsic camera parameters (until min. 16.36):

and also a clear explanation on Zhang’s method [Zhang2000], which is the most widely used:

5.5.1. Calibration Exercise

As part of our Medical Image Computing Summer School we wrote a new tutorial where you can calibrate your laptop webcam, using your mobile phone, perfect for remote learning, or completing this part at home!

Follow this link: Camera Calibration.

5.5.2. Helpful Hint

Never use a symmetrical chessboard, or symmetrical calibration pattern.

All calibration software detects patterns, such as chessboard corners, in the captured 2D images. If your image processing routine gets confused and for some pictures swaps rows and columns in any way, you will get poor calibration results, and it’s hard to spot!!!

Points must be uniquely identifiable.