# Research on Automatic Recognition Method of Artificial Ground Target Based on Improved HED
## 3 Research on Automatic Target Recognition Algorithm Based on Geometric Primitives of Line Groups
### Determination of Homonymous Points by Geometric Primitives of Line Groups  
According to the property that the area ratio of any two triangles in affine transformation was affine invariant, four lines on the target image were selected to form a geometric primitive. These lines were arranged according to the angle with the positive direction of the \(x\)-axis from small to large through the line equation, and the triangle area ratio between the lines was used to describe the line group. There are four kinds of triangles composed  
Figure 11: Result of edge detection. (**a**) Original airport image 1; (**b**) the algorithm in this paper airport image; (**c**) original road image 2; (**d**) the algorithm in this paper road image 2.  
of four straight lines. The area of the four triangles was calculated, the maximum area of the four area values was recorded as \(S_{max}\) and the four area values with \(S_{max}\) as the benchmark were normalized to obtain the eigenvectors \([L_{1},\ L_{2},\ L_{3},\ L_{4}]\) of the line group, where \(L_{i}=S_{i}/S_{max}\). Then this feature vector was used to measure the correspondence between the line groups. In this paper, the Euclidean distance between the feature vectors of the two target line groups was used to measure the similarity between the geometric primitives of the two line groups. If the feature vector of the template was \([L_{1}^{0},\ L_{2}^{0},\ L_{3}^{0},\ L_{4}^{0}]\), and the feature vector of the real-time graph was \([L_{1}^{1},\ L_{2}^{1},L_{3}^{1},\ L_{4}^{1}]\), then the Euclidean distance between them was as follows:  
\[d=\sqrt{\left(L_{1}^{0}-L_{1}^{1}\right)^{2}+\left(L_{2}^{0}-L_{2}^{1}\right) ^{2}+\left(L_{3}^{0}-L_{3}^{1}\right)^{2}+\left(L_{4}^{0}-L_{4}^{1}\right)^{2}} \tag{3}\]  
The value with the smallest difference between the two feature vectors was taken as the best line group. After finding the best matching line group, the intersections of different lines in the line group were used as the homonymous points to calculate the affine transformation matrix between the two target images. Each line was matched one by one to determine the intersection of the lines. After calculating the one-to-one correspondence of the lines, the homonymous points between the target template and the real-time graph could be obtained. The intersection coordinates of each line were set in the template line group as \(M1\), and the intersection coordinates of the corresponding lines in the real-time graph were set as \(M2\), and then the relationship between them is shown in the formula, where \(H\) was the affine transformation matrix between the template graph and the real-time graph:  
\[M_{2}=H*M_{1} \tag{4}\]  
Through the affine transformation Formula 3 of the two images, we know that:  
\[\left\{ \begin{matrix}xt=a_{11}x+a_{12}y+t_{x}\\ yt=a_{21}x+a_{22}y+t_{y}\end{matrix} \right. \tag{5}\]  
Two linear equations could be listed through a pair of matching points of two images, so at least three pairs of non-collinear matching points were required to calculate the affine transformation matrix H. Then the target could be positioned in the real-time image to achieve the effect of automatic target recognition. From Figures 13 and 14, through a group of visible light images and two groups of infrared and visible light template images, the target recognition algorithm verification  
Figure 12: Extract main straight lines through Hough transform. (**a**) Airport image 1 extracting lines; (**b**) Road image 2 extracting lines. experiment was carried out. The experimental analysis shows that the algorithm in this paper and the SURF algorithm can accurately identify the target in visible light image target recognition, but the algorithm in this paper is obviously superior to the SURF algorithm in infrared and visible light heterogenous image recognition. The matching error is less than 10 pixels, which is determined as the correct recognition target. The image recognition rate is the ratio of the number of correctly recognized images to the total number of images.