An Improved ORB Feature Extraction Algorithm

In this paper, an improved ORB feature extraction algorithm is proposed to solve the insufficient detection effect of the traditional ORB algorithm on the image edges as well as the low actual extraction of feature points. First, the image pyramid layering was established, and then on basis of the improved oFAST12-20 corner point algorithm, the method with a setting dynamic threshold, according to the idea of adaptive threshold, was proposed to extract feature points, and the candidate set of feature points was obtained. Then, Harris algorithm was used to calculate the response value of each candidate point, and the response value was sorted from high to low. Finally, the top 80% of the feature points with high response value were extracted as the most important feature points. The experimental results show that the improved oFAST algorithm improved the extraction rate of feature points and reduces the algorithm time compared with the traditional ORB corner detection.


Introduction
Intelligent robots have gradually appeared in various industries with the advent of the intelligent era. Therefore, simultaneous localization and mapping (SLAM) have great applications and research value for intelligent robots. More and more research on positioning and composition is gradually focused on visual SLAM. The key research problem of visual SLAM is how to find representative image features from images [1]. Image feature extraction and matching is an extremely important step for the entire visual SLAM research, and it is of great significance to target recognition and image reconstruction. From the current research, the common feature point extraction algorithms are Scale Invariant Feature Transform (SIFT) [2], Speeded-Up Robust Features (SURF) [3] and Oriented FAST and Rotated BRIEF(ORB) [4].
Compared with SIFT and SURF, the ORB feature has a calculation speed of 100 times SIFT and 10 times SURF [5]. The literature [6] proposed an ORB algorithm based on modular region segmentation. Although the algorithm ensures that the feature points can be extracted uniformly, it cannot change the number of extracted feature points, and the extraction speed is slower than the traditional ORB algorithm. The literature [7] proposed an ORB algorithm for region division. The ORB algorithm solved the problem of overlapping and redundancy of feature points, but it was not ideal for edge detection.

2.ORB algorithm principle
The ORB feature is an algorithm for quickly extracting and describing feature points. It consists of two parts: feature point extraction and feature point description.

Feature point extraction
In the existing ORB algorithm, FAST [8] corner point algorithm is used to extract feature points. The disadvantage of the FAST corner algorithm is that it does not have directionality and scale invariance, so the FAST detector is improved and optimized in the ORB algorithm to increase its rotation invariance, which is called (Oriented FAST, oFAST). The central idea of FAST feature point extraction is that: if a pixel differs greatly from its surrounding pixels (too bright or too dark), then it may be a feature point.
The steps of oFAST feature point extraction are as follows: Step1. Build an image pyramid to ensure that the feature points have scale invariance; Step2. Use the FAST algorithm to preliminary extract the corner points of each layer of the pyramid image. First, select a pixel P to determine whether it is a feature point. Select 16 pixels on a circle with a fixed radius of 3 at the center of P, and take the absolute value N as the difference from the center pixel I(p), as in formula (1) Choose a suitable threshold value t (such as 20% of I(p)), when there are consecutive n points (n can be 9 or 12) among these 16 pixels and the gray value of pixel P If the absolute value of the difference N is greater than or less than t, it is considered as a characteristic point. A pre-judgment process is added to the FAST-12 algorithm to accelerate the feature point screening rate. Detect the 1,5,9,13th pixel value on the neighborhood circle. Only when the absolute value of the difference between three of the four pixel values and the pixel value of P point is greater than or less than t, the point P may become a feature point.
N |I x I p |，x ∈ circle p (1) Step3. Using the determined feature point P as the origin to establish a plane coordinate system. Within the circle whose center is p and radius is r, it is defined as neighborhood W, calculate the position of the center of mass within W, use P as the starting point, and the center of mass as Endpoint construction vector. The moment of the domain W is: In the formula, I(x,y) is the gray value at a certain point of the image in the neighborhood. From formula (2), x, y ∈ r, r the 0th and 1st moments of the neighborhood W can be obtained as: From equations 3, 4, and 5, the centroid of the neighborhood W can be derived as: The direction angle of oFAST feature point is θ tan m , m (7) Ensure that it improves the rotation invariance of feature points, and ensure that x, y are within a circle with radius [9].
Step4 Screen the extracted feature points and calculate the response value of the corner points, that is, the sum of the absolute deviations of the gray values of the surrounding pixels and the center point. The obtained response values are sorted from large to small, excluding the point where the response value is small [10]. The algorithm steps are as follows: 1) Take one corner of the image as the origin O, establish the coordinate system O-XY, and calculate the gradient I x , I y of I(x, y) in the X and Y directions; 2) Calculate the product of two gradient directions I x2 , I y2 , I xy =I x *I y ; 3) Use Gaussian function to perform Gaussian weighting (σ=1) on I x2 , I y2 and I xy to generate elements A, B and C of matrix M, respectively:

Feature point descriptor
The ORB feature uses the BRIEF [11] descriptor, which is a binary coded descriptor. Compared with the method of describing feature points in the area gray histogram, it greatly speeds up the establishment of feature descriptors, and it also greatly reduces the time of feature matching.
The core idea is to select a neighborhood of S*S around the feature point, take any pair of points X, Y in the neighborhood, compare the pixel values of the two points, and if the pixel value of X point is less than Y point, assign 1, Otherwise 0. According to this method, N pairs of points (generally N is 256) are selected in the neighborhood for pixel value comparison to obtaining a string of binary codes. This code is the BRIEF feature descriptor.

Improved ORB feature extraction algorithm
The oFAST corner detection algorithm used by the ORB feature is more concentrated on the distribution of the extracted feature points. There are more redundant points and the edge position detection sensitivity is not strong. It ignores the feature point detection of the image edge position.In general, the more feature points are selected, the better the image matching result is, but the excessively dense feature points are very inconvenient for feature description and will affect the matching accuracy [12]. In order to solve the problem of insufficient edge sensitivity and dense feature points, this paper improves the oFAST algorithm. As shown in Figure 1, 20 pixels are selected on the circumference with a P point as the center radius of 3and the P pixel is set to I p ,meanwhile set the adaptive threshold.
Where θ is the scale factor, the value is taken θ , I a is the gray value at pixel a, and T a is pixel a. Perform feature point detection for each layer of the pyramid. If the pixel value at the detection point P is I p , select 20 pixels in the neighborhood of radius 3, and if there are 12 consecutive points in the 20 pixels satisfy the formula (9), P is considered as a possible feature point.
After the detection in step 3, there are some poor quality points in the extracted feature points, which may affect the subsequent matching, so screening is required. In this paper, the Harris algorithm is used to eliminate the poor quality feature points, and the Harris response values of the extracted feature points are calculated respectively, and then the response values are sorted from large to small, and finally, the first n high response value feature points are taken as the final feature point set.

4.Experimental results and analysis
This experiment is implemented on the Ubuntu 14.04 system and Opencv 3.   It can be drawn from Table 1 that when the image pyramid is introduced and the Harris algorithm is used to remove some feature points. The Improved ORB algorithm in this paper improves the feature point extraction rate by 16.4% compared with the traditional ORB algorithm. As can be seen in Table 2, when the number of feature points extracted by the improved algorithm is larger, the time-consuming is faster than the traditional ORB algorithm by 7.8ms. The algorithm proposed in this paper not only improves the extraction rate of feature points but also reduces the arithmetic speed of the algorithm.

CONCLUSION
In this paper, it's found that analyzing the effect of traditional ORB algorithm on edge detection is not good and the actual extraction rate is low, an improved ORB feature extraction algorithm is proposed to establish an image pyramid. So oFAST12-20 algorithm is used to set a dynamic threshold to initially extract feature point sets. And then use Harris responding to culling the poor feature points to get the final feature point set. The algorithm in this paper improves the actual extraction rate and reduces the algorithm's time. The experimental results show that the algorithm in this paper is superior to the traditional ORB algorithm in feature point extraction, the operation speed is improved, and it has better robustness.