# Automated Detection of Multi-Rotor UAVs Using a Machine-Learning Approach
## 3 Drone Detection Using Computer Vision Methods
Using the closest neighbor search method or algorithm Fast Library for Approximate Nearest Neighbors (FLANN), it was determined which feature in the first frame coincided with the feature identified in the second frame. Of these matches, those found to be good were selected. The good match was defined by this criterion: the mean distance between the feature identified in the first frame and feature identified in the second frame. Only those distances that were above the mean of maximum and minimum distances of all features were selected. Thus, only those that are qualitatively above half of all distances have been obtained. The result of this calculation was influenced by a suitably chosen constant. During the testing it was found that this method works relatively correctly and even though sometimes incorrectly identified features matches were found, it is considered to be a basic filter to determine the correct matching of features. Testing detectors led to the following findings:  
1. _SIFT_--the number of features found compared to other detectors was higher, features were scattered throughout the object and identified also in areas that did not correspond to the edges of the object, finding good matches of features was also difficult after the application of additional filter;
2. _SURF_--as in the first detector, the number of features identified was too high and often did not correspond to the object's edges; features matching was only partially successful;
3. _BRISK_--the number of features found was higher, but most of them corresponded to the edges of the object and the important parts of the objects; a sufficient number of successfully matched features were achieved by the additional filter;
4. _ORB_--the number of significant points was the lowest among the tested detectors, but their localization was almost exclusively at the edges of the object and the important parts of the object; the points were not scattered throughout the whole object when the additional filter was applied; and a high number of correctly matched features was achieved;
5. _AKAKZE_--the number of significant points was higher, some even outside the object and important areas; a sufficient number of successfully matched features were achieved by an additional filter. The evaluation of detector testing is shown in Table 1. The greater the number of characters x, the more successful the test was. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **SIFT** & **SURF** & **BRISK** & **ORB** & **AKAZE** \\ \hline Number of features & x & x & xx & xxx & xx \\ Dispersal of features & x & x & xxx & xxx & xx \\ The number of successfully matched features & x & x & xx & xx & xx \\ \hline Overall rating & x & x & xx & xxx & xx \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The evaluation of detectors test. Figure 7: Testing images used to evaluate the suitability of feature detectors. Since some incorrect feature matchings were evaluated as good even after applying the good match filter, it would not be appropriate to compare the ratio of features found and well-matched features between the detectors. Thus, the success of each detector was compared visually. BRISK and ORB detectors achieved the best results. The ORB feature detector, which uses the BRIEF descriptor for feature extraction, was selected. The goal of this work is not to compare existing detectors and evaluate their success in general. Therefore, we chose a representative pair of images describing our use case and tried to evaluate the success rate of detectors supported by the OpenCV library. A detailed description of used detectors, together with the achieved success, in general, is described in [22] in detail. Comparing our testing results and results published in [22], there is a required match in parameters that are important for us. Taking into account this information we consider our testing relevant and selected ORB detector suitable for our usage.