## 2 Position and Heading Estimation Approach Based on Cross-Modal Image Matching
### Fast Coarse Image Matching Based on PCA-HOG  
#### 2.1.1 PCA-HOG Feature Description  
Histogram of oriented gradient (HOG) is a common feature descriptor used in target detection and image matching. HOG is a description based on the statistics of local gradient magnitude and direction, which has good invariability for grayscale variation [22]. However, HOG is very sensitive to the noise distortion since it is formed based on gradient direction, which is easily disturbed by the distortion between cross-modal images.  
To improve the noise reliability, we employ principal component analysis (PCA) to enhance the local gradient orientation. The PCA is typically used to calculate the dominant vectors of a given dataset that can reduce the noise component in signals and estimate the local dominant orientation.  
For each pixel, the PCA can be applied to the local gradient vectors to obtain their local dominant direction.  
Given the original image I with its horizontal derivative image \(A\) and vertical derivative image \(B\), an \(N\times 2\) local gradient matrix is constructed for each pixel:  
\[G=[A^{T}\quad B^{T}] \tag{1}\]  
\[A=\big{\{}a_{1}\quad a_{2}\quad\cdots\quad a_{n}\big{\}},\ B=\big{\{}b_{1} \quad b_{2}\quad\cdots\quad b_{n}\big{\}} \tag{2}\]  
They can be calculated with Sobel calculators [23]. \(N\) is determined by the size of the local window of the PCA calculation. For example, if the size of the window for each pixel is \(3\times 3\), then the value of \(N\) is 9.  
The dominant orientation can be estimated by determining a unit vector \(\mathbf{u}\) perpendicular to the combined direction of the local gradient vectors \(\big{[}a_{i}\quad b_{i}\big{]}^{T}\). Since the production of vectors perpendicular to each other is 0; therefore, this can be formulated as the following minimization problem:  
\[\left\|G^{T}\mathbf{u}\right\|^{2}=\sum_{i=1}^{N}\big{(}[a_{i}\quad b_{i}]\cdot \mathbf{u}\big{)}^{2} \tag{3}\]  
Figure 2: Flowchart of the proposed visual estimator.  
Vector \(\mathbf{u}\) can be solved by applying SVD to the local gradient matrix \(G\):  
\[G=\mathbf{U}\mathbf{S}\mathbf{V}^{T} \tag{4}\]  
where \(\mathbf{U}\) is an \(N\times N\) orthogonal matrix, \(\mathbf{S}\) is an \(N\times N\) matrix, \(\mathbf{V}=\begin{bmatrix}v&u\end{bmatrix}\) is a \(2\times 2\) orthogonal matrix, and \(v\) indicates the local dominant orientation of the local gradient.  
The PCA enhanced structure orientation can be calculated according to the following equation:  
\[\varphi=\frac{1}{2}\angle(u_{1},u_{2}) \tag{5}\]  
where \(\varphi\in[0^{\circ},180^{\circ})\), \(u_{1}\) is the element in the first row of \(u\) and \(u_{1}\) is the element in the second row of \(u\). Note that the structure orientation is orthogonal to the orientation of the gradient vector.  
The orientation enhanced by PCA is more robust against the distortion between cross-modal images than the orientation directly estimated with local gradient. Figure 2(a),b shows two examples of comparing gradient orientation and PCA enhanced ordination. Clearly, PCA enhanced ordination is more stable under the cross-modal distortion.  
Figure 3: Examples of comparing gradient orientation and PCA-enhanced ordination. The numbers in the top right of the image indicate the orientation maps or the descriptions that are extracted from the enlarged subareas from the cross-modal image pairs provided in Figure 1.  
The PCA-HOG description is a feature vector, which is calculated at each pixel of image. The PCA-HOG description and the HOG description [22] are calculated in the same procedure, except that the local gradient orientation is replaced by the PCA enhanced orientation. The examples of comparing PCA-HOG and HOG are provided in Figure 3c,d. We can see that cross-modal distortion causes more significant change to the patterns of HOG descriptor compared with the patterns of PCA-HOG descriptor.