CN102663345B - Method and apparatus for automatic identification of traffic lights - Google Patents

Method and apparatus for automatic identification of traffic lights Download PDF

Info

Publication number
CN102663345B
CN102663345B CN201210057390.7A CN201210057390A CN102663345B CN 102663345 B CN102663345 B CN 102663345B CN 201210057390 A CN201210057390 A CN 201210057390A CN 102663345 B CN102663345 B CN 102663345B
Authority
CN
China
Prior art keywords
traffic lights
region
color
image
kinds
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210057390.7A
Other languages
Chinese (zh)
Other versions
CN102663345A (en
Inventor
吴海东
王翔鹰
佘中华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN UNIHZ TECHNOLOGIES Co.,Ltd.
Original Assignee
UNIHZ TECHNOLOGIES CORP
ZHONGMENG INTELLIGENT TECHNOLOGY (SUZHOU) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by UNIHZ TECHNOLOGIES CORP, ZHONGMENG INTELLIGENT TECHNOLOGY (SUZHOU) Co Ltd filed Critical UNIHZ TECHNOLOGIES CORP
Priority to CN201210057390.7A priority Critical patent/CN102663345B/en
Publication of CN102663345A publication Critical patent/CN102663345A/en
Application granted granted Critical
Publication of CN102663345B publication Critical patent/CN102663345B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method for automatic identification of traffic lights, comprising the following steps of: initializing mean values and variances of the three colors red, green and yellow in HSV space; designating an area where the traffic lights are located; converting an input image from an RGB space to the HSV space; extracting the traffic light latent area, performing mathematical morphological treatment for the image and obtaining the distribution characteristics of chroma components of the traffic lights area; combining Gauss model with expectation maximization algorithm to determine mean values, variances and weight of the three Gauss models corresponding to the three colours according to the distribution characteristics of chroma components of the traffic lights area; calculating the probability of each point in traffic lights latent area belonging to the three colours according to the mean values, variances and weight of the three Gauss models, taking the colour with the maximum probability as the colour of current point and recording it; and counting the colour ratio of all pixel points in a certain connected domain, and taking the colour with the maximum ratio as the colour of the domain. The method can reduce difficulties in installation and maintenance.

Description

Automatically method and the device of identification traffic lights
Technical field
The invention belongs to intelligent transportation field, particularly a kind of method of automatic identification traffic lights and device.
Background technology
In the electronic police based on coil, the state of traffic lights mainly obtains by intersection annunciator.The features such as this mode has accurately, stable.But along with electronic police equipment based on video mode is widely applied, the mode of obtaining lights state by teleseme exists the problems such as installation and maintenance difficulty, the system compatibility of equipment be poor, the cost of simultaneity factor is also higher.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method of automatic identification traffic lights, is intended to solve the technical matters of equipment installation and maintenance difficulty in prior art.
In order to realize goal of the invention, the invention provides a kind of method of automatic identification traffic lights, comprise the following steps:
Average and the variance of red, green, yellow three kinds of colors in initialization HSV space;
The region at specification signal lamp place;
Input picture is transformed into HSV space from rgb space;
Extract the potential region of signal lamp, and image is made to morphology processing, obtain the distribution characteristics of signal lamp region chromatic component;
According to the distribution characteristics of signal lamp region chromatic component, with expectation maximization EM algorithm, in conjunction with Gauss model, obtain average, variance and the weight of described three kinds of corresponding three Gauss models of color;
According to the average of three Gauss models, variance and weight, the each point that calculates the potential region of signal lamp belongs to the probability of three kinds of colors, the color of getting the current point of conduct of maximum probability, and record;
Add up the color-ratio of all pixels in a certain connected domain, the color that the color of getting ratio maximum is this region.
Preferably, the potential region of described extraction signal lamp is:
The point that the brightness value of signal lamp is greater than to given threshold value is judged to be potential region.
Preferably, the region at described specification signal lamp place is:
The rectangular area at specification signal lamp place when lamp system starts.
The present invention separately provides a kind of device of automatic identification traffic lights, and it comprises:
Initialization module, for average and the variance of the red, green, yellow three kinds of colors in initialization HSV space;
Region specification module, is used to specify the region at signal lamp place;
Image conversion module, for being transformed into HSV space by input picture from rgb space;
Chromatic component acquisition module, for extracting the potential region of signal lamp, and makes morphology processing to image, obtains the distribution characteristics of signal lamp region chromatic component;
Color parameter acquisition module, for according to the distribution characteristics of signal lamp region chromatic component, obtains average, variance and the weight of described three kinds of corresponding three Gauss models of color in conjunction with Gauss model with expectation maximization EM algorithm;
Computing module, for according to the average of three Gauss models, variance and weight, the each point that calculates the potential region of signal lamp belongs to the probability of three kinds of colors, the color of getting the current point of conduct of maximum probability, and record;
Statistical module, for adding up the color-ratio of all pixels of a certain connected domain, the color that the color of getting ratio maximum is this region.
Preferably, described chromatic component acquisition module is further used for: the point that the brightness value of signal lamp is greater than to given threshold value is judged to be potential region.
Preferably, described Region specification module is further used for: the rectangular area at specification signal lamp place when lamp system starts.
The present invention is by having adopted HSV image to process and algorithm for pattern recognition, mode based on pure video is identified the state of traffic lights, without adding other hardware device, cost is lower, and applicable to any electronic police equipment based on video mode, give the bringing great convenience property of installation and maintenance of equipment.
Accompanying drawing explanation
Fig. 1 is the method flow diagram of automatically identifying traffic lights in one embodiment of the invention;
Fig. 2 is the structural representation of automatically identifying the device of traffic lights in one embodiment of the invention.
Realization, functional characteristics and the advantage of the object of the invention, in connection with embodiment, are described further with reference to accompanying drawing.
Embodiment
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
With reference to Fig. 1, Fig. 1 is the process flow diagram that the present invention identifies the embodiment of the method for traffic lights automatically.As shown in Figure 1, this flow process comprises the following steps:
Step S10, average and the variance of red, green, yellow three kinds of colors in initialization color model HSV directly perceived space; HSV space is the most frequently used color space of histogram.Its three components represent respectively color (Hue), saturation degree (Saturation) and value (Value).
Step S20, the region at specification signal lamp place; Because the position of signal lamp in image is relatively fixing, algorithm can be accelerated in appointed area, avoids full figure search.In the embodiment of the present invention, can be when lamp system starts the rectangular area at specification signal lamp place.
Step S30, is transformed into HSV space by input picture from primaries pattern rgb space; In HSV space, the brightness in signal lamp region and chrominance information are obtained fairly simple, and the green three kinds of colors of reddish yellow its chromatic component in HSV space has good differentiation, and therefore algorithm moves in hsv color space.
Step S40, extracts the potential region of signal lamp, and image is made to morphology processing, obtains the distribution characteristics of signal lamp region chromatic component; In order to reduce the impact of non-signal lamp region on statistics, the every frame of algorithm extracts the potential site of signal lamp, on potential region, adds up.Monochrome information is mainly used in the extraction in potential region, and brightness value is greater than the point of given threshold value and thinks potential region.
Step S50, according to the distribution characteristics of signal lamp region chromatic component, with expectation maximization EM algorithm Expectation-maximization algorithm) in conjunction with Gauss model, obtain average, variance and the weight of described three kinds of corresponding three Gauss models of color; This step is obtained the required chroma histogram of HSV space computing, with the distribution characteristics of statistical signal lamp region chromatic component.Each some chromatic component is stretched on 0~255.
Step S60, according to the average of three Gauss models, variance and weight, the each point that calculates the potential region of signal lamp belongs to the probability of three kinds of colors, the color of getting the current point of conduct of maximum probability, and record; According to the statistical nature of chroma histogram, can be by three Gauss models matching statistics that superposes.
Step S70, the color-ratio of adding up all pixels in a certain connected domain, the color that the color of getting ratio maximum is this region.
The inventive method embodiment is by having adopted HSV image to process and algorithm for pattern recognition, mode based on pure video is identified the state of traffic lights, without adding other hardware device, cost is lower, and applicable to any electronic police equipment based on video mode, give the bringing great convenience property of installation and maintenance of equipment.
The present invention separately provides a kind of device of automatic identification traffic lights, and as shown in Figure 2, it comprises:
Initialization module 10, for average and the variance of the red, green, yellow three kinds of colors in initialization HSV space;
Region specification module 20, is used to specify the region at signal lamp place; Because the position of signal lamp in image is relatively fixing, algorithm can be accelerated in appointed area, avoids full figure search.In the embodiment of the present invention, Region specification module 20 can be when lamp system starts the rectangular area at specification signal lamp place.
Image conversion module 30, for being transformed into HSV space by input picture from rgb space; In HSV space, the brightness in signal lamp region and chrominance information are obtained fairly simple, and the green three kinds of colors of reddish yellow its chromatic component in HSV space has good differentiation, therefore by image conversion module 30, image is transformed into hsv color space, so that follow-up image is processed, in hsv color space, moves.
Chromatic component acquisition module 40, for extracting the potential region of signal lamp, and makes morphology processing to image, obtains the distribution characteristics of signal lamp region chromatic component; In order to reduce the impact of non-signal lamp region on statistics, the every frame of chromatic component acquisition module 40 extracts the potential site of signal lamp, on potential region, adds up.Monochrome information is mainly used in the extraction in potential region, and brightness value is greater than the point of given threshold value and thinks potential region.
Color parameter acquisition module 50, for according to the distribution characteristics of signal lamp region chromatic component, obtains average, variance and the weight of described three kinds of corresponding three Gauss models of color in conjunction with Gauss model with expectation maximization EM algorithm; Color parameter acquisition module 50 obtains the required chroma histogram of HSV space computing, with the distribution characteristics of statistical signal lamp region chromatic component.Each some chromatic component is stretched on 0~255.
Computing module 60, for according to the average of three Gauss models, variance and weight, the each point that calculates the potential region of signal lamp belongs to the probability of three kinds of colors, the color of getting the current point of conduct of maximum probability, and record; According to the statistical nature of chroma histogram, computing module 60 can be by three Gauss models matching statistics that superposes.
Statistical module 70, for adding up the color-ratio of all pixels of a certain connected domain, the color that the color of getting ratio maximum is this region.
These are only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (6)

