Table of contents
1. Four coordinate systems for camera calibration
1.3 Image plane 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 , image Plane coordinate system , pixel coordinate system .
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 Cartesian three-dimensional coordinate system established with any point in space as the origin.
1.2 Camera coordinate system
The camera coordinate system is 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 established at the optical center of the camera, the axis is the optical axis of the camera, and the direction is outward. The plane is perpendicular to the camera optical axis, and the 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 of the camera coordinate axis and the image plane, and the axes and axes are parallel to the axes and axes of the camera coordinate system, respectively. The distance between the origin of the image plane coordinate system and the origin of the camera coordinate system is the focal length of the camera .
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 is established on the upper left corner of the image plane, the axis is parallel to the axis of the graphics plane coordinate system , and the axis is parallel to the axis of the graphics plane coordinate system . Therefore, the coordinates represent the row and column of the pixel in the pixel matrix, respectively.
2. Conversion relationship between coordinate systems
The transformation from the world coordinate system of a three-dimensional point in space to the pixel coordinates of its corresponding projected point on the image plane can be divided into three transformations, as shown in Figure 2.
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 are , then the relationship between the world coordinates of the point and the camera coordinates can be expressed as:
Among them, is the matrix of the rotation matrix ; is the matrix of the translation matrix .
2.2 Transformation between camera coordinate system and image plane coordinate system
Since the axes and axes of the camera coordinate system are parallel to the axes and axes 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.
The relationship between the camera coordinates of a point and the image plane coordinates of its corresponding projected point is:
Among them, is 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 . The relationship between the image plane coordinates of the projection point corresponding to the three-dimensional point and its pixel coordinates is:
Wherein, is the physical size of the pixel in the axial direction of the image plane coordinate system , and is the physical size of the pixel in the axial direction of the image plane coordinate system .