| According to the degree of structure,the road surface can be divided into structured road surface and unnstructured road surface.At present,the research of unmanned driving on structured road surface is relatively mature,and the research on unstructured road surface is relatively few.As an active three-dimensional measurement method,the structured light measurement method can be applied to the measurement of uneven and unstructured pavement topography.However,due to the large amount of data collected and processed,it is difficult to meet the requirements of real-time processing of unmanned driving by using traditional PC method.To solve this problem,this paper studied the real-time acquisition and processing technology of structured light image based on FPGA.The main works are as follows:Firstly,aiming at the real-time requirements of image acquisition and processing in the structured light measurement system,three image acquisition and processing schemes of FPGA,FPGA+DSP and FPGA+ARM were analyzed.The image acquisition and processing system based on FPGA was completed.The image acquisition circuit,the program configuration circuit,the clock circuit,the data cache circuit,the USB3.0 data output circuit and the power supply circuit were designed with the Sillings A7 series FPGA as the main control device.Secondly,in order to process the acquired image data in FPGA,the system logic block diagram was designed.The IIC timing logic was designed to complete the configuration of camera registers.In order to solve the metastable problem caused by different clocks between modules,an asynchronous FIFO read-write logic was designed.The AXI4 read and write logic was designed to cache the data into the DDR,and the Slave FIFO interface logic was designed to output the data.Finally,the image processing algorithm of structured light was studied,and the color image was converted to gray image in order to adapt to the following image processing algorithm.Median filter was used to remove salt and pepper noise from gray image.In order to separate the effective region of the spot from the background,different edge detection algorithms were studied.In view of the burr on the edge of the spot and the virtual connection between the spots after edge detection,the algorithm of burr removal based on morphology was studied.In this paper,a fast spot recognition method was studied,and the centroid of spot was extracted by gray gravity center method.At last,the image processing algorithm was transplanted to the FPGA hardware circuit,and it worked well.After the system debugging was completed,the test was conducted on the outdoor non-structural pavement.The experimental results show that the recognition rate of the collected structured light spot image can reach 94.41%,and the processing time for the image with 640*480 resolution is 0.35ms,which meets the real-time requirements of the structured light pavement topography measurement system for image acquisition and processing. |