1. a method of automatically identifying traffic lights, is characterized in that, comprises the following steps:
Average and the variance of red, green, yellow three kinds of colors in initialization video image HSV space;
Specify the region at traffic lights place;
Input picture is transformed into HSV space from rgb space;
Extract the potential region of traffic lights in image, and image is made to morphology processing, obtain the distribution characteristics of traffic lights region chromatic component;
According to the distribution characteristics of traffic lights region chromatic component, with expectation maximization EM algorithm, in conjunction with Gauss model, obtain average, variance and the weight of described three kinds of corresponding three Gauss models of color;
According to the average of three Gauss models, variance and weight, in computed image, each point in the potential region of traffic lights belongs to the probability of three kinds of colors, gets the color of the current point of conduct of maximum probability, and record;
The color-ratio of all pixels in a certain connected domain of statistical picture, the color that the color of getting ratio maximum is this connected domain.
2. the method for claim 1, is characterized in that, in described extraction image, the potential region of traffic lights is:
The point that the brightness value of traffic lights is greater than to given threshold value is judged to be the potential region of traffic lights.
3. method as claimed in claim 2, is characterized in that, the region at described appointment traffic lights place is:
When starting, traffic light system specifies the rectangular area at traffic lights place.
4. a device of automatically identifying traffic lights, is characterized in that, comprising:
Initialization module, for average and the variance of the red, green, yellow three kinds of colors in initialization video image HSV space;
Region specification module, is used to specify the region at traffic lights place;
Image conversion module, for being transformed into HSV space by input picture from rgb space;
Chromatic component acquisition module, for extracting the potential region of image traffic lights, and makes morphology processing to image, obtains the distribution characteristics of traffic lights region chromatic component;
Color parameter acquisition module, for according to the distribution characteristics of traffic lights region chromatic component, obtains average, variance and the weight of described three kinds of corresponding three Gauss models of color in conjunction with Gauss model with expectation maximization EM algorithm;
Computing module, for according to the average of three Gauss models, variance and weight, in computed image, each point in the potential region of traffic lights belongs to the probability of three kinds of colors, gets the color of the current point of conduct of maximum probability, and record;
Statistical module, for the color-ratio of all pixels of a certain connected domain of statistical picture, the color that the color of getting ratio maximum is this connected domain.
5. device as claimed in claim 4, is characterized in that, described chromatic component acquisition module is further used for: the point that the brightness value of traffic lights is greater than to given threshold value is judged to be the potential region of traffic lights.
6. device as claimed in claim 5, is characterized in that, described Region specification module is further used for:
When starting, traffic light system specifies the rectangular area at traffic lights place.
CN201210057390.7A 2012-03-07 2012-03-07 Method and apparatus for automatic identification of traffic lights Active CN102663345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210057390.7A CN102663345B (en) 2012-03-07 2012-03-07 Method and apparatus for automatic identification of traffic lights

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210057390.7A CN102663345B (en) 2012-03-07 2012-03-07 Method and apparatus for automatic identification of traffic lights

