| With the development of computer,researchers began to look for ways to use computers to help people perceive the information of the world around them,and computer vision technology came into being.As one of the important research branches in the field of computer vision,visual ranging plays a significant role in intelligent driving,robot,UAV and other fields.With the advantages of high accuracy,non-contact and non-destructive measurement,binocular stereo vision ranging can achieve contactless ranging under epidemic conditions,without restriction of object shape.It can meet the comprehensive needs of people for measurement accuracy,efficiency and safety,and has bright application prospects and research value.Binocular stereo vision technology through the use of two cameras with identical parameter Settings for the scene image acquisition,according to the stereo matching process to obtain the parallax map,and finally using the parallax map based on the principle of binocular ranging to calculate the actual three-dimensional depth of the scene.The research content of this paper is divided into three aspects:Firstly,the binocular stereo vision technology is analyzed,and the binocular stereo vision ranging system is developed to achieve the real-time ranging between any two points in a scene.The accuracy of distance measurement is verified in the experimental system.When the measurement distance is between 300mm-1500mm,the error of depth measurement is less than 2.78%.The average error usually retains 1%when measuring the distance between any two points at 500mm in space.Secondly,the stereo matching algorithm is improved based on BM(block matching).First of all,the original image is preprocessed with grayscale,and the 5*5 neighborhood grayscale-weighted mean is used for cost calculation,and a rough parallax map is obtained by multipath cost aggregation.Then,the left-right consistency detection,the removal of small connected areas,the uniqueness detection and the median filter are performed on the rough parallax map to improve the quality.The improvement measures can significantly speed up the system on the premise of ensuring the accuracy of matching.Thirdly,an algorithm of plane extraction based on clustering is proposed to solve the difficulty of capturing measurement points in the actual measurement process.Normal lines were extracted by combining RGB information and depth information and clustering was carried out.The plane was extracted according to the distance constraint from the plane to the origin.The algorithm is verified on REDWOOD dataset,B3DO dataset and NYU dataset,meeting the real-time requirements,achieving comparable results with Computer Vision Toolbox in Matlab. |