# Fast Target Recognition Based on Improved ORB Feature
## 2 ORB Algorithm Principle (Orient Fast and Rotated Brief)
### Feature Point Detection  
Image feature points can be simply understood as more important points in the image, such as contour points, high spots in dark areas, and dark spots in bright areas. The ORB algorithm uses a fast algorithm [22; 23; 24; 25] to find feature points. The core idea of fast is to find out those outstanding points, that is, to compare a point with the surrounding points, and if it is different from most of the surrounding points, it can be selected as a feature point [26].  
\[N=\sum_{x\forall(circle(p))}|I(x)-I(p)|>\varepsilon_{d} \tag{1}\]  
where \(I(x)\) is the grayscale of any point on the circumference, \(I(p)\) is the grayscale of the center, and \(\varepsilon_{d}\) is the threshold value of the gray value difference. If \(N\) is greater than the given threshold value, which is generally three-quarters of the surrounding circle points, \(P\) is considered as a feature point.  
The specific calculation process of fast is as follows: First, select a pixel point P from Figure 1 and judge whether it can be used as a feature point. It is assumed that its gray value is M. Set a suitable threshold value V (for example, 20% of M). When the absolute value of the difference between the gray values of two points is greater than V, then these two points can be considered to be different. Then, taking the pixel point P as the center, select 16 pixels on a circle with a radius of 3. P can be regarded as a corner point if the gray levels of consecutive L points in these 16 pixels are all larger than M + V or smaller than M - V. Here, L is set to 12 and if at least 12 points exceed the threshold, P is considered as a feature point, Otherwise, it is considered that P is not a feature point. To obtain faster results, additional acceleration measures have also been adopted. If four points around the candidate point are tested at 90-degree intervals, at least three points should have enough difference with the gray value of the candidate point; otherwise, the candidate point should not be considered as a feature point without calculating other points. Figure 1 is a schematic diagram of fast feature point extraction.  
Because the fast algorithm cannot detect the direction information of feature points, in the ORB algorithm, the method of establishing a three-layer Gaussian image pyramid is used to increase the scale invariance [27] and the gray centroid method [28] is used to endow feature points with rotation invariance. That is, the coordinate system is established with feature points as the origin, the centroid position is calculated in the neighborhood \(S\), and the vector is constructed with feature points as the starting point and the centroid as the endpoint. The moment of neighborhood \(S\) is  
\[M_{pq}=\sum_{x,y}x^{p}y^{q}I(x,y) \tag{2}\]  
where \(I(x,y)\) is the gray value of the image, \(x,y\in[-r,r]\), \(r\) is the radius of the feature point neighborhood, and \(S\) is the centroid position of the neighborhood:  
\[C=(m_{10}/m_{00},m_{01}/m_{10}) \tag{3}\]  
The orientation of feature points of fast is  
\[\theta=\arctan(m_{01},m_{10}) \tag{4}\]  
To improve the rotation invariance of feature points, it is necessary to ensure that \(x\) and \(y\) are in the circular area of radius \(r\), that is, \(x,y\in[-r,r]\). \(r\) is the neighborhood radius.