当前位置:网站首页>[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
边栏推荐
- Simple factory mode
- 2022-06-27:给出一个长度为n的01串,现在请你找到两个区间, 使得这两个区间中,1的个数相等,0的个数也相等, 这两个区间可以相交,但是不可以完全重叠,即两个区间的左右端点不可以完全一样。
- Secouer le son et se battre ~ prêter attention au blogueur
- Lazy loading and preloading of pictures
- Has any boss ever seen repeated binlog messages when MySQL CDC uses datastream
- Web3来临时的风口浪尖
- How to clean the nozzle of Epson l3153 printer
- Lamaba expression learning and common functional interfaces
- Resolve cross domain
- Analyse complète annuelle du marché chinois de l'audio en 2022
猜你喜欢

成长一夏 挑战赛来袭 | 学习、创作两大赛道,开启导师报名啦!

2022年中國音頻市場年度綜合分析

视频爆炸时代,谁在支撑视频生态网高速运行?

Uncover the mystery of SSL and learn how to protect data with SSL

Little knowledge about function templates --

Reading notes of top performance version 2 (II) -- Performance observation tool

From zero to one, I will teach you to build a "search by text and map" search service (I)

抖音实战~关注博主

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

Bitlock recovery occurs in win 10, and the blue screen error code is 0x1600007e
随机推荐
由两个栈组成的队列
2022年中國音頻市場年度綜合分析
Little knowledge about function templates --
The SQL of filincdc always reports this error when there are multiple tables. How can I solve it
From zero to one, I will teach you to build a "search by text and map" search service (I)
Introduction notes to machine learning
How to apply for ASTM E108 flame retardant test for photovoltaic panels?
Iso8191 test is mentioned in as 3744.1. Are the two tests the same?
MSc 307 (88) (2010 FTPC code) Part 5 low flame spread test
视频爆炸时代,谁在支撑视频生态网高速运行?
CDC全量抽取mysql数据时,怎么才能加快ChunkSplitter呢?
If mysqlcdc sets multiple parallelism, will the incremental data repeat?
What is the process of en 1101 flammability test for curtains?
Matlab exercises -- routine operation of matrix
快速下载JDK,除了官方Oracle下载,还有国内可以有最新版本的下载地址吗
Flinkcdc collects Oracle, and the Oracle database is CDB's
Recommended by Alibaba P8, Fiddler packet capturing tool (I)
【Matlab红绿灯识别】红绿灯识别【含GUI源码 1908期】
Reading notes of top performance version 2 (II) -- CPU monitoring
单一职责原则