Publications (2)

Publication Number Publication Date
CN102663345A CN102663345A (en) 2012-09-12
CN102663345B true CN102663345B (en) 2014-04-16

Family

ID=46772829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210057390.7A Active CN102663345B (en) 2012-03-07 2012-03-07 Method and apparatus for automatic identification of traffic lights

Country Status (1)

Country Link
CN (1) CN102663345B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103325107B (en) * 2013-05-22 2016-12-28 小米科技有限责任公司 Image processing method, device and terminal unit
CN103488987B (en) * 2013-10-15 2017-04-19 浙江宇视科技有限公司 Video-based method and device for detecting traffic lights
CN104093010B (en) * 2013-11-15 2016-08-17 腾讯科技(深圳)有限公司 A kind of image processing method and device
CN103901175B (en) * 2014-04-23 2016-06-08 爱威科技股份有限公司 A kind of reagent paper localization method and system
CN105809095B (en) * 2014-12-31 2020-03-03 博世汽车部件(苏州)有限公司 Determination of traffic intersection passage state
CN104537354A (en) * 2015-01-09 2015-04-22 博康智能网络科技股份有限公司 Target color recognition method and system for video surveillance
CN106611402B (en) * 2015-10-23 2019-06-14 腾讯科技(深圳)有限公司 Image processing method and device
CN105608417B (en) * 2015-12-15 2018-11-06 福州华鹰重工机械有限公司 Traffic lights detection method and device
CN107689157B (en) * 2017-08-30 2021-04-30 电子科技大学 Traffic intersection passable road planning method based on deep learning
CN112036392B (en) * 2020-07-22 2022-05-03 四川长宁天然气开发有限责任公司 Automatic identification method for states of UPS (uninterrupted Power supply) indicator lamps of production station of shale gas field
CN113458013A (en) * 2021-05-13 2021-10-01 深圳市蓝际工业技术有限公司 Construction waste sorting system and method based on CCD detection and belt feeding
CN113361453A (en) * 2021-06-25 2021-09-07 东风汽车集团股份有限公司 Traffic light identification system and method under visual fuzzy scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009021902A1 (en) * 2007-08-16 2009-02-19 Siemens Aktiengesellschaft Method and device for prioritizing special-purpose vehicles at a traffic light-controlled intersection
CN101908271A (en) * 2010-06-28 2010-12-08 青岛海信网络科技股份有限公司 Signal lamp color identification method and device
CN102176287A (en) * 2011-02-28 2011-09-07 无锡中星微电子有限公司 Traffic signal lamp identifying system and method
CN102354457A (en) * 2011-10-24 2012-02-15 复旦大学 General Hough transformation-based method for detecting position of traffic signal lamp

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009021902A1 (en) * 2007-08-16 2009-02-19 Siemens Aktiengesellschaft Method and device for prioritizing special-purpose vehicles at a traffic light-controlled intersection
CN101908271A (en) * 2010-06-28 2010-12-08 青岛海信网络科技股份有限公司 Signal lamp color identification method and device
CN102176287A (en) * 2011-02-28 2011-09-07 无锡中星微电子有限公司 Traffic signal lamp identifying system and method
CN102354457A (en) * 2011-10-24 2012-02-15 复旦大学 General Hough transformation-based method for detecting position of traffic signal lamp

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
《基于Lab色彩空间和模版匹配的实时交通灯识别算法》;徐成等;《计算机应用》;20100531;第30卷(第5期);全文 *
《基于图像处理的交通信号灯识别方法》;武莹等;《交通信息与安全》;20110331;第29卷(第161期);全文 *
《应用圆形度和颜色直方图的交通信号灯识别》;谷明琴等;《计算机工程与设计》;20120131;第33卷(第1期);全文 *
徐成等.《基于Lab色彩空间和模版匹配的实时交通灯识别算法》.《计算机应用》.2010,第30卷(第5期),全文.
武莹等.《基于图像处理的交通信号灯识别方法》.《交通信息与安全》.2011,第29卷(第161期),全文.
谷明琴等.《应用圆形度和颜色直方图的交通信号灯识别》.《计算机工程与设计》.2012,第33卷(第1期),全文.

