## 2 Beidou-Binocular Cooperative Navigation Model
### Binocular Vision Recognition and Perception Module
#### 2.2.2 Main Functional Modules of Binocular Vision  
1. Disparity Calculation and Depth Estimation: One of the core functions of binocular vision is depth estimation based on disparity. After calculating the disparity for each pixel in the left and right images captured by the cameras, the system converts this into depth values. The flowchart of disparity calculation and depth estimation is shown in Figure 2.  
Figure 2: Disparity calculation and depth estimation flowchart. Assuming the intrinsic and extrinsic parameters of the left and right cameras are \(K_{L}\) and \(K_{R}\), respectively, for a point \(\mathbf{P}\) in the scene, the pixel coordinates \(\mathbf{p}_{L}\) and \(\mathbf{p}_{R}\) in the left and right images are  
\[ \begin{cases}\mathbf{p}_{L}=(u_{L},v_{L})=K_{L}\cdot[R_{LR}|\mathbf{t}_{LR}] \cdot\mathbf{P}\\ \mathbf{p}_{R}=(u_{R},v_{R})=K_{R}\cdot[I|\mathbf{0}]\cdot\mathbf{P}\end{cases}  \tag{6}\]  
where \([R_{LR}|\mathbf{t}_{LR}]\) is the rotation and translation matrix of the left camera relative to the right camera, and \(I\) is the identity matrix, representing the coordinate system of the right camera itself. The relationship between disparity \(d\) and depth \(Z\) is  
\[ \begin{cases}Z=\frac{f\cdot b}{d}\\ d=u_{L}-u_{R}\end{cases}  \tag{7}\]  
where \(f\) is the camera focal length, \(b\) is the baseline length of the binocular system, and \(d\) is the disparity. Using depth estimation, the system can generate a dense depth map to describe the three-dimensional information of the entire scene. 2. Object Detection and Semantic Segmentation: This study used the deep learning-based object detection algorithm YOLO and the semantic segmentation algorithm DeepLab to detect and segment key targets and obstacles in the scene. YOLO is a regression-based object detection algorithm that transforms the object detection problem into a regression task for location and category, enabling target detection with extremely high speed and accuracy. Compared to other object detection methods (such as Faster R-CNN), YOLO features single-stage detection, directly generating predictions for object classes and locations from the input image, avoiding the complex process of generating candidate boxes. A schematic of the YOLO algorithm is shown in Figure 3.  
YOLO divides the input image into an \(S\times S\) grid, with each grid responsible for detecting objects that fall within its range. The model outputs the following information:  
* The coordinates of each grid cell's bounding box \((x,y,w,h)\), where \((x,y)\) is the relative position of the bounding box center, and \(w,h\) are the width and height of the bounding box;
* The confidence \(C\) of the bounding box, representing whether the box contains an object and the accuracy of the prediction;
* The probability \(P(c)\) of the object class, used for identifying the object's class. Figure 3: Schematic diagram of YOLO algorithm. The output tensor size of the model is  
\[S\times S\times(B\times 5+C) \tag{8}\]  
where \(B\) is the number of bounding boxes predicted per grid, and \(C\) is the number of object classes. The YOLO loss function consists of three parts: bounding box location loss, confidence loss, and class loss. In the BBCN model, YOLO is primarily used to detect key obstacles in the scene (such as transformers, switch cabinets, etc.). The detected bounding box positions and class probabilities are passed as inputs to the semantic segmentation module and the local path planning module for further obstacle segmentation and avoidance strategy formulation. DeepLab is a powerful semantic segmentation algorithm, capable of partitioning the input image into multiple semantic regions, that is widely used in autonomous driving, robot navigation, and other scenarios. In the BBCN model, DeepLab is used to perform pixel-level obstacle segmentation on the images captured by binocular vision, thereby generating more accurate obstacle information.