In-camera parameter matrix in computer vision and graphics "turn"
In computer vision and graphics, there is the concept of "in-camera parameter matrix", the meaning is roughly the same, but in the actual use of the process, the two matrices are very far apart. In augmented reality, in order to make computer-drawn virtual objects and real environment images, it is necessary to match the internal parameters of the virtual camera with the internal parameters of the real camera. Therefore, it is important to understand the detailed meanings and algorithms of these two internal parametric matrices.
In computer vision, the in-camera parameter matrix can be expressed as:
Where f is the focal length of the camera, the unit is generally mm,dx,dy for the cell size,u0,v0 for the image center. It can be calculated that the camera's longitudinal field of view angle is:
h is the longitudinal pixel value of the image, and the transverse field of view can be deduced similarly.
In computer vision, the parameter matrix in the camera is generally also called the projection matrix, and its values are not identical in different rendering engines, this article only explains the situation in XNA. In XNA, Matrix.createperspectivefieldofview (Floatfieldofview, float aspectratio, float nearplanedistance, float) are generally used Farplanedistance) to generate a projection matrix. Among them, the Fieldofview is the camera's longitudinal (not transverse) field of view (not the half-view field angle), the aspectratio is the aspect ratio, the nearplanedistance,farplanedistance is the inlet and the far shear surface respectively. The resulting matrix can be expressed as:
which
。
In summary, the key factor in contacting two matrices is the longitudinal field of view and aspect ratio.
In-camera parameter matrix in computer vision and graphics "turn"