Camera Calibration Basics--Related Coordinate System

Table of contents

1. Four coordinate systems for camera calibration

1.1 World coordinate system

1.2 Camera coordinate system

1.3 Image plane coordinate system

1.4 Pixel coordinate system

2. Conversion relationship between coordinate systems

2.1 Transformation between world coordinate system and camera coordinate system

2.2 Transformation between camera coordinate system and image plane coordinate system

2.3 Transformation of image plane coordinate system and pixel coordinate system


1. Four coordinate systems for camera calibration

As shown in Figure 1., in order to better describe and calculate the relationship between the pixel points on the image and the three-dimensional points in the space during the camera calibration process, four coordinate systems are first defined: world coordinate system, camera coordinate system O_w-X_wY_wZ_w, O_c-X_cY_cZ_cimage Plane coordinate system o'-xy, pixel coordinate system o-uv.

Figure 1. Four coordinate systems for camera calibration

 

1.1 World coordinate system

The purpose of setting the world coordinate system is to uniformly describe the position of objects in the real 3D world, including the position of the camera, the position of the feature target, etc. In practical applications, the world coordinate system is a O_wCartesian three-dimensional coordinate system established with any point in space as the origin.

1.2 Camera coordinate system

The camera coordinate system O_c-X_cY_cZ_cis also a Cartesian coordinate system. The camera coordinate system is the key medium between spatial three-dimensional information and two-dimensional image information. As shown in Figure 1, the origin is O_cestablished at the optical center of the camera, Z_cthe axis is the optical axis of the camera, and the direction is outward. X_cO_cY_cThe plane is perpendicular to the camera optical axis, and X_cthe axis is parallel to the transverse direction of the image plane.

1.3 Image plane coordinate system

The image plane coordinate system is used to describe the position coordinates of feature points on the image plane, and the coordinate unit is generally millimeters. As shown in Figure 1, the image plane coordinate system is a two-dimensional coordinate system established on the image plane. The origin of the coordinates is the intersection point o'of the camera coordinate Z_caxis and the image plane, and xthe axes and yaxes are parallel to X_cthe axes and Y_caxes of the camera coordinate system, respectively. The distance between the origin of the image plane coordinate system o'and the origin of the camera coordinate system is the focal length of the camera .O_cf

1.4 Pixel coordinate system

The image collected by the camera is generally a two-dimensional digital image, which is stored in the form of a pixel matrix, and each element is the image gray value of the pixel. The image plane coordinate system is used to describe the position coordinates of the image point on the image plane, and the pixel coordinate system describes the position of the point in the pixel matrix. As shown in Figure 1, the pixel coordinate system is established on the image plane, the coordinate origin ois established on the upper left corner of the image plane, uthe axis is parallel to the axis of the graphics plane coordinate system x, and vthe axis is parallel to the axis of the graphics plane coordinate system y. Therefore, the coordinates (u,v)represent the row and column of the pixel in the pixel matrix, respectively.

2. Conversion relationship between coordinate systems

The transformation from Pthe world coordinate system of a three-dimensional point in space to the pixel coordinates of (X_w,Y_w,Z_w,1)^Tits corresponding projected point on the image plane can be divided into three transformations, as shown in Figure 2.p(u,v,1)^T

Figure 2. Transformation between world coordinates and pixel coordinates

2.1 Transformation between world coordinate system and camera coordinate system

The transformation between the world coordinate system and the camera coordinate system, both of which are three-dimensional coordinate systems, can be described using a rotation matrix and a translation matrix. Assuming that the camera coordinates of a three-dimensional point in space Pare (X_c,Y_c,Z_c,1)^T, then the relationship between the world coordinates of the point and the camera coordinates can be expressed as:

\left [ \begin{matrix} X_c\\ Y_c\\ Z_c\\ 1 \end{matrix}\right ]=\left [ \begin{matrix} R & t \\ 0 & 1 \end{matrix} \right ] \left [ \begin{matrix} X_w\\ Y_w\\ Z_w\\ 1 \end{matrix} \right ]

 Among them, Ris 3\times 3the matrix of the rotation matrix ; tis 3\times 1the matrix of the translation matrix .

2.2 Transformation between camera coordinate system and image plane coordinate system

Figure 3. Schematic diagram of transformation between camera coordinate system and image plane coordinate system

 

X_cSince the axes and axes of the camera coordinate system are parallel to the axes and Y_caxes of the image plane coordinate system respectively , there is only a proportional relationship between the camera coordinates of a point and the image plane coordinates of the corresponding image projection point , and this proportional relationship is related to the focal length of the camera and point coordinates.xyP(X_c,Y_c,Z_c,1)^Tp(x,y,1)^TfPZ_c

PpThe relationship between the camera coordinates of a point and the image plane coordinates of its corresponding projected point is:

s\left [ \begin{matrix} x\\ y\\ 1 \end{matrix} \right ]=\left [ \begin{matrix} f & 0 & 0 & 0\\ 0 & f & 0 & 0\\ 0 & 0 & 1 & 0 \end{matrix} \right ]\left [ \begin{matrix} X_c\\ Y_c\\ Z_c\\ 1 \end{matrix} \right ]

 Among them, sis the scale factor, not 0.

2.3 Transformation of image plane coordinate system and pixel coordinate system

The origin of the image plane coordinate system is the projection point of the optical axis on the image plane, assuming that the coordinates of this point in the pixel coordinate system are (u_0,v_0). The relationship between the image plane coordinates of Pthe projection point corresponding to the three-dimensional point and its pixel coordinates is:p

\left [ \begin{matrix} u\\ v\\ 1 \end{matrix} \right ]=\left [ \begin{matrix} \frac{1}{dX} & 0 &u_0 \\ 0 & \frac{1}{dY} &v_0 \\ 0& 0 &1 \end{matrix} \right ]\left [ \begin{matrix} x\\ y\\ 1 \end{matrix} \right ]

Wherein, is the physical size of the pixel in the axial direction dXof the image plane coordinate system , and is the physical size of the pixel in the axial direction of the image plane coordinate system .xdYy

 

Guess you like

Origin blog.csdn.net/panpan_jiang1/article/details/126790328