Hydraulic Filter,Hydraulic Oil Filter,Hydraulic System Filter,Hydraulic Filtration Unit HUAIAN YATAI HYDRAULIC MACHINERY CO., LTD , https://www.yataihydraulic.com
Why do camera calibration? What you want to know is here!
One of the basic tasks of computer vision is to calculate the geometric information of objects in three-dimensional space from the image information acquired by the camera, and thereby reconstruct and recognize the object, and the three-dimensional geometric position of a point on the surface of the space object is between its corresponding point in the image. The interrelationship is determined by the geometric model of the camera image, which is the camera parameter.
Under most conditions, these parameters can be obtained through experiments and calculations. Whether in image measurement or machine vision applications, the calibration of camera parameters is a very critical part. The accuracy of the calibration results and the stability of the algorithm directly affect the accuracy of the results produced by the camera.
So what is the geometric model of camera imaging? Let's start with the simplest zhen hole camera model. First, let's recall the small hole imaging experiment in junior high school physics.
Using a plate with a small hole to block the screen and the object, the image will form an inverted image of the object. We call this phenomenon a small hole imaging. Moving the middle panel back and forth will change the size of the image.
The model of small hole imaging can be seen as the basis of the zhen hole camera model.
As shown in the figure above, the camera coordinate system is OC-XC-YC-ZC, OC is the camera's optical center, and the ZC axis is pointing to the front of the camera. A point P in the real world, after being projected by the small hole OC, falls on the physical imaging plane o'-xy (also called the image plane coordinate system), and is called the image point P'.
Camera coordinates to image coordinates
For the convenience of description, we will later symmetry the zhen hole camera model, as shown in the following figure, from a mathematical point of view, they are equivalent.
Assume that the coordinates of P in the camera coordinate system are [Xc, Yc, Zc]T, P' is [x, y]T, and the focal length is f. According to similar triangles there are:
Image coordinate system to pixel coordinates
At this time, unlike the previous coordinate system transformation, there is no rotation transformation, but the coordinate origin positions are inconsistent, and the sizes are inconsistent, then the telescopic transformation and the translation transformation are designed.
World coordinates to camera coordinates
The transformation from the world coordinate system to the camera coordinate system belongs to the rigid body transformation, and only the rotation translation is required, and the expansion and transformation does not occur.
The coordinate system transformation between objects can represent the rotation transformation of the coordinate system plus the translation transformation, and the transformation relationship between the world coordinate system and the camera coordinate system is also the same. Rotating different angles around different axes yields different rotation matrices. as follows:
Then you can get the coordinates of point P in the camera coordinate system:
At this point we have learned about the geometric models of the cameras. The parameters of these geometric models are the camera parameters.
Lens distortion
For radial distortion, since they all increase with increasing distance from the center, a polynomial function can be used to describe the change in coordinates before and after distortion:
In the above equation, for the center of the image with less distortion, the distortion correction mainly acts as k1; for the edge region with larger distortion, mainly k2 acts. Depending on the lens used, the appropriate correction factor can be used as appropriate.
For tangential distortion, the other two parameters p1, p2 can be used for correction:
In summary, we need a total of five distortion parameters (k1, k2, k3, p1, p2) to describe the lens distortion.
In the zhen hole camera model, as long as the camera parameters and distortion parameters are determined, the zhen hole camera model can be determined. This process is called "camera calibration".
Once the camera structure is fixed, including the fixed lens structure and the focus distance is fixed, we can use these parameters to approximate the camera. The accuracy of the camera parameter calibration results directly affects the accuracy of the results produced by the camera. Therefore, good camera calibration is an important prerequisite for follow-up work.
This article belongs to the original article, if you need to reprint, please specify Hangzhou Blue Core Technology Co., Ltd.