## 3 Methods
### Visual Relocalization in Autonomous Vehicles
Although the depth formula is mathematically simple, its practical computation is often challenging due to the difficulty in accurately locating the corresponding points between the two images. MonSter introduces a dual-branch depth estimation framework that integrates monocular depth estimation and stereo matching based on 3D point clouds. It is designed to handle complex and structured scenes with improved stability and accuracy. The framework consists of two main components: one branch for monocular depth estimation and another for stereo matching based on 3D point clouds. The monocular branch estimates depth using high-resolution image features and semantic information, while the stereo branch compensates for the scale drift commonly found in traditional monocular methods by incorporating geometric constraints and image correspondences. MonSter effectively fuses geometric and photometric information through structural guidance and dual-branch optimization, establishing a coarse-to-fine depth estimation pipeline. This method addresses issues such as depth ambiguity, low-texture regions, and  
Figure 3: Diagram of the Stereo Camera Structure. occlusion, which frequently occur in long-range scenes or when key targets are missing, thereby significantly enhancing the robustness of stereo matching. By improving accuracy, stability, and reliability, MonSter offers an effective solution for depth sensing. To compute disparity from stereo image pairs, this study utilizes the MonSter network. Given that the stereo camera is pre-calibrated, the disparity values can be accurately converted into depth information using the calibration parameters and corresponding equations. The resulting depth data are then stored in a database to enable efficient retrieval and utilization during subsequent 3D coordinate reconstruction. 4 Feature Matching;  
After obtaining the most similar matching image \(I_{k}\) to the input image \(I_{q}\), the next step is to establish the correspondence between the image pair to perform pose estimation. Traditional methods generally involve extracting local feature points from both the input and matching images to identify their correspondences. The relative pose is subsequently computed using epipolar geometry. Finally, the global pose of the matching image in the world coordinate system is used to infer the pose of the input image within the same global coordinate system. However, the relative pose calculated using traditional methods often exhibits substantial deviations. To address this issue, we adopt a deep learning-based feature matching approach. Specifically, for the image pair \(I_{q}\) and \(I_{k}\), we perform feature matching using the integrated feature matching model framework proposed in this paper. This approach enhances both the accuracy of feature matching and the precision of pose estimation. 5 Pose Estimation;  
For the visual relocalization task, the query image \(I_{q}\) is matched with candidate images \(I_{k}\), retrieved by a neural network, through feature point matching. By performing feature matching and filtering, a stable set of correspondences \(P_{q}^{f}\) and \(P_{k}^{f}\) is obtained. For each retrieved image \(I_{k}\), which is associated with a depth map \(I_{k-depth}\) and a known camera pose \(T_{nc}^{k}\) in the world coordinate system, the matched points \(P_{k}^{f}\) can be transformed into their corresponding \(P_{w}\) 3D world coordinates using the pinhole camera model. The transformation is defined as:  
\[P_{w}=z_{k}T_{wc}^{k}K^{-1}P_{k}^{f}, \tag{4}\]  
where \(z_{k}\) denotes the depth value of the matched pixel \(P_{k}^{f}\) in the depth map, and \(K\) is the intrinsic parameter matrix of the camera used to capture the image. From the obtained 2D-3D feature correspondences, valid correspondences with depth values are first selected from \(I_{k}\), yielding a candidate set of \(N^{depth}\) points for subsequent pose estimation.