Binocular vision ranging technology is a way to simulate the human eye to obtain scene information.It measures the distance by calculating the parallax between two cameras,which has various advantages such as high accuracy and non-contact,and it can restore the scene information more comprehensively.It has a wide range of application prospects in the fields of intelligent robots,autonomous driving,and three-dimensional reconstruction.In order to further study and optimize the binocular vision ranging algorithm,a binocular stereo vision ranging system is built in this thesis.The main work has the following aspects:(1)In the camera calibration module,four mainstream camera calibration methods are explored,and their respective advantages,disadvantages,and applicable scenarios are analyzed.In this thesis,classical Zhang’s calibration method is adopted.The calibration parameters obtained by this method have high precision and the operation is simple and convenient.To obtain accurate camera intrinsic and extrinsic parameters,the left and right cameras are calibrated separately using MATLAB,and then the stereo calibration is performed.Finally,the stereo rectification of the left and right views is completed using the Bouguet algorithm.(2)In the stereo matching module,an improved stereo matching algorithm based on Census transform is proposed.The contrast values between local pixels are introduced into the selection criteria of the center pixel and combined with the AD transform to obtain the final matching cost function.In this way,the matching accuracy and the robustness of the algorithm are effectively improved.The algorithm uses a cross-domain algorithm for cost aggregation,which improves the matching accuracy in weak texture areas.The algorithm is evaluated on the Middlebury dataset,and the experimental results show that the average error matching rate of the proposed algorithm is 6.36%,which is lower than the other two algorithms by 3.37% and 4.54%,respectively.The proposed algorithm effectively improves the matching accuracy and has better disparity results in image flat regions and discontinuous disparity regions.(3)According to the designed system flow chart,a binocular ranging system was built to complete the experiments from the calibration of the binocular camera to the distance measurement.Multiple distance measurement experiments were conducted on objects within a certain range,and the relative error values were calculated.Through comparative analysis,the best measurement range of this binocular distance measurement system was between 40 cm and 300 cm,and its relative error was less than 4%,which verified the effectiveness of this binocular stereo vision distance measurement system. |