Also Published As

Publication number Publication date
CN102663345A (en) 2012-09-12

Similar Documents

Publication Publication Date Title
CN102663345B (en) Method and apparatus for automatic identification of traffic lights
CN102496282B (en) Traffic intersection signal light state identification method based on RGB color transformation
CN103699532B (en) Image color retrieval method and system
CN103488987A (en) Video-based method and device for detecting traffic lights
WO2018149253A1 (en) Image processing method and device
CN106503719A (en) A kind of object color is extracted and detection method and device
CN111429370B (en) Underground coal mine image enhancement method, system and computer storage medium
CN107659799B (en) Image pickup apparatus, image processing method, and storage medium
CN102881160B (en) Outdoor traffic sign identification method under low-illumination scene
CN103310201B (en) The recognition methods of target blend color
CN101930596A (en) Color constancy method in two steps under a kind of complex illumination
Liu et al. A fog level detection method based on image HSV color histogram
CN108062554B (en) Method and device for identifying color of vehicle annual inspection label
CN103065334A (en) Color cast detection and correction method and device based on HSV (Hue, Saturation, Value) color space
CN104021527B (en) Rain and snow removal method in image
Wonghabut et al. Traffic light color identification for automatic traffic light violation detection system
CN105426816A (en) Method and device of processing face images
WO2020119454A1 (en) Method and apparatus for color reproduction of image
KR101428923B1 (en) System and Method for Automatic Extraction of Component Packaging Regions in PCB
CN104574377A (en) Method for correcting yellow cast of red lamp of electronic police
CN111160215B (en) Brightness regulator and method for image mark
Zhang et al. A novel color space based on RGB color barycenter
CN102930542B (en) The remarkable detection method of a kind of vector quantization based on global contrast
CN108961357B (en) Method and device for strengthening over-explosion image of traffic signal lamp
Wang et al. An efficient method of shadow elimination based on image region information in HSV color space

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Free format text: FORMER OWNER: ZHONGMENG SCIENCE-TECHNOLOGY CO., LTD., SHENZHEN

