With the rapid development of computer technology,computer vision has quickly become a research hotspot.As an important branch of computer vision,binocular stereo matching plays an important role in many aspects such as industrial manufacturing,medical diagnosis and virtual reality.Using the binocular stereo matching technology,the disparity map in the corresponding scene can be obtained,and the restoration from the two-dimensional plane to the three-dimensional space can be completed.Among them,stereo matching is the key link of binocular stereo matching technology,and the matching result will directly affect the restoration effect of subsequent 3D scenes.Therefore,it is of great significance to study stereo matching.This paper mainly studies the problem of poor matching accuracy in disparity discontinuous regions and edge positions.First of all,for the problem that the center pixel is easily disturbed by Census transformation,the distance weight is introduced in this paper,the distance-weighted pixel sum in the window is used to replace the original center pixel,and the noise is reduced by the influence of each point in the region on the center pixel.Interference with the center pixel.At the same time,this paper uses the Canny operator to extract the edge information of the image,and converts it into a binary sequence and introduces it into the Census cost calculation to improve the matching accuracy of the disparity discontinuous area and the edge position.Finally,the improved Census transform is combined with the gradient transform as the cost calculation function.For the problem that the traditional guided filtering function cannot effectively protect the image edge information,this paper introduces an adaptive edge weight into the aggregation function through the gradient information,so that the smoothing force can be adjusted according to different areas of the image during the filtering process,so as to protect the image edge.In the disparity calculation,this paper adopts the winner-take-all method to calculate the disparity value and obtain the initial disparity map.In the subsequent optimization process,this paper first uses the left-right consistency check to filter out outliers,uses interpolation to fill in the outliers for optimization,and finally uses median filtering to filter out discrete points in the graph,and obtains the final optimized effect graph.In order to test the performance of the proposed improved algorithm,this paper uses the test set provided by Middlebury to compare the proposed algorithm with other algorithms in terms of matching accuracy,anti-interference performance,matching effect and algorithm operating efficiency.The proposed algorithm has good antiinterference performance,and can improve the matching effect of the discontinuous area of parallax,and at the same time can protect the edge of the image to a certain extent,which verifies the effectiveness of the algorithm. |