| Unmanned Aerial Vehicle(UAV)were firstly used in military,to replace soldiers on dangerous missions.In recent years,small rotary-wing UAVs have been used widely in civil fields.UAVs are playing an increasingly important role in agriculture,electric power,environmental protection,surveying and mapping,photography and other domains.Small rotary-wing UAVs often fly at low altitude,and are very likely to collide with people,buildings,trees,vehicles,etc.,causing damage to UAVs.How to perceive those low-altitude obstacles and flexibly avoid them has become a research hotspot.Some researchers applied mature radar detection and laser measurement technology to UAVs,but encountered difficulties such as miniaturization,high power consumption and poor real-time performance.Aiming at the importance of obstacle avoidance of small rotary-wing UAVs and the difficulties of radar and laser technology,this topic is based on computer vision technology to study the autonomous perception of obstacles,real-time tracking and collision avoidance path planning of UAVs.This topic takes the "intelligent following vehicle" function of DJI UAV as the starting scene,to study how to detect and track the followed vehicle in real time,and avoid collision with the followed vehicle.The main work of this paper is as follows:(1)For the autonomous detection and real-time tracking of the followed vehicle,this paper focuses on researching the target detection algorithms of R-CNN series and YOLO series,as well as the KCF target tracking algorithm.This paper creatively combined YOLOv4(high detection accuracy)and KCF(fast tracking speed)together,so that they can give full play to their advantages.Through experiments,the optimal combination interval between YOLOv4 and KCF has been found,which improves the real-time tracking performance by nearly 3 times while only sacrifice few detection accuracy.(2)For collision threat identification,this paper measured the distance between the followed vehicle and the binocular camera based on the binocular distance measurement thesis.In this paper,the result of target-detection were reused in the distance measurement,and the center point of the rectangular frame of vehicle detection in the left and right view was used as the approximate matching point to calculate the parallax between the two cameras.The distance measurement task was completed almost in zero time.After statistical analysis of experimental data,we choose alarm-distance which can alarm correctly.(3)In order to eliminate collision risk,this paper customized energy-saving and efficient hover-deviation avoidance algorithms for UAVs,in combination with the scene features of "intelligent following vehicle".The planned collision avoidance path can achieve the goal of eliminating the collision threat on the premise of energy saving. |