1. Foreword
Binocular stereo vision is based on the principle of parallax, which can obtain three-dimensional geometric information from multiple images. In the machine vision system, two digital images of the surrounding scenery are obtained from different angles by two cameras, or two digital images of the surrounding scenery are obtained from different angles by a single camera at different times. Based on the parallax principle, three-dimensional geometric information of the object can be recovered and the three-dimensional shape and position of the surrounding scenery can be reconstructed.
Binocular vision sometimes we also call it stereopsis, which is the main way for human to obtain the three-dimensional information of environment by using two eyes. At present, with the development of machine vision theory, binocular stereo vision plays an increasingly important role in machine vision research. This post mainly studies the mathematical principle of binocular vision.
2. Mathematical principles of binocular stereo vision
Binocular stereo vision is based on parallax, and three-dimensional information is obtained by trigonometry, that is, a triangle is formed between the image plane of two cameras and the North object. By keeping the position relationship between the two cameras, we can obtain the three-dimensional dimension of the object in the common field of view of the two cameras and the three-dimensional coordinates of the feature points of the space object. Therefore, the binocular vision system is generally composed of two cameras.
2.1 three dimensional measurement principle of binocular stereo vision
The above figure shows a simple head up binocular stereo imaging schematic diagram. The distance between the projection centers of the two cameras is the baseline distance B. Two cameras watch the same feature point P of spatiotemporal objects at the same time, and obtain the image of point P on the "left eye" and "right eye" respectively. Their coordinates are pleft = (xleft, yeleft); right = (xright, yright). If the images of the two cameras are in the same plane, the Y coordinate of the image coordinate of the feature point P must be the same, that is, yeleft = yright = y. From the trigonometric geometry, the following relations can be obtained:
Then the parallax is: dispersion = xleft xright. Thus, the 3D coordinates of the feature point P in the camera coordinate system can be calculated:
Therefore, as long as any point on the image plane of the left camera can find the corresponding matching point on the image plane of the right camera, the 3D coordinates of the point can be completely determined. This method is a point-to-point operation. For example, as long as all points on a plane have corresponding matching points, they can participate in the above operations, so as to obtain the corresponding three-dimensional coordinates.
2.2 mathematical model of binocular stereo vision
Based on the analysis of the most simple three-dimensional measurement principle of head up binocular stereo vision, now we have the ability to consider the general situation. As shown in the above figure, set the left camera o-xyz at the origin of the world coordinate system without rotation, the image coordinate system is ol-x1y1, the effective focal length is FL; the right camera coordinate system is or XYZ, the image coordinate system is or xryr, and the effective focal length is fr. According to the projection model of the camera, we can get the following relationship:
Because the position relationship between the o-xyz coordinate system and the or xryrzr coordinate system can be expressed by the spatial transformation matrix MLR as follows:
Similarly, for the spatial points in the o-xyz coordinate system, the corresponding relationship between the two camera points can be expressed as follows:
Therefore, the three-dimensional coordinates of spatial points can be expressed as
Therefore, as long as we obtain the image coordinates of the left and right computer internal parameters / focal length fr, FL and space points in the left and right cameras through the computer calibration technology, we can reconstruct the three-dimensional space coordinates of the measured points.
Copyright notice: This is the original article of the blogger, following CC 4.0 by-sa copyright agreement. Please attach the original source link and this notice for reprint.
Link to this article: https://blog.csdn.net/du_shuang/article/details/84299314
Contact: Manager Xu
Phone: 13907330718
Tel: 0731-22222718
Email: hniatcom@163.com
Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province