This paper comprehensively considers the spatial positioning, real-time and other factors of unmanned aerial vehicle(UAV) inspection, and firstly proposes a UAV precise positioning technology based on visual positioning and visual tracking, so as to realize the rapid collection and judgment of information such as location and safety distance. At the same time, aiming at the problems of long positioning and recognition time and poor real-time performance, the improved kernel correlation filter(KCF) tracking algorithm is used to fit the tracking model.