Detection of Unmanned Aerial Vehicles Using Computer Vision Methods: A Comparative Analysis

Abstract Detection of small objects in the airspace is a crucial task in the military. In the era of today’s unmanned aerial vehicles (UAVs) technology, many military units are exposed to recognition and observation through flying objects. They are often equipped with optoelectronic warhead making a way to collect essential and secret data of the military unit. Modern technical solutions make it possible to implement some methods facilitating detection of flying objects. A lot of them utilize computer vision techniques based on image processing algorithm. Therefore, in this article, we present an analysis of the most promising algorithm for detection of small flying objects.


INTRODUCTION
Unmanned aerial vehicles (UAVs) constitutes severe danger to military units. Therefore, many systems devoted to detecting small flying objects have been developed. Some of them are based on time measurement of the electromagnetic field emitted by the UAVs. Range of these techniques depends on the transmitter power; however, the characteristics of the measurement location also affect the detection results. Therefore, to improve the detection efficiency, the set of many 3D antennas, set in an omnidirectional manner, are in effect.
The radar station is a device that has been used for object detection in the airspace in both civil and military aviation. The main task of radar is to scan the space to detect threats such as enemy rockets, aeroplanes or UAVs. Such a system works on the principle of emitting electromagnetic waves. After reaching the object, the waves are reflected and return to the receiver. In this process, the object's speed and location are determined [11].
Another approach utilises radar systems, where that radio beams or microwave waves reflect from materials such as metals and carbon fibres are analysed. By using stable frequency generators and high accuracy time measurement systems, the position and velocity of an object can be determined with high precision. An operating range of a radar amounts to 500 km; however, it increases when radars are connected into a network. Effectiveness of such systems depends on the size of a reflection surface of the object, so detecting small object at a large distance from the radar could be difficult. For that reason, the American army has conducted detection of small objects tests with AN/TPQ 49 radar, used under standard conditions to detect artillery fire. This radar has been recognized as highly reliable in open space; however, its reliability was reduced in airport areas due to electromagnetic noise.
Some techniques apply an acoustic system, utilizes specific sound emitted by objects to detect the direction of the emission [3]. This system does not require tracking of an unidentified flying object and works under various weather conditions all hours of the day and night. To perform, it uses acoustic arrays consisting of highly sensitive microphones. By using a large number of them (usually about 128) and advanced digital signal processing, the system enables azimuth and elevation determination of the target in real-time.
Mixed systems using a radar sensor, acoustic matrix and video cameras are mainly used to detect drones. However, thanks to the implementation of multiple sensors, they can be used to recognise other air and ground dangers. The most important sensor is radar, supported by the acoustic matrix and video cameras. This combination of three sensors allows detection of small drones up to 1000 meters. After revealing the object's invasion into the protected space, the software visualizes the entire event and archives it through recording of radar and video signal. The system also makes it possible to detect enemy objects by their sounds; however, to do this, it needs a sound signature of the object.
Computer vision systems have received attention recently due to their convenient application for small object detection [10]. This results from the increasing availability of optical sensors and a large number of image processing algorithms. In essence, the majority of algorithms are based on fundamental image processing techniques such as image segmentation, optical flow and background subtraction. Some methods utilise artificial intelligence to detect, recognize and classify objects [7]. This solution was introduced by IntelliVIX company for the task of object detection. The system works in combination with artificial intelligence that allows not only to detect a given object but also classify it using on previously learned cases. It also can recognize a predefined event and register new objects in the database.
Since computer vision plays an essential role in small object detection, the comparative analysis of image processing algorithms was conducted in this study. First, the compared algorithms are described. Then, the results of the experiments are presented, and, finally, the conclusions are formulated.

METHODS
In our research, we focused on detecting AUVs using a vision system. For this purpose, we implemented computer vision methods described below.

C l a s s i f i e r s l e a r n i n g w i t h s u p e r v i s i o n
This object detection technique uses learning methods to recognize objects automatically. In this approach, the classifier employs initially prepared patterns to create learning mapping functions. It solves the classification problem, especially when the algorithm approximates the behaviour of a function by generating results in the form of either discrete labels or continuous values. Learning patterns have both pairs of object features and properties labels that are specified manually. Having a previously defined database, it builds a model (e.g. logical rules, decision trees) to Scientific Journal of PNA classify new objects or update existing division of objects in the predefined classes [1]. This process consists of several stages: model building, testing phase and prediction of unknown values. To build a formal model, the classifier is used as input data consisting of examples, observations and samples [2]. The most popular algorithmic implementations of this technique are KNN, Codebook and Codebook2.

B a c k g r o u n d s u b t r a c t i o n
Background subtraction is a process of determining the foreground object while maintaining the background model. The foreground object can be any object that has been detected as a difference sequence frame with the background model. Such a result can be further used to track targets or detect motion [9]. The term background is not strictly described because it differs depending on the considered case. The most common part of the background is the part of the scene that is static, or which shows little change for a limited time. A dynamic background model is one in which the background scenes may contain moving elements in an external environment, for example, moving grass in the wind. In the construction of a static representation of the scene, non-parametric statistical modelling of pixel process is used [6]. Background subtraction is a widely used approach for detecting moving objects using a static camera. The main reason for using this method is its simple structure and accuracy. This method, to be able to cope with changing environmental conditions, demands properly selected parameters [8]. In general, it involves detecting differences between the model and subsequent image frames. The result of this operation creates a binary mask that includes pixels of moving objects. At the same time, the pixels belonging to the part of the object are grouped together [5]. Any system that is devoted to detecting objects has to be able to distinguish between these two areas [4]. The modifications of background subtraction were implemented in MOG, MOG2 and GMG algorithms.

RESULTS
This section presents the results of research on the use of seven algorithmic implementations of methods mentioned above: Background Subtraction, MOG, MOG2, GMG, KNN, Codebook and Codebook2. The algorithms have been tested for computational complexity, accuracy, detection time, amount of noise and a number of lost objects. To perform tests, the algorithms were designed and implemented using the C++ language and the OpenCV library. The experiments were carried out using ten videos, presenting small and medium-size UAVs moving at different distances from the camera and under various weather conditions. The exemplary frame from one of the analysed movies is presented in fig. 1.  The GMG algorithm yields the least efficiency among the analysed methods, which leads to more frequent loses the detected object. In contrast, the MOG algorithm gives the best results; as a result, it practically does not lose the detected object.
Computational complexity was analysed using the time needed for a given algorithm to perform a single loop of the entire calculation process. The longest time was considered as a reference point, and the remaining algorithms were compared to it. The results are presented in the figure below.  Among the analysed algorithms, the MOG was characterised by the shorter detection time. Relatively short detection time was observed using the Background Subtraction and KNN algorithms. Detection time of GMG, Codebook and Codebook2 algorithms was longer due to the learning process performed at initial steps.
The amount of noise was determined by an area of small objects erroneously detected in the image. To estimate it, the image was divided into square areas, as shown in fig. 5. Then, the ratio of squares containing noise to the whole number of squares in the image was calculated.  The accuracy of drone detection represents the percentage of correctly classified drone pixels as the foreground. Fig. 7 shows the obtained results. The best performance is demonstrated by the MOG, Codebook and Code-book2 techniques. The Background Subtraction yields only slightly worse results.

SUMMARY
The analysis showed that the MOG algorithm outperforms other methods in most statistics. Comparing with others, it demonstrated high performance in terms of calculations and memory requirements ensuring effective noise removal in the images. What is more, it can detect the object after comparing two consecutive frames, which makes it highly effective. Its most significant advantage is that it detects the object and prevent its disappearance with remarkably high accuracy.