## 3 Improved ORB-Based Matching Method for Pose Estimation
### ORB Detector and Improved Matching Technique  
Before pose estimation, the keypoints coordinates on both the image \(p(u,v)\) and in the real world \(P_{c}(x_{w},y_{w},z_{w})\) are needed to be known prior to the estimation. A feature matching method performs well on obtaining keypoints. There are many feature matching techniques that have proved to be remarkably successful for machine vision applications. The Scale-Invariant Feature Transform (SIFT) keypoint detector and descriptor is widely used in visual features applications, and has proved to be quite successful [16]. However, this technique requires high computation cost. The Oriented FAST and Rotated BRIEF (ORB) show good performances and low computation costs in keypoint detection [11; 17]. ORB utilizes the Feature from Accelerated Segment Test (FAST) to extract keypoints.  
Figure 3: System layout of the pinhole camera model.  
distances between descriptors separated, resulting in better performance of the matching task based on Hamming distances.  
Robust matching of keypoints is the key step for this computer vision problem, aiming to extract keypoints from the captured image to their corresponding points in a reference image [22]. In the traditional matching method, all the keypoints of the reference model are considered as the candidate points for a keypoint in the scene image. Unfortunately, too many keypoints with a similar descriptor will increase the number of incorrect correspondences. This paper presents an improved matching algorithm based on a spatial consistency searching method to determine the correct correspondences. Moreover, the iterative reprojection error minimization algorithm is proposed to discard incorrect correspondences.  
The batteries are printed with the same pattern and the pose of batteries does not vary much since the electric automobile pulls up in the guide channel. Therefore, the distribution of the keypoints on the battery is similar. Before keypoints matching, the coordinates of the keypoints are rotated by Varimax rotation for spatial consistency, given by:  
\[X_{rotation}=X*V \tag{11}\]  
where \(X=\left[\overset{\rightarrow}{u}^{T},\overset{\rightarrow}{v}^{T}\right]\) is the keypoint coordinate, and \(V\) is the varimax rotational matrix, which is given by,  
\[[V,D]=\mathit{eig}(X_{m}{}^{T}X_{m}) \tag{12}\]  
where the algorithm \(\mathit{eig}\) produces the matrices of eigenvectors \(V\) and eigenvalues \(D\) of matrix \(X_{m}^{T}X_{m}\). The eigenvalues of matrix \(D\) should be in reverse order, and the matrix \(X_{m}\) is zero-centered with the following equation:  
\[X_{m}=\left[\overset{\rightarrow}{u}^{T}-\mathit{mean}(\overset{\rightarrow }{u}),\overset{\rightarrow}{v}^{T}-\mathit{mean}(\overset{\rightarrow}{v})\right] \tag{13}\]  
As shown in Figure 5, the center point \(C_{s}\) of scene image and center point of the reference model \(C_{m}\) can be easily obtained. For every keypoint in the scene image, it is important to determine the corresponding searching cluster in the reference image to narrow the search area. The searching area is restricted to a circle area with radius of \(R\) according to the spatial consistency \(\overset{\rightarrow}{P1}\!\!Cs=\mathit{C}\overset{\rightarrow}{c1}\!\!Cm\), where \(C_{1}\) is the corresponding cluster center point for keypoint \(P_{1}\).  
Figure 5: Keypoints matching based on spatial-consistency; corresponding searching cluster of every keypoint in scene image is restricted to a circular areal according to the spatial consistency \(\overset{\rightarrow}{P1}\!\!Cs=\mathit{C}\overset{\rightarrow}{c1}\!\!Cm\).