## 2 Principle
### Principle of Binocular 3D Measurement Based on Fringe Projection and Phase Matching  
An ideal binocular vision system is composed of two cameras. As shown in Figure 2a, \(O_{l}\) and \(O_{r}\) are the optical centers of the left and right cameras, respectively, and their connecting line is called the baseline. \(Z_{l}\) and \(Z_{r}\) are the optical axes of the two cameras, respectively. Ideally, they are parallel to each other [25]. The point \(P(X_{W},Y_{W},Z_{W})\) is imaged at the position of \(p_{l}\) in the left image pixel coordinate system and \(p_{r}\) in the right image pixel coordinate system, and these two points are called a pair of homonymous points. Similar to the process of human eye imaging, the binocular stereo vision model uses the parallax to calculate the height of objects. Figure 2b shows the schematic diagram of the calculation process of \(z\) on the \(o\)-\(xz\) plane in the ideal system. This is assuming that the effective focal length of two cameras is \(f\), and the row coordinate values of the point \(P\) in the image plane of two cameras are, respectively, \(u_{l}\) and \(u_{r}\). According to the triangle similarity of \(PO_{l}O_{r}\) and \(Pp_{l}p_{r}\), the proportional relationship between the baseline distance \(b\) and the height \(z\) in the left camera coordinate system can be listed as follows:  
\[\frac{b}{z}=\frac{b-K_{l}-K_{r}}{z-f} \tag{1}\]  
in which \(K_{l}\) and \(K_{r}\) are the distance between the principal point and the image point in two cameras, respectively. From the camera model, it is known that the image pixel coordinate system takes the upper left corner as the origin coordinate. Assuming that the number of columns in the left and right images is \(W\), and the optical axis passes through the center of the imaging plane, the relationship between \(u_{l}\) and \(K_{l}\) can be expressed as \(K_{l}=u_{l}-W/2\)  
Figure 2: Principle of binocular vision: (**a**) ideal model of binocular vision; (**b**) schematic diagram of parallax calculation. Similarly, the relationship between \(u_{r}\) and \(K_{r}\) can be obtained as \(K_{r}=u_{r}-W/2\), which can be substituted into Equation (1) for the following equation:  
\[\frac{b}{z}=\frac{b-\left(u_{l}-\frac{W}{2}\right)-\left(\frac{W}{2}-u_{r} \right)}{z-f}=\frac{b-\left(u_{l}-u_{r}\right)}{z-f} \tag{2}\]  
where \(b\) is the baseline length of the measurement system, and the difference of \(u_{i}-u_{r}=d\), the disparity used for height reconstruction. The expression of height \(z\) with respect to disparity \(d\) can be obtained by:  
\[z=\frac{b\cdot f}{u_{l}-u_{r}}=\frac{b\cdot f}{d} \tag{3}\]  
Similarly, the expression for the space point \(P\) in the \(x\) and \(y\) directions in the left camera coordinate system can be obtained according to the triangular relationship:  
\[x=\frac{b\cdot u_{l}}{d},y=\frac{b\cdot v_{l}}{d} \tag{4}\]  
The baseline \(b\) and focal length \(f\) are the parameters of the binocular system, which can be obtained through the system calibration process with known size feature points. However, in the process of installing the left and right cameras, one cannot see the optical axis, so there is a certain angle between the optical axes of two cameras, and it is necessary to calculate 3D point coordinates in combination with the camera calibration and the stereo calibration [26; 27]. The binocular measurement system, based on phase matching, takes the phase information as the bridge to guide the matching of homonymous points. On the basis of the original binocular vision system, a structured light projector is added as shown in Figure 3. By projecting encoded fringes onto the measured object, the deformed fringes images are obtained by the two cameras, respectively. In this paper, the Fourier fringe analysis method [28] is used to extract their phase information from the single deformed fringe obtained by the monocular camera, respectively. Due to the different shooting angle and field of view, the phase distributions in the two images are also different.