# Pointer Meter Reading Recognition Based on YOLOv11-OBB Rotated Object Detection
## 3 Materials and Methods
### Implementation of Meter Pointer Coordinate Mapping by Template Matching
#### 3.2.2 Template Images and Registration Images Matching  
The primary goal of matching the template image with the registration image is to achieve precise correspondence between the template image (Figure 5a) and the registration image at the inspection point (Figure 5b) through an algorithm focused on feature point matching. Following the matching process, an affine transformation-based algorithm generates a transformation matrix, detailing the translation, rotation, and scaling relationships between the template and inspection images. During the detection phase, the real-time inspection image can be correlated with the template image based on the matching results. This correlation allows for the effective elimination of image discrepancies resulting from variables such as shooting angles and illumination conditions. Consequently, this process enhances the accuracy of pointer meter recognition and analysis.  
(1) Image Feature Point Matching and Transformation Matrix Calculation  
Firstly, the registration image is calibrated. An adjustable interactive rectangular marker frame is generated on the registration image based on the distribution of the center points of the rectangular frame in the template image. Spatial correspondence between the template and registration images is established by aligning the positions of corresponding scale markers (Figure 6). This process enables the calibration matching of scale feature points, thereby achieving alignment between the two images.  
Secondly, the spatial correspondence between feature points in the template and registered images is established by utilizing the coordinate array of the center point of the rectangular frame in the template image and the corresponding point set obtained through  
Figure 5: (**a**) Template images; (b) Registration image.  
interactive labeling in the registration image. The RANSAC algorithm is employed to compute the forward (\(M_{1}\)) and the inverse (\(M_{2}\)) transformation matrices, which facilitate the bidirectional projection transformation between the two images. By utilizing the selected matching point pairs and the RANSAC algorithm, the transformation matrices (\(M_{1}\) and \(M_{2}\)) are determined, precisely depicting the spatial transformation relationship between the template and registration images and outlining the procedures for transforming each image into the other. The accuracy and reliability of the matching process are critical for subsequent detection tasks. Discrepancies in image acquisition conditions during the registration process can lead to erroneous matching points and noise interference. The RANSAC algorithm effectively mitigates outliers and noise through random sampling and iterative procedures, thereby enhancing the reliability of transformation matrix estimation. This inherent capability of the RANSAC algorithm minimizes the impact of noise and outliers on the matching process, consequently improving the accuracy and robustness of the overall matching procedure.  
Finally, the center coordinates of the pointer table in the template image are mapped to derive the corresponding center coordinates in the registered image using the forward transformation matrix \(M_{1}\). Key parameters are then updated, incorporating the transformation matrix \(M_{1}\) from the template image to the registered image of the inspection point, the inverse transformation matrix \(M_{2}\) from the registered to the template image, and the center point coordinate parameters of the registered image. These updated parameters are then added to the binary configuration file.  
The registration process establishes a robust correspondence between the registered image and the template image, thereby enhancing the precision and reliability of pointer table recognition and analysis. This approach ensures the method's consistent performance and stability across diverse scenes and environmental conditions.