| Because of small size and flexible movement,UAV has been widely used in many fields such as civil and military.GPS can provide accurate and effective location information for UAV outdoors,while the signal is weak and unstable indoors.At present,due to the characteristics of high precision as well as low cost,positioning by a fusion of vision and inertial has gradually become a research hotspot in indoor positioning field.However,the actual indoor condition often has sparse texture and complex lighting,which reduces accuracy and robustness of the positioning system.To sum up and combined with the requirements of UAV indoors positioning,an algorithm is realized based on a fusion of monocular vision and inertial in this thesis.And experiments on the Eu Ro C dataset and actual tests show the effectiveness of the algorithm.This thesis mainly includes the following parts:(1)Aiming at the situation of sparse texture indoors,a visual inertial frontend based on comprehensive features of point and line is constructed for preprocessing.For point features,the homogenization algorithm based on grid quadtree is used to eliminate the redundancy of Shi-Tomasi points.And the algorithm of RANSAC improved by sampling method is to eliminate tracking errors of optical flow.For line features,the traditional LSD algorithm is improved by the strategy of optimal parameter selection and short line screening so as to extract line features.And the matching of line features is realized by LBD descriptor and KNN algorithm.As for the preprocessing of inertial data,pre-integration strategy is adopted to avoid repeated integration.(2)In order to enhance the robustness in complex lighting environment,this thesis proposes a spot removal algorithm to solve the problem of ground reflection,whitch detects spot region by watershed algorithm of local extremum and eliminates the highlight based on Poisson image fusion.Experiments show that spot removal algorithm improves the positioning accuracy in complex lighting scenes dramatically.(3)The initialization and nonlinear optimization back-end is constructed for high-precision state estimation based on the comprehensive features of point and line.Aiming at initialization failure caused by insufficient feature points,point and line features are used together for vision initialization.In order to eliminate the accumulated error at the back-end,a word-bag dictionary of point and line is constructed to realize loop detection and correction of the trajectory.Experiments show that by using comprehensive features of point and line,the module of initialization and loop detection has stronger robustness in sparse features environment.(4)The visual inertial positioning system is built on a small four-rotor UAV platform.And the experiments on the database and actual tests indoors such as workshop and room show that the error of this system is 15 cm and the relative accuracy is no more than 0.3%.Compared with the mainstream positioning algorithm of visual-inertial fusion and UWB positioning software,the algorithm in this thesis has better accuracy and stability. |