UNMANNED AERIAL VEHICLE IMAGE MATCHING BASED ON IMPROVED RANSAC ALGORITHM AND SURF ALGORITHM

A UAV image matching method based on RANSAC (Random Sample Consensus) algorithm and SURF (speeded up robust features) algorithm is proposed. The SURF algorithm is integrated with fast operation and good rotation invariance, scale invariance and illumination. The brightness is invariant and the robustness is good. The RANSAC algorithm can effectively eliminate the characteristics of mismatched point pairs. The pre-verification experiment and basic verification experiment are added to the RANSAC algorithm, which improves the rejection and running speed of the algorithm. The experimental results show that compared with the SURF algorithm, SIFT (Scale Invariant Feature Transform) algorithm and ORB (Oriented FAST and Rotated BRIEF) algorithm, the proposed algorithm is superior to other algorithms in terms of matching accuracy and matching speed, and the robustness is higher.


General Instructions
Image matching is a process of finding the same name point between two or more images by using a certain matching algorithm. At present, the image feature matching algorithms recognized at home and abroad include SIFT (Scale Invariant Feature Transform) algorithm (Lowe D G, 1999), SURF(Speeded Up Robust Features) algorithm (Bay H, et al,2008), ORB (Oriented Fast and Rotated Brief) algorithm. SIFT algorithm was first proposed by Lowe in 1999and improved in 2004(Lowe D G, 2004. In 2008, H.Baymmm improved on the basis of SIFT algorithm and proposed SURF algorithm, which greatly accelerated the speed of feature extraction. Among the three algorithms, ORB algorithm has the fastest speed, which can reach two orders of magnitude of SIFT algorithm and one order of magnitude of SURF algorithm, but it does not have scale invariance, so the matching effect is poor when the image scale changes (Chen H Y, et al, 2015;Rui W;She J, et al,2015). SIFT algorithm detects the largest number of feature points, but its operation speed is slow (Song J G, 2018;Vural M F, et al, 2009). SURF algorithm uses the simplified approximation idea of SIFT algorithm for reference, and approximately simplifies the Gaussian second-order differential template in DoH(Determinant of Hessian), so that the template only needs a few simple addition and subtraction operations for image filtering, and this operation has nothing to do with the size of the filtering template. Experiments show that SURF algorithm is about three times faster than SIFT algorithm in operation speed, and its comprehensive performance is better than SIFT algorithm. It has good rotation invariance, scale invariance, illumination invariance and robustness (Rongchao Q , et al, 2016;Fei X). However, the classical SURF image matching algorithm is greatly influenced by the local region pixel gradient direction when generating feature vectors describing feature points, which easily leads to inaccurate main direction of feature vectors and high false matching rate (Demirci M F, et al, 2006;Taylor S, 2009;Rankov V, et al, 2005;Yaotian C, 2018;Yan Z, et al, 2014). Therefore, a UAV image matching algorithm combining SURF algorithm and improved RANSAC(Random Sample Consensus) algorithm is proposed. RANSAC algorithm can not only effectively eliminate a large number of mismatching points, but also obtain better robust estimation results. In the phase of feature point extraction and matching, SURF algorithm is used to detect the extreme value in scale space, then refine the location of feature points, calculate the description information of feature points, and finally generate the description information of feature points. In the image registration stage, image registration is the core of image matching, and the core of image registration is the solution of transformation matrix H. In this paper, the improved RANSAC algorithm is used to solve transformation matrix H, and the mismatched points in the first stage are eliminated to improve the accuracy of image matching.

SURF ALGORITHM
SURF algorithm is an improvement and upgrade of SIFT algorithm, with high accuracy, good robustness and fast computation speed. The algorithm includes three parts: feature point detection, feature point description and feature point matching.

Integrating images
The integral graph of a point in the image is the sum of the pixels of the rectangular part between that point and the origin of the image. (1) Where is the integral graph and is the original image. SURF algorithm first performs integral operation on the original image, accumulates the gray values of the original image to obtain an integral image, and uses the integral values of pixel * Corresponding author: 18749909316@163.com gray values to replace Gaussian filtering in SIFT algorithm, thus improving the calculation speed.

Detecting Feature Points in Images
SURF algorithm uses Hessian matrix for feature detection, and uses the place where Hessian matrix calculates the extremum as the image feature. For image , the Hessian matrix with scale parameter is: SURF algorithm filters the original image by defining templates with different scales, which avoids multiple Gaussian blur and downsampling of the image while achieving the purpose of scale search. After filtering the original image, the feature points whose response value is less than the threshold value are removed, and non-maximum suppression is performed at the same time. The remaining maximum points are SURF feature points detected.

Determine the main direction
SURF algorithm determines the main direction for the detected feature points, thus ensuring good rotation invariance of the algorithm. Taking the characteristic point as the center, the Hear wavelet responses in x and y directions are calculated in the neighbourhood with radius of . The size of Hear wavelet is . The response results are Gaussian weighted, and the weight is determined according to the distance from the characteristic point to the center of the circle. The distance is inversely proportional to the weight. Then, a sector with an angle of 60°i s used for rotation search, and after each rotation of 30°, the sum of Hear wavelet responses in the sector range is calculated according to the weight value to form a plurality of direction vectors, and the longest direction is the main direction of the feature points. The schematic diagram for determining the main direction is shown in fig. 1.
For this feature point, a 64-dimensional feature vector is formed. This method not only reflects the basic information of the feature points, but also improves the robustness of the algorithm, and the operation speed is also improved compared with SIFT algorithm.

RANSAC ALGORITHM
RANSAC algorithm is a random sampling consistent algorithm, which uses iterative method to estimate the parameters of the mathematical model from a group of observed data containing outliers. The basic assumption of RANSAC algorithm is that the sample contains both inliers (data that can be described by the model) and outliers (data that deviates from the normal range and cannot adapt to the mathematical model), i.e. the data set contains noise. These abnormal data may be caused by wrong measurements, wrong assumptions, wrong calculations, etc. At the same time, RANSAC also assumes that given a set of correct data, there is a method that can calculate model parameters that conform to these data. The basic idea of RANSAC algorithm is: 1. Randomly select several points in the data and set them as inliers 2. Calculate the model suitable for inliers 3. Substituting the remaining points into the model to calculate whether it is inliers 4. Record the number of inliers and repeat the above steps n times 5. compare the number of inliers calculated n times, the model built at the most is the solution

THIS ALGORITHM
This paper combines SURF algorithm with RANSAC algorithm, and improves RANSAC algorithm to give full play to the advantages of SURF algorithm and RANSAC algorithm. The advantage of RANSAC is that it can estimate high-precision parameter models from data sets containing a large number of outliers. The disadvantage of RANSAC is that there is no upper limit on the number of iterations it calculates parameters. If the upper limit of iteration number is set, the obtained result may not be the optimal one or even the wrong one. RANSAC only has a certain probability to obtain a credible model, and the probability is proportional to the number of iterations. Another disadvantage of RANSAC is that it requires setting thresholds related to the problem. RANSAC can only estimate one model from a specific data set. If there are two (or more) models, RANSAC cannot find another model. In this paper, pre-verification experiments and basic verification experiments are added to select the optimal model in the model estimation phase of RANSAC algorithm, which improves the operation speed of the algorithm and the accuracy of eliminating mismatching points. In the feature point extraction and matching phase of the image, SURF algorithm is used to detect the extreme value in the scale space first, then refine the location of the feature point, then calculate the description information of the feature point, and finally generate the description information of the feature point. In the image registration stage, the improved RANSAC algorithm is used to solve the transformation matrix h, and the mismatched points in the first stage are eliminated to improve the image matching accuracy. The flow chart of this algorithm is as follows: Figure 2. The algorithm flow chart in this paper

EXPERIMENTS AND RESULTS ANALYSIS
In order to compare the differences between SIFT algorithm, SURF algorithm, ORB algorithm and this algorithm in finding the number of feature points, removing mismatching ability and computing time, two UAV images are tested. The experimental platform system is a Windows 10 system, and the processor is Intel (R) Core (TM) i7-4510U CPU @ 2.00GHz 2.60GHz, 64bit operating system, 8GB of memory, and the program running platform is MATLAB R2019a. This algorithm is compared with SIFT algorithm, SURF algorithm and ORB algorithm. In this paper, the evaluation indexes of image matching effect are the number of original image feature points, the number of matching image feature points, the number of feature points, the number of mismatching feature points, the mismatching rate, and the detection time. The sizes of the two images to be matched are 466×764 pixels and 439×720 pixels respectively. The matching effect of image feature points of each algorithm is shown in Figure 3-Figure 6, and the experimental data results are shown in table 1.   From this, we can draw a conclusion that SURF algorithm improves the operation speed due to the small number of feature points found, but the false matching rate is high. SIFT algorithm has a low false matching rate due to the large number of feature points found, but its operation time is slow. The ORB algorithm finds too many feature points, which leads to slow operation speed. The algorithm in this paper effectively eliminates the false matching point pairs of SURF algorithm, and the calculation speed is the fastest with a moderate number of matching point pairs.

CONCLUSION
This paper proposes an image matching method based on improved RANSAC algorithm and SURF algorithm. SURF algorithm has fast computation speed but high false matching rate. RANSAC algorithm is used to eliminate false matching point pairs generated by SURF algorithm. Pre-verification experiments and basic verification experiments are added to RANSAC algorithm to improve the algorithm's rejection ability and running speed. Experiments show that the proposed algorithm is superior to other algorithms in terms of matching accuracy and matching speed, and has higher robustness.