Effective date: 20150727

Owner name: ZHONGMENG SCIENCE-TECHNOLOGY CO., LTD., SHENZHEN

Free format text: FORMER OWNER: UNIHZ INTELLIGENT TECHNOLOGY (SUZHOU) CO., LTD.

Effective date: 20150727

C41 Transfer of patent application or patent right or utility model
C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 215000, A2-303, room 99, 304 benevolence Road, Suzhou Industrial Park, Suzhou, Jiangsu, China

Patentee after: Zhongmeng Intelligent Technology (Suzhou) Co.,Ltd.

Patentee after: SHENZHEN UNIHZ TECHNOLOGIES CO.,LTD.

Address before: 215000, A2-303, room 99, 304 benevolence Road, Suzhou Industrial Park, Suzhou, Jiangsu, China

Patentee before: Zhongmeng Intelligent Technology (Suzhou) Co.,Ltd.

Patentee before: Shenzhen Unihz Technologies Corp.

TR01 Transfer of patent right

Effective date of registration: 20150727

Address after: 518000, Shenzhen, Guangdong, Nanshan District Nanshan commercial and cultural center Tianli Central Business Plaza (phase two) C-3005

Patentee after: SHENZHEN UNIHZ TECHNOLOGIES CO.,LTD.

Address before: 215000, A2-303, room 99, 304 benevolence Road, Suzhou Industrial Park, Suzhou, Jiangsu, China

Patentee before: Zhongmeng Intelligent Technology (Suzhou) Co.,Ltd.

Patentee before: SHENZHEN UNIHZ TECHNOLOGIES CO.,LTD.

C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 518000, Shenzhen, Guangdong, Nanshan District Nanshan commercial and cultural center Tianli Central Business Plaza (phase two) C-3005

Patentee after: SHENZHEN UNIHZ TECHNOLOGIES Co.,Ltd.

Address before: 518000, Shenzhen, Guangdong, Nanshan District Nanshan commercial and cultural center Tianli Central Business Plaza (phase two) C-3005

Patentee before: SHENZHEN UNIHZ TECHNOLOGIES CO.,LTD.