# Improved Design of LNG Marine Loading Arm Docking Method Based on TRIZ Theory
## 4 Innovative Design of Problem-Solving Method Based on TRIZ
### Innovative Design of Information Collection
#### 4.2.2 Obtaining the Coordinates of the Target  
Using a binocular camera to capture two images of the same object simultaneously, the deviation of the target on the two images is calculated based on the principle of triangle approximation. This is used to obtain depth information, which is then used to calculate the three-dimensional coordinates in space. The principle of image depth calculation is shown in Figure 8. The binocular camera has two focal lengths, \(f\), with \(O_{L}\) and \(O_{R}\) representing the optical centers of the left and right cameras, respectively. \(O_{L}Z_{L}\) and \(O_{R}Z_{R}\) represent the optical axes of the left and right cameras, respectively, with both axes being parallel  
Figure 6: Results of target region extraction.  
Figure 7: Final target contour diagram.  
and separated by a distance of \(b\). The point \(P\) represents the center of the target, with coordinates \(P(X_{c},Y_{c},Z_{c})\) in the coordinate system \(X_{L}O_{L}Y_{L}Z_{L}\), with the left camera's optical center as the origin. \(X_{l}O_{l}Y_{l}\) represents the imaging plane of the left camera, while \(X_{r}O_{r}Y_{r}\) represents the imaging plane of the right camera. The imaging points of point \(P\) on the two imaging planes are \(p_{1}(x_{1},y_{1})\) and \(p_{2}(x_{2},y_{2})\).  
Using the similar triangle principle, the coordinates of \(p_{1}(x_{1},y_{1})\) and \(p_{2}(x_{2},y_{2})\) can be related to \(P(X_{c},Y_{c},Z_{c})\) as follows:  
\[\begin{cases}X_{c}=\frac{b\cdot x_{1}}{x_{1}-x_{2}}\\ Y_{c}=\frac{b\cdot y_{1}}{x_{1}-x_{2}}\\ Z_{c}=\frac{b\cdot f}{x_{1}-x_{2}}\\ \end{cases} \tag{1}\]  
According to the formula, the three-dimensional coordinates of the target can be obtained by calculating the coordinates of points \(p_{1}\) and \(p_{2}\) on the imaging plane. As the target is a circular pipe opening, it is a symmetrical figure at its center, regardless of the angle chosen. Hence, the graphical moment method was employed to calculate the target center coordinates [21; 22; 23]. The final result is presented in Figure 9. The pixel coordinate \((x,y)\) is represented by \(f(x,y)\), which corresponds to the gray value. The zero-order moment and first-order moment of the graph can be, respectively, expressed as  
\[m_{00}=\iint f(x,y)dxdy \tag{2}\]  
\[\begin{cases}m_{10}=\sum_{x}\sum_{y}xf(x,y)\\ m_{01}=\sum_{x}\sum_{y}yf(x,y)\\ \end{cases} \tag{3}\]  
Figure 8: Schematic diagram of the image depth calculation.  
Figure 9: The center of the target image.  
The coordinates of the target center in the image can be expressed as follows:  
\[\begin{cases}x_{\ p}=\frac{m_{10}}{m_{00}}\\ y_{\ p}=\frac{m_{01}}{m_{00}}\end{cases} \tag{4}\]  
By utilizing Equation (5), the coordinates of the object in the image are transformed into the coordinates of the camera imaging plane. The value of \((x_{1}-x_{2})\) is then calculated and substituted into Equation (1), which enables the determination of the three-dimensional coordinates of the target center.  
\[\begin{bmatrix}x_{\ p}\\ y_{\ p}\\ 1\end{bmatrix}=\frac{1}{Z_{c}}\begin{bmatrix}f&0&0\\ 0&f&0\\ 0&0&1\end{bmatrix}\begin{bmatrix}X_{c}\\ Y_{c}\\ Z_{c}\end{bmatrix} \tag{5}\]