Geometric calibration of a camera
Introduction
By calibrating the parameters of the lens and image sensors, the distortion of an image can be calibrated to reconstruct the relative position of a camera and objects in the three-dimensional world. It has been widely used in the areas of remote sensing, measurement, etc. The MATLAB provides calibration tool based on the calibration method proposed by Zhang et al. In this project, the crema of a Samsung Galaxy A20 was calibrated by using MATLAB toolbox. The results showed high accuracy in both standard mode and fisheye mode.
Background
The camera calibration process is a transformation process from the 3D world coordinate to the image coordinate system. This process can be artificially divided into two steps: 1) from the 3-D world coordinate system to the 3-D camera’s coordinate system (extrinsic); 2) from the 3-D camera’s coordinate system to the image plane coordinate system (intrinsic).
Extrinsic parameter
The extrinsic parameter is a 3D to 3D transformation, it describes the rotation (R) and translation (t) of the relative position of crema and 3D object.
Intrinsic parameter
The camera can be modeled as a pinhole crema as shown in figure 2. Hence, the intrinsic transformation is to transform from a 3D camera coordinate to 2D image plane coordinate, which can be modeled as K = [fx 0 0|s fy 0|cx cy 1], where fx and fy is the normalized focal length, cx and cy is the optical center of the image, and s is Skew coefficient for non-perpendicular axes case.
Therefore, the calibration process can be mathematically described as: P = [R|t]K.
Distortion The lens distortion in camera contains radical and tangential distortion, which cannot be described by the pinhole camera model. For the radical distortion, the further from the center, the larger the distortion we have, which can be corrected by using Taylor series expansion: xdistorted = x(1 + k1*r2 + k2*r4 + k3*r6); ydistorted= y(1 + k1*r2 + k2*r4 + k3*r6) On the other hand, the tangential distortion origins from the unparallel of the lens and camera sensor plane, which can be corrected by xdistorted = x + [2 * p1 * x * y + p2 * (r2 + 2 * x2)] and ydistorted = y + [p1 * (r2 + 2 *y2) + 2 * p2 * x * y].
Methods
Pattern for calibration The checkerboard pattern is used for MATLAB Camera Calibrator. The pattern was printed on a letter size paper and stick on a hard board to prevent curvature on the pattern. The grid size of the checkerboard pattern is 21.2×21.2mm. The pattern was hold ~50 cm from the camera and was focus by the camera. The camera was not in auto focus mode and the zoom keep constant in the process. Totally 15 images were taken with different orientation relative to the camera. These pictures were shown in figure 2.

