1. The concept of internal participation in external parameters
In computer vision, especially in the fields of camera calibration and stereo vision, internal parameters and external parameters are very important concepts.They are related to the camera's geometric properties and poses.
Intrinsic Parameters: Intrinsic Parameters are parameters that describe the internal properties of the camera, including focal length, main point (optical center) coordinates, distortion coefficients, etc.Internal references are usually determined at camera calibration because they are usually fixed for a particular camera model and do not change over time.Once the camera internal references are determined, they are usually kept unchanged during the use of the camera.
Extrinsic Parameters: Extrinsic Parameters are parameters that describe the camera's position and posture in the world coordinate system, usually including a rotation matrix and a translation vector.The external parameters may change at different camera positions or shooting moments.For example, in stereo vision, if there are two cameras, their relative positions and directions will change each time the camera is moved, resulting in changes in the external parameters.If the camera does not change in position and direction, such as the camera is fixed in a fixed position, the external parameters may remain unchanged for a long time.However, if the camera's position or direction changes, such as moving the camera or changing the shooting angle, external participation will change accordingly.
2. The meaning of four coordinate systems, the world coordinate system (reference coordinate system) , camera coordinate system, image physical coordinate system and pixel coordinate system.World coordinate system is the coordinates of objects in the real world. For example, the origin of the world coordinate system of the black and white chessboard is fixed at the vertex of the first chessboard, , , , and are perpendicular to each other, and the direction is perpendicular to the chessboard panel.It can be seen that the world coordinate system changes with the size and position of the object, and the unit is a unit of length.As long as the size of the chessboard determines, no matter how the board moves, the coordinates of the corner points of the chessboard generally do not change (because the position relative to the origin of the world coordinate system remains unchanged), and it is considered to be .The camera coordinate system uses the light center as the origin, and is perpendicular to each other with the direction parallel to the image, and is the axis and the axis of the axis. The axis and the axis are parallel to the optical axis, and the axis are parallel to the optical axis, and the axis is perpendicular to each other, and the unit is a unit of length.The physical coordinate system of the image is used to connect the main optical axis and the image plane as the coordinate origin (usually the center of the image). The directions of and are shown in the figure, and the units are units of length.The image pixel coordinate system uses the upper left vertex of the image as the coordinate origin, and the and and directions are parallel to the and directions, and the units are measured in pixels.
World coordinate system is the coordinates of objects in the real world. For example, the origin of the world coordinate system of the black and white chessboard is fixed at the vertex of the first chessboard, , , , and are perpendicular to each other, and the direction is perpendicular to the chessboard panel.It can be seen that the world coordinate system changes with the size and position of the object, and the unit is a unit of length.As long as the size of the chessboard determines, no matter how the board moves, the coordinates of the corner points of the chessboard generally do not change (because the position relative to the origin of the world coordinate system remains unchanged), and it is considered to be .The camera coordinate system uses the light center as the origin, and is perpendicular to each other with the direction parallel to the image, and is the axis and the axis of the axis. The axis and the axis are parallel to the optical axis, and the axis are parallel to the optical axis, and the axis is perpendicular to each other, and the unit is a unit of length.The physical coordinate system of the image is used to connect the main optical axis and the image plane as the coordinate origin (usually the center of the image). The directions of and are shown in the figure, and the units are units of length.The image pixel coordinate system uses the upper left vertex of the image as the coordinate origin, and the and and directions are parallel to the and directions, and the units are measured in pixels.
The camera imaging process generally involves the transformation of four coordinate systems. The transformation relationship is: is the world coordinate system. After rigid body transformation (such as rotation and translation), it becomes the camera coordinate system, and then transforms into the image coordinate system through perspective projection, and finally transforms into the pixel coordinate system through affine transformation.
We consider the simplest small hole imaging model:
For the convenience of analysis, the imaging plane is often processed symmetrically along the small hole (light center) so that the image is no longer inverted, as the plane pointed by the solid blue line in the figure.
3. Camera external parameters
The external parameters matrix is the transformation from the world coordinate system to the camera coordinate system.Since it is a transformation, we can express it as [R t], with the homogeneous form
But so far, it seems that the outer parameter matrix is not seen in the camera matrix.The previous camera matrix is represented as follows:
That's because, in the previous derivation, we default that the world coordinate system and the camera coordinate system overlap.In the small hole imaging model, the coordinates of the spatial point are described as [x y z 1]. The coordinate system of this point is originated in the small hole, and the center of the camera coordinate is also in the small hole. However, in actual application, the world coordinate system and the camera coordinate system often do not overlap, which brings the concept of an external parameter matrix. The figure below shows the situation when the camera coordinate system and the world coordinate system do not overlap. We only know the coordinates of point P in the world coordinate system. Because to use the small hole imaging principle, we want to know the coordinates of point P in the camera coordinate system, and the camera external parameter matrix realizes this transformation.
Are a certain point p in space, which is represented as [xw,yw,zw,1] in the world coordinate system and [xc,yc,zc,1] in the camera coordinate system, then they have the following relationship:
Bring it into the camera matrix expression:
Merge the two matrices on the right of the equation: