当前位置:网站首页>[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
边栏推荐
- Go language learning tutorial (14)
- Short video platform development, click links and pictures to automatically jump to a new page
- Introduction notes to machine learning
- Is it true that qiniu business school gives away securities accounts? Is it safe to open an account
- Pinda general permission system (day 5~day 6)
- filinCdc 的sql,多表的时候总报这个错,请问下该怎么解决呀
- The SQL of filincdc always reports this error when there are multiple tables. How can I solve it
- 27 years, Microsoft IE is over!
- Introduction to SQLSERVER database
- Sorting from one stack to another
猜你喜欢

揭开SSL的神秘面纱,了解如何用SSL保护数据

抖音实战~取关博主

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

一文详解|增长那些事儿

2022年中国音频市场年度综合分析

【Matlab红绿灯识别】红绿灯识别【含GUI源码 1908期】

TFTLCD display experiment of mini plate based on punctual atom stm32

Multi project design and development · introduction to class library project

Visualization of loss using tensorboard

Introduction to SQLSERVER database
随机推荐
Reading notes of top performance version 2 (II) -- Performance observation tool
Iso8191 test is mentioned in as 3744.1. Are the two tests the same?
《性能之巅第2版》阅读笔记(二)--性能观察工具
请问下,mysqlcdc设置多并行度的话,增量数据是不是会重复?
Meichuang data security management platform has obtained the evaluation certificate of "data security product capability verification plan" of the Institute
《性能之巅第2版》阅读笔记(二)--CPU监测
first. Net core MVC project
Genicam gentl standard ver1.5 (2)
快速下载JDK,除了官方Oracle下载,还有国内可以有最新版本的下载地址吗
[proteus simulation] timer 1 external counting interrupt
leetcode - 329. Longest increasing path in matrix
11_ Deliberate practice and elaboration
Database garbled
June 27, 2022: give a 01 string with a length of N. now please find two intervals so that the number of 1 and the number of 0 in the two intervals are equal. The two intervals can intersect, but not c
filinCdc 的sql,多表的时候总报这个错,请问下该怎么解决呀
Learning about DC-DC step-down chip of sy8120i (12V reduced to 3.3V)
@Several scenarios of transactional failure
mysql导入文本文件时的pager
Is it true that qiniu business school gives away securities accounts? Is it safe to open an account
xml  File read / write