preface

Computer vision, the importance of camera calibration is self-evident, in front of the public number [3D vision Workshop] wrote a number of articles about camera calibration, including a minute of OpenCV camera calibration function calibrateCamera(), learning from scratch “Zhang’s camera calibration method”, but, Today I would like to talk again about camera calibration to further deepen my understanding of its basic methods and concepts.

A basic question

The steps of camera internal and external parameter calibration mainly include:

  1. Consider the camera linear model:

  2. calculatingItem;

  3. Decompose internal and external parameters;

  4. Consider nonlinear terms.

Zhang method: proposed by Zhang Zhengyou, OpenCV and other widely used. Before Zhang’s method, stereoscopic targets were generally used. For stereoscopic targets, it was difficult to calculate the three-dimensional coordinates of their feature points.

Characteristics of Zhang method: use plane targets to strike multiple poses (unknown).

The calibration steps of Zhang method are as follows: (1) Calculate the homography matrix for a pose; (2) There are more than three poses, and linear camera parameters are calculated according to each homography matrix; (3) Nonlinear optimization method is used to calculate nonlinear parameters.

Zhang method

  • Step 1: Solve the homography matrix — the basic equationZhang’s method is characterized by using planar targets to strike multiple poses.

Since the characteristic points are on the plane, we set Z=0 here, then we have the expression in the figure above, and it can also be seen that the homography matrix H is a matrix of 3×3.

So how to solve the homography matrix and establish the internal parameter equation?

Note: since Z=0, it is in the figure aboveNone of these terms are zero.

Corresponding to each pose, the above two equations can be obtained.

  • Step 2: solve the internal parameters — establish the equation

** Note: ** For detailed steps, please refer to Learning OpenCV3.

  • Step 3: Solve external parameters

  • The fourth step (the last step) : solving nonlinear distortion parameters

Note: In Zhang’s method, only radial distortion is considered. In OpenCV and other toolkits, other distortions are considered. Simply speaking, the calculation of distortion parameters is mainly based on the reprojection method.