当前位置:网站首页>[matlab traffic light identification] traffic light identification [including GUI source code 1908]
[matlab traffic light identification] traffic light identification [including GUI source code 1908]
2022-06-28 04:29:00 【Matlab fo Nu Tang Lian】
One 、 Code run video ( Bili, Bili )
Two 、 Introduction to traffic light identification
By 2015 year , The prevalence of blind people worldwide is 0.49%, There are about 3600 Ten thousand blind people , In our country 50 Blind people over the age of 532 ten thousand . Blind people have many difficulties in traveling . At present, there are not many researches on traffic light recognition for blind people in the market , The image recognition technology of identifying traffic lights is often applied to driverless technology . In this paper, we design a histogram threshold segmentation method HSV Traffic light recognition method for color recognition .
Threshold segmentation is a common image processing method , Because of its fast calculation speed 、 Implement a simple , So it is widely used in image processing . This method mainly calculates the corresponding criterion function according to the probability distribution of histogram , At the same time, intelligent optimization algorithm is used to speed up the threshold search , Thus, the appropriate threshold is selected for segmentation . among , Histogram threshold method is based on image histogram , Analyze it to realize image segmentation .HSV Color spatial 3 The components are relatively independent , and H and S The component is little affected by light and shadow occlusion . Use HSV Color space , Using different color threshold to recognize traffic light color , Eliminate most external environmental interference , Accurate and reliable .
1 Preprocessing
The street view image naturally captured by the camera contains complex and tedious graphics , And the change of external light affects the clarity of the image 、 The resolution has some influence . The preprocessing of street view image mainly includes image enhancement , Simple preprocessing methods include graying 、 Image enhancement and other steps . Han Zheng et al. Proposed an image binarization enhancement algorithm based on Monte Carlo simulation . At this stage , The accuracy of machine vision is insufficient . In practical industrial applications , The accuracy of machine vision is far lower than the experimental results , When the measuring environment changes , There will be a large deviation in the results , Poor adaptability to the environment . Changes in the external environment affect the shooting effect of street view images , It interferes with the location and identification of traffic lights . In order to reduce the interference of external environmental factors , Grayscale the image 、 Sharpen and enhance noise reduction . The pretreatment process is shown in the figure 1 Shown .
chart 1 Pretreatment process
2 Location of traffic lights
For a grayscale image , Histogram of the image [8] It can be regarded as an approximation of the probability density distribution function of pixel gray value . Suppose an image contains only the target object and the background , Then the histogram distribution of the image can be regarded as the probability density distribution of pixels with only the target object and the background .
Suppose that the gray level range of the histogram of a gray-scale image is i=0,1,2……k, Then the total pixels of this image are :
Gray scale i The probability of occurrence is :
Using histogram threshold segmentation algorithm to achieve image segmentation , Put forward hyperbolic two-dimensional Otsu Threshold segmentation algorithm , Using fuzzy histogram model to track moving objects , This paper uses histogram threshold segmentation method , It is suitable for simple traffic light segmentation . According to the histogram of gray image, the segmentation threshold of image can be analyzed , For grayscale images with obvious peaks and troughs , This method is accurate . The traffic light segmentation and positioning results are shown in the figure 2 Shown . chart 2 The first image in is the image after the first segmentation , It can be seen that its outline is blurred , It is not conducive to subsequent accurate positioning . Carry out corrosion operation on it , The outline is clearer than before . You can see , There are scattered noises in the second binary image , Use median filter to reduce noise , Get the final binary image . The chassis color of traffic lights is black , And in the images taken in real time , The traffic lights are usually located in the upper middle of the image , In the resulting image , Find the smallest element in the image matrix , The corresponding row is the row with the most black pixels in the binary image . Because in daily life , Whether it is a horizontal traffic light or a vertical traffic light , Length of traffic lights 、 The width and area are fixed , Thus, the position of the traffic light in the image can be determined .
3 Traffic light color recognition
RGB Color space :RGB Color mode is the most commonly used mode in industry , These include red (R)、 green (G) And blue (B). An image from this 3 It consists of two channels .HSV Color space :HSV The parameter of color in the model is hue (H)、 saturation (S) And brightness (V).
RGB Model is the most familiar color model , but RGB 3 High correlation of components , Cannot be used to separate two areas of similar color .HSV The model is also a color model ,HSV(hue,saturation,value) They represent hues 、 Saturation and lightness ,HSV Model ratio RGB The model is closer to people's perception of color ;HSV The model eliminates 3 Correlation between components , It has a better effect when dealing with images with similar colors .
about HSV Image color recognition , Through red, green and red 3 Colored HSV Values are different , Judge the color of the traffic light at the moment . First , take RGB Color is converted to HSV Model , Use the difference between the two models for numerical conversion . Red, yellow and green 3 Colored HSV Each are not identical , According to the red HSV The number , Set red respectively 、 green 、 yellow HSV Upper and lower limits of values . besides , Considering that there may be some differences in the color of traffic lights , For example, the red light of some traffic lights is more orange , Green tends to be cyan , And in the environment of strong light and weak light, the light also shows white , Set up HSV Numerical time , Put orange, cyan and white HSV The upper and lower bounds are added to the algorithm . Extract the traffic light image after segmentation HSV The value of three channels , According to the set HSV threshold , Determine which color components in the image occupy the majority , You can judge the status of the traffic lights at the moment .
3、 ... and 、matlab Edition and references
1 matlab edition
2014a
2 reference
[1] Cai Limei .MATLAB The image processing —— theory 、 Algorithm and example analysis [M]. tsinghua university press ,2020.
[2] Yang Dan , Zhao Haibin , Long Zhe .MATLAB Detailed explanation of image processing examples [M]. tsinghua university press ,2013.
[3] Zhou pin .MATLAB Image processing and graphical user interface design [M]. tsinghua university press ,2013.
[4] Liu Chenglong . Master MATLAB The image processing [M]. tsinghua university press ,2015.
[5] GUI Xinyue , Li Zhenwei , Wuchenchen , Liyanyue . be based on MATLAB Research on traffic light recognition system based on [J]. Electronic Design Engineering . 2020,28(16)
3 remarks
This part of the introduction is taken from the Internet , For reference only , If infringement , Contact deletion
边栏推荐
- Bitlock recovery occurs in win 10, and the blue screen error code is 0x1600007e
- Uncover the mystery of SSL and learn how to protect data with SSL
- Meichuang was selected into the list of "2022 CCIA top 50 Chinese network security competitiveness"
- GO语言-select语句
- How to clean the nozzle of Epson l3153 printer
- 有关函数模板的那些小知识-.-
- What are the password requirements for waiting insurance 2.0? What are the legal bases?
- xml  File read / write
- 01 overview, application scenarios, Download methods, connection methods and development history of mongodb
- The coming wave of Web3
猜你喜欢

27 years, Microsoft IE is over!

A summary of my recent situation in June 2022

Building a server monitoring platform with telegraf influxdb grafana

Bitlock recovery occurs in win 10, and the blue screen error code is 0x1600007e

27年,微软IE结束了!

Secouer le son et se battre ~ prêter attention au blogueur

Uncover the mystery of SSL and learn how to protect data with SSL
![leetcode:714. The best time to buy and sell stocks includes handling fee [DP dual status]](/img/e4/5ec39aced223512b162020d05eb313.png)
leetcode:714. The best time to buy and sell stocks includes handling fee [DP dual status]

Games104 operation 2-colorgrading

Digital promising, easy to reach, Huawei accelerates the layout of the commercial market with "five pole" star products
随机推荐
Iso8191 test is mentioned in as 3744.1. Are the two tests the same?
Moonbeam集成Coin98,给予用户在多链道路上的更多选择
由两个栈组成的队列
PostgreSQL implements batch update, deletion and insertion
Elk builds log analysis system + Zipkin service link tracking integration
2022年中国音频市场年度综合分析
Reading notes of top performance version 2 (II) -- CPU monitoring
05 mongodb summary of various column operations
Database garbled
Single responsibility principle
Flinkcdc collects Oracle, and the Oracle database is CDB's
@Several scenarios of transactional failure
What are the password requirements for waiting insurance 2.0? What are the legal bases?
揭开SSL的神秘面纱,了解如何用SSL保护数据
MSc 307 (88) (2010 FTPC code) Part 5 low flame spread test
Is it true that qiniu business school gives away securities accounts? Is it safe to open an account
2022年中國音頻市場年度綜合分析
Multithreading and high concurrency III: AQS underlying source code analysis and implementation classes
Lamaba expression learning and common functional interfaces
Building log analysis system with elk (III) -- Security Authentication