Application of image acquisition and processing in intelligent vehicle system

Publisher:熙风细雨Latest update time:2009-12-09 Source: 电子产品世界 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

System Overview

The intelligent car system is mainly composed of functional modules such as path recognition, speed acquisition, steering control and vehicle speed control. The path recognition function uses a CMOS camera to decode the analog video signal, and then convert it into 18×90pix image data after binarization and send it to the MCU for processing; the steering control is adjusted based on the fuzzy control algorithm; and the vehicle speed control uses the classic PID algorithm, which sets different given speeds based on the judgment results of different shapes of the track. The system continuously collects real-time road conditions and speed at a frequency of 50Hz to achieve closed-loop control of the entire system, as shown in Figure 1.

Image acquisition and storage of smart cars

Image acquisition module design

After the CMOS camera is powered normally, it can output the signal waveform of the original image, which is an analog signal of the PAL format, including line synchronization, line blanking, field synchronization, field blanking and other signals as shown in Figure 2. However, this form of signal cannot be used directly by the CPU, and a video decoding chip such as SAA7111 needs to be added. Its function is to convert the analog signal output by the camera into a digital signal and generate various synchronization signals. The CPU uses this synchronization signal to store the digital signal of the image in an external FIFO chip AL422, which constitutes a basic path detection module, as shown in Figure 3.

Image data storage

SAA7111 is an enhanced video input processor chip from Philips, which is often used in highly integrated circuits for embedded video applications. When working, the analog video image is input from one of the four input ports of SAA7111. After analog processing, one channel is output from the analog output port through the buffer for monitoring, and the other channel generates digital chrominance signal and brightness signal after A/D, and performs brightness signal processing and chrominance signal processing respectively. The result of brightness signal processing is sent to the chrominance signal processor for comprehensive processing to generate Y, U, and V signals, which are formatted and output from VPO. The output signal format includes 422YUV or CCIR-656 (8 bits), etc.; the other channel enters the synchronization separator, and generates corresponding line and field synchronization signals HS, VS and pixel clock signals LLC and LLC2 through digital PLL. These signals are the basis for realizing video data acquisition. The size of each frame of image output by SAA7111 can be set to 720×286. Its data volume is relatively large compared to the processing speed of the single-chip microcomputer. The ideal image size is 18×45, and the compressed data volume is only 0.394% of the original image. In order to effectively compress the image data, the digital signal of the image can be stored in FIFO. After a certain frequency division process, the image size can be compressed. The FIFO chip used in the system is AL422B.

In order to realize the frequency division processing of the image digital signal, it can be divided into two implementation methods, one is software frequency division and the other is hardware frequency division. For software frequency division, the system does not need an additional frequency division circuit, but the microcontroller uses the control signal output by the decoding chip SAA7111 to divide the read clock before performing the actual read operation. The disadvantage of this method is that the frequency division work needs to occupy the microcontroller resources, affecting the real-time performance of the system; for hardware frequency division, it is necessary to add a special frequency division processing circuit to realize the image compression without the need for microcontroller control, thereby fundamentally reducing the amount of data processed by the microcontroller and shortening the time to read the image. Therefore, the system adopts the hardware frequency division method. The specific signal frequency division mode is shown in Figure 4. CREF represents the pixel clock, and the frequency division results in the write clock WCK of AL422B. HREF represents the line reference signal, and the signal obtained after the frequency division is used as the write enable signal of AL422B.

Image denoising and feature extraction

Image Binarization

Image binarization is a basic technology in digital image processing. In this system, since the track is composed of black and white, and the background color is basically white, the system's task is to identify the position of the black lead line. Since the interference of its image is not very strong, the binarization technology can be used as the system's image preprocessing. After binarization, the original white pixels are represented by 0, and the black pixels are represented by 1. The key to image binarization technology lies in how to select the threshold. Generally speaking, commonly used methods include global threshold method, local threshold method and dynamic threshold method. Since the light on the track is relatively uniform, and the background color around the track is basically white, the global threshold method is used in the design of this system, which can achieve the effect of simple algorithm and high execution efficiency.

Binarization threshold selection

In the analysis of the track environment, we can find that the brightness of the black line is relatively fixed, and its fluctuation range is very small, less than 20 (the maximum brightness value is 255), while the brightness value of the white background changes relatively more, but it can still ensure that there is a large gradient between it and the brightness value of the black line. Therefore, the histogram statistical method can be used to automatically set its threshold, and the specific method is as follows.

First, store all the data of an original image, then count the first pixel of the entire image, and finally count the number of pixels corresponding to the th brightness value. The result will be a double-peak graph, as shown in Figure 5. This will be able to directly compare the area where the brightness value is concentrated, and use the midpoint value of the center position of the two peaks as the binarization threshold of the track. The algorithm has high calculation accuracy and can find an ideal threshold point. Although it takes a long time to execute, this is only an initialization operation before the car starts running, and has no effect on the speed of the car after it starts running. Therefore, this solution can be adopted.

Image Denoising

During the movement of the vehicle, the image does not have too much noise after binarization, but only a small amount of salt and pepper noise appears locally. The typical image is shown in Figure 6. In the design of this system, the purpose of image processing is to accurately find the center position of the black line. Since the area of ​​noise in the image is very small and generally appears far away from the black line, there are many processing methods, and the center coordinate recursion method can be used.

After the black lines of the track are divided into coordinates of each row, the difference between the center coordinates of two adjacent rows is relatively small. According to experimental tests, the difference is generally no more than 5, which has good recursiveness. Therefore, we can use the center coordinates of the previous row to recursively solve it. The specific steps are as follows.

(1) Since the black line near the camera has a better shooting effect, not only is the width of the black line relatively large, but there is basically no noise, it is a very good choice to use it as the reference point for recursion. Since this is the reference point of the entire image, its accuracy is required to be relatively high. When calculating the center coordinate value of the first row, the black line continuous counting method is used, that is, only when 3 or more "1"s are read continuously, it is considered a valid black line, and the number of black line blocks is recorded, otherwise it is cleared to zero, and finally check whether the number of black line blocks in this row is 1. If it is not 1, the second row of image data is used for judgment, and the number is incremented in this way until the only black line is found.

(2) Using the center coordinates found for the first time as a reference, search for the position of the black line in the interval of 10 points on its left and right sides in the upper row. Then, use the centroid method to calculate the center coordinate value of the black point in the interval and use it as the center coordinate reference point of this row.

(3) Follow step (2) and recursively move up one row at a time. If a row with all 0s is encountered, stop searching for black lines. The image shown in FIG6 is processed by the algorithm and the image obtained is shown in FIG7. It can be seen that this method can effectively eliminate image noise.

Reference address:Application of image acquisition and processing in intelligent vehicle system

Previous article:Design of automatic bus stop announcement system based on GPS/GPRS
Next article:Research on sensor layout of line-finding car based on magnetic field detection

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号