The ranging of obstacles in front and rear of vehicle is one of the key technologies for automotive safety assisted driving.Since the image can present more environmental information,the binocular stereo vision-based ranging has become a more mainstream research direction in this kind of technology.The establishment of an on-board ranging system based on binocular stereo vision can give early warning signals in a timely manner when the car encounters obstacles,and remind the driver to drive safely,which is of great significance for reducing the hidden danger of traffic safety accidents.Its research difficulties are mainly focused on the real-time performance of the system and the accuracy and robustness of image stereo matching.For the current problems of vehicle binocular stereo vision ranging,this paper studies the vehicle binocular visual ranging system based on Field Programmable Gate Array(FPGA),and realizes the distance measurement of the target object through image acquisition and display,image preprocessing,stereo matching and other methods.The main research contents are as follows:(1)Aiming at the problems of accuracy and robustness in the stereo matching algorithm,a stereo matching algorithm based on improved Census transform and adaptive weight is proposed.By improving the traditional Census transform,the problem that the traditional Census transform relies too much on the center pixel and is susceptible to noise is solved to some extent;the improved Census transform is combined with the Sum of Absolute Difference(SAD)algorithm to improve the matching accuracy of the algorithm in different areas of the image;Sobel edge detection is introduced to determine the cost weights of Census transform and SAD according to gradient information.After verification,this algorithm can effectively improve the accuracy and anti-interference ability of stereo matching.(2)Aiming at the real-time problem of binocular ranging system,Zynq 7020 is selected as the hardware platform for hardware acceleration based on FPGA.The Verilog language is used to design the image acquisition and display module,and the FPGA-based image acquisition and display system is built;the hardware acceleration scheme for image preprocessing including image graying and median filtering is designed and implemented,which solve the problem of large data volume and susceptibility to external noise interference in binocular ranging systems.(3)Aiming at the problems of long cycle and low efficiency in traditional FPGA development methods,a combination of High Level Synthesis(HLS)and Vivado is adopted for the design.The stereo correction function is designed by C++language in HLS,and the stereo correction IP core is exported after simulation.In Vivado,a stereo matching algorithm module based on improved Census transform and multi-path cost aggregation is designed in Verilog language,and the combination of stereo matching and stereo correction IP core is completed by designing its interface as AXI4-Stream type.(4)The experimental platform of binocular ranging is built,and the influence of baseline on ranging accuracy and range is proved through experimental exploration of different baseline distances.Comparing the experimental results under different lighting conditions and different measurement object conditions,it is proved that the binocular ranging system proposed in this paper has high accuracy and good robustness under different lighting intensities.By comparing the data with other binocular ranging system schemes,it is proved that the binocular ranging system in this paper has the advantages of high accuracy,good real-time performance,low power consumption and low cost,which can be further applied and promoted in the field of automobile safety assisted driving. |