CN102779349B - Foggy day detecting method based on image color spatial feature - Google Patents
Foggy day detecting method based on image color spatial feature Download PDFInfo
- Publication number
- CN102779349B CN102779349B CN201210226642.4A CN201210226642A CN102779349B CN 102779349 B CN102779349 B CN 102779349B CN 201210226642 A CN201210226642 A CN 201210226642A CN 102779349 B CN102779349 B CN 102779349B
- Authority
- CN
- China
- Prior art keywords
- pixel
- component
- value
- weather
- place
- 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.)
- Expired - Fee Related
Links
Landscapes
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention provides a foggy day detecting method based on an image color spatial feature. The method comprises the following steps of first step, obtaining a background picture through a video image or a single image; step 2, performing color space conversion for the background picture, and extracting the color space feature: firstly performing color space conversion for the background picture, converting from an RGB (red-green-blue) color space into an HSV (hue, saturation, value) color space, and extracting the features of various components of the HSV according to the information included image; and step 3, dividing the weather information included image into a non-foggy day, a little foggy day and a dense foggy day according to the identification conditions: at first, if the identification condition 1 is met, the weather is the dense foggy day, otherwise the identification is continued; secondly, if the identification condition 2 is met, the weather is the non-foggy day, otherwise, the identification is continued; and finally, if the identification condition 3 is met, the weather is the little foggy day, otherwise, the weather is the dense foggy day. The method provided by the invention is suitable for being used for monitoring the foggy day in expressways, particularly pre-warning the emergency of agglomerate fog in partial road segments, thus, the safe road driving can be ensured.
Description
Technical field
The present invention relates to digital video image process and traffic weather detection field, is a kind of foggy day detection method based on color of image HSV feature.
Background technology
Visibility is one of key element of road weather conditions system.At traffic high speed networking, the grasp of a road visibility is related to the major issue of road user safety of life and property, reporting for work of the pernicious traffic hazard caused due to low visibility is of common occurrence, in low visibility situation, the reaction velocity of the mankind declined, especially all the more so in high speed traveling process., fast, weather conditions information just can provide and warn in advance accurately, thus management and road users choose safe road occupation route and drive speed to help high-speed transit road management department to carry out rationally effectively super expressway.
The current observation for dense fog has mainly come by artificial visually examine, special installation monitoring station, mainly by installing advanced optical devices, by receiving and measuring the intensity of scattered beam, accurately measure the air visibility on current highway, judged whether that dense fog occurs.Because the length of the expense of apparatus expensive and super expressway is comparatively large, layout research station intensive on a highway, catches the group's mist haunted everywhere, obvious too expensive.
For the detection technique of the traditional greasy weather visibility based on image, need to carry out on-site proving to video camera, wherein not only need to know the various parameter in the inside of video camera, and need the position angle etc. knowing installation, and needing corresponding corresponding scene, computing is complicated and cost is also higher.
Foggy day detection method becomes the importance of institute's primary study that high-speed transit controls relevant departments in recent years, is putting before this, researchs and proposes a kind of simple, convenient, detection method fast.
Summary of the invention
The present invention is a kind of foggy day detection method based on color of image space characteristics, first by video image or single image background extraction picture, then color space conversion (from RGB to HSV) is carried out to background picture, and then feature extraction is carried out to HSV, utilize the feature extracted to carry out qualitative detection to weather, be divided into non-greasy weather gas, little greasy weather gas, foggy weather.
The present invention adopts following technical scheme:
Based on a foggy day detection method for color of image HSV feature, implement according to following steps:
Based on a foggy day detection method for color of image space characteristics, it is characterized in that, implement according to following steps:
Step 1: initialization, reads in road traffic image or video,
Step 2: if read in piece image in step 1, then read in picture and be background picture I
1; If what read in step 1 is video, be then handled as follows, background extraction picture I
1:
The N frame picture read in from video camera, N=30 ~ 40, statistics comes across the number of times of same color gray-scale value on the same pixel of 30 ~ 40 frame pictures, and with the highest color gray-scale value picture I as a setting of occurrence number
1the color gray-scale value of respective pixel point, mathematic(al) representation is:
Background(i,j)=Max(P(i,j,n))n=0,1,2,...,255
In formula, P (i, j, n) represents the number of times that pixel (i, j) place color gray level n occurs, initial value is 0, I
k(i, j, m) represents that in kth two field picture, pixel (i, j) place gray level is m, m=0,1,2, ..., 255, Background (i, j) for background picture is at the color gray-scale value of (i, j), Max (P (i, j, n)) be P (i, j, n) color gray-scale value represented when the number of times occurred is maximum, carries out traversing operation to every bit in image, obtains background picture I
1,
Step 3: to background picture I
1carry out color space conversion, from RGB color space conversion to hsv color space:
Each pixel form and aspect component H (i, j) are obtained by following formula:
Herein
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Saturation degree component S (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Chrominance component V (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
To the conversion that each pixel of Target Photo is carried out as above, obtain background picture I
1hsv color space,
Step 4: to background picture I
1the color space of HSV carries out feature extraction, specific as follows:
4.1) form and aspect component H feature AveH: statistics background picture I
1in the summation SumH of each pixel H component value, H component value be not 0 pixel add up to M
1, then H component characterization AveH=SumH/M
1;
4.2) saturation degree component S feature AveS: statistics background picture I
1in the summation SumS of each pixel S component value, S component value be not 0 pixel add up to M
2, then S component characterization AveS=SumS/M
2;
4.3) chrominance component V feature AveV: statistics background picture I
1in the summation SumV of each pixel V component value, V component value be not 0 pixel add up to M
3, then V component characterization AveV=SumV/M
3;
Step 5: according to the background picture I obtained in step 4
1the feature of HSV, according to decision condition 1, mark off the foggy weather with specific characteristic, decision condition 1 is expressed as follows:
AveH<125&&AveS<0.200&&AveV<0.4800
Meet above-mentioned condition, then weather is dense fog, otherwise carries out next step simultaneously,
Step 6: to when being judged to be no in step 5, according to decision condition 2, mark off non-greasy weather weather, decision condition 2 expression formula is as follows:
(if AveS > 0.1050 & & AveH < 200)
Or (Aves > 0.200 & & AveH > 120),
Or 0.0700 < AveS < 0.1050 & & 120 < AveH < 200,
Meet any one condition above-mentioned, be then the non-greasy weather, no person carries out next step,
Step 7: to when being judged to be no in step 6, according to decision condition 3, mark off little greasy weather gas, decision condition 3 is expressed as follows:
AveS<0.0700&&AveH<100&&AveV<0.500,
Meet above-mentioned condition, then weather is little mist simultaneously, otherwise is dense fog.
Compared with prior art, the invention has the advantages that:
1, the present invention utilizes color of image spatial information, for weather condition in road traffic, can mark off non-greasy weather gas, little greasy weather gas and foggy weather more exactly, to realize reporting to the police to the greasy weather and road carries out safety management;
2, the hsv color spatial information that comprises according to image self of the present invention, utilize the feature of its each component under different weather qualitatively to mark off different weather situation, algorithm is simpler, parameter adjustment is convenient, travelling speed is very fast, avoid and complicated on-site proving link is carried out to video camera, realize the detection of pin-point accuracy.
3, compared with the cost of traditional visibility detector costliness, cost of the present invention is lower, and make the present invention can realize large-area covering in actual field application, real realization is detected in real time road conditions, managed and early warning, ensures traffic safety
Accompanying drawing illustrates:
Fig. 1 is the particular flow sheet that whole system detects.
Embodiment:
In a particular embodiment, will by reference to the accompanying drawings, know the detailed process of the foggy day detection method intactly described based on color of image HSV feature.
Concrete steps are as follows:
Based on a foggy day detection method for color of image space characteristics, implement according to following steps:
Step 1: initialization, reads in road traffic image or video,
Step 2: if read in piece image in step 1, then read in picture and be background picture I
1; If what read in step 1 is video, be then handled as follows, background extraction picture I
1:
The N frame picture read in from video camera, N=30 ~ 40, statistics comes across the number of times of same color gray-scale value on the same pixel of 30 ~ 40 frame pictures, and with the highest color gray-scale value picture I as a setting of occurrence number
1the color gray-scale value of respective pixel point, mathematic(al) representation is:
Background(i,j)=Max(P(i,j,n))n=0,1,2,...,255
In formula, P (i, j, n) represents the number of times that pixel (i, j) place color gray level n occurs, initial value is 0, I
k(i, j, m) represents that in kth two field picture, pixel (i, j) place gray level is m, m=0,1,2, ..., 255, Background (i, j) for background picture is at the color gray-scale value of (i, j), Max (P (i, j, n)) be P (i, j, n) color gray-scale value represented when the number of times occurred is maximum, carries out traversing operation to every bit in image, obtains background picture I
1,
Step 3: to background picture I
1carry out color space conversion, from RGB color space conversion to hsv color space:
Each pixel form and aspect component H (i, j) are obtained by following formula:
Herein
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Saturation degree component S (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Chrominance component V (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
To the conversion that each pixel of Target Photo is carried out as above, obtain background picture I
1hsv color space,
Step 4: to background picture I
1the color space of HSV carries out feature extraction, specific as follows:
4.1) form and aspect component H feature AveH: statistics background picture I
1in the summation SumH of each pixel H component value, H component value be not 0 pixel add up to M
1, then H component characterization AveH=SumH/M
1;
4.2) saturation degree component S feature AveS: statistics background picture I
1in the summation SumS of each pixel S component value, S component value be not 0 pixel add up to M
2, then S component characterization AveS=SumS/M
2;
4.3) chrominance component V feature AveV: statistics background picture I
1in the summation SumV of each pixel V component value, V component value be not 0 pixel add up to M
3, then V component characterization AveV=SumV/M
3;
Step 5: according to the background picture I obtained in step 4
1the feature of HSV, according to decision condition 1, mark off the foggy weather with specific characteristic, decision condition 1 is expressed as follows:
AveH<125&&AveS<0.200&&AveV<0.4800
Meet above-mentioned condition, then weather is dense fog, otherwise carries out next step simultaneously,
Step 6: to when being judged to be no in step 5, according to decision condition 2, mark off non-greasy weather weather, decision condition 2 expression formula is as follows:
(if AveS > 0.1050 & & AveH < 200)
Or (Aves > 0.200 & & AveH > 120),
Or 0.0700 < AveS < 0.1050 & & 120 < AveH < 200,
Meet any one condition above-mentioned, be then the non-greasy weather, no person carries out next step,
Step 7: to when being judged to be no in step 6, according to decision condition 3, mark off little greasy weather gas, decision condition 3 is expressed as follows:
AveS<0.0700&&AveH<100&&AveV<0.500,
Meet above-mentioned condition, then weather is little mist simultaneously, otherwise is dense fog.
Claims (1)
1. based on a foggy day detection method for color of image space characteristics, it is characterized in that, implement according to following steps:
Step 1: initialization, reads in road traffic image or video,
Step 2: if read in piece image in step 1, then read in picture and be background picture I
1; If what read in step 1 is video, be then handled as follows, background extraction picture I
1:
From video camera, read in N frame picture, N=30 ~ 40, statistics comes across the number of times of same color gray-scale value on the same pixel of 30 ~ 40 frame pictures, and with the highest color gray-scale value picture I as a setting of occurrence number
1the color gray-scale value of respective pixel point, mathematic(al) representation is:
Background(i,j)=Max(P(i,j,n)) n=0,1,2,...,255
In formula, P (i, j, n) represents the number of times that pixel (i, j) place color gray level n occurs, initial value is 0, I
k(i, j, m) represents that in kth two field picture, pixel (i, j) place gray level is m, m=0,1,2, ..., 255, Background (i, j) for background picture is at the color gray-scale value of (i, j), Max (P (i, j, n)) be P (i, j, n) color gray-scale value represented when the number of times occurred is maximum, carries out traversing operation to every bit in image, obtains background picture I
1,
Step 3: to background picture I
1carry out color space conversion, from RGB color space conversion to hsv color space:
Each pixel form and aspect component H (i, j) are obtained by following formula:
Herein
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Saturation degree component S (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
Chrominance component V (i, j) is as follows:
Wherein, the red component intensity at pixel (i, j) place is R (i, j), effective value between 0 to 255, pixel (i, j) the green component intensity at place is G (i, j), effective value between 0 to 255, pixel (i, j) the blue component intensity at place is B (i, j), effective value is between 0 to 255
To the conversion that each pixel of Target Photo is carried out as above, obtain background picture I
1hsv color space,
Step 4: to background picture I
1hsv color space carry out feature extraction, specific as follows:
4.1) form and aspect component H feature AveH: statistics background picture I
1in the summation SumH of each pixel H component value, H component value be not 0 pixel add up to M
1, then form and aspect component H feature AveH=SumH/M
1;
4.2) saturation degree component S feature AveS: statistics background picture I
1in the summation SumS of each pixel S component value, S component value be not 0 pixel add up to M
2, then saturation degree component S feature AveS=SumS/M
2;
4.3) chrominance component V feature AveV: statistics background picture I
1in the summation SumV of each pixel V component value, V component value be not 0 pixel add up to M
3, then chrominance component V feature AveV=SumV/M
3;
Step 5: according to the background picture I obtained in step 4
1hSV feature, according to decision condition 1, mark off the foggy weather with specific characteristic, decision condition 1 is expressed as follows:
AveH<125&&AveS<0.200&&AveV<0.4800
Meet above-mentioned condition, then weather is dense fog, otherwise carries out next step simultaneously,
Step 6: to when being judged to be no in step 5, according to decision condition 2, mark off non-greasy weather weather, decision condition 2 expression formula is as follows:
(if AveS > 0.1050 & & AveH < 200),
Or (AveS > 0.200 & & AveH > 120),
Or 0.0700 < AveS < 0.1050 & & 120 < AveH < 200,
Meet any one condition above-mentioned, be then the non-greasy weather, no person carries out next step,
Step 7: to when being judged to be no in step 6, according to decision condition 3, mark off little greasy weather gas, decision condition 3 is expressed as follows:
AveS<0.0700&&AveH<100&&AveV<0.500,
Meet above-mentioned condition, then weather is little mist simultaneously, otherwise is dense fog.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210226642.4A CN102779349B (en) | 2012-06-30 | 2012-06-30 | Foggy day detecting method based on image color spatial feature |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210226642.4A CN102779349B (en) | 2012-06-30 | 2012-06-30 | Foggy day detecting method based on image color spatial feature |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102779349A CN102779349A (en) | 2012-11-14 |
CN102779349B true CN102779349B (en) | 2015-02-18 |
Family
ID=47124258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210226642.4A Expired - Fee Related CN102779349B (en) | 2012-06-30 | 2012-06-30 | Foggy day detecting method based on image color spatial feature |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102779349B (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103065133A (en) * | 2013-01-21 | 2013-04-24 | 信帧电子技术(北京)有限公司 | Method and device for detecting pedestrian in foggy weather |
CN103323889A (en) * | 2013-07-08 | 2013-09-25 | 昆明理工大学 | Weather condition identification method based on image gray level statistics |
CN103927523B (en) * | 2014-04-24 | 2017-01-18 | 东南大学 | Fog level detection method based on longitudinal gray features |
CN104504736B (en) * | 2015-01-19 | 2017-10-31 | 河北大学 | A kind of method and system for recognizing field crop growing way monitoring image Green plant |
CN106709445A (en) * | 2016-12-20 | 2017-05-24 | 清华大学苏州汽车研究院(吴江) | Freeway foggy weather detection early warning method based on video image |
CN106599874B (en) * | 2016-12-26 | 2019-07-30 | 清华大学苏州汽车研究院(吴江) | A kind of group's mist detection method based on video analysis |
CN106971453B (en) * | 2017-04-06 | 2020-01-14 | 深圳怡化电脑股份有限公司 | Paper money fragment splicing method and device |
CN108182679B (en) * | 2017-12-27 | 2020-07-28 | 上海传英信息技术有限公司 | Haze detection method and device based on photos |
CN108846324B (en) * | 2018-05-28 | 2020-06-30 | 中用科技有限公司 | Road fog detection method based on image |
CN109241831B (en) * | 2018-07-26 | 2021-11-26 | 东南大学 | Night fog visibility classification method based on image analysis |
CN109285187A (en) * | 2018-09-11 | 2019-01-29 | 东南大学 | A kind of farthest visible point detecting method based on traffic surveillance videos image |
CN112750170B (en) * | 2019-10-31 | 2024-05-17 | 华为技术有限公司 | Fog feature recognition method and device and related equipment |
CN110853181A (en) * | 2019-11-05 | 2020-02-28 | 杭州晶一智能科技有限公司 | Multi-functional back vision vehicle event data recorder of car with automatic defogging function |
CN111815528A (en) * | 2020-06-30 | 2020-10-23 | 上海电力大学 | Bad weather image classification enhancement method based on convolution model and feature fusion |
CN111783732A (en) * | 2020-07-17 | 2020-10-16 | 上海商汤智能科技有限公司 | Group mist identification method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5663710A (en) * | 1995-07-18 | 1997-09-02 | Jaycor | Backscatter-type visibility detection |
CN101936900A (en) * | 2010-06-12 | 2011-01-05 | 北京中科卓视科技有限责任公司 | Video-based visibility detecting system |
-
2012
- 2012-06-30 CN CN201210226642.4A patent/CN102779349B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5663710A (en) * | 1995-07-18 | 1997-09-02 | Jaycor | Backscatter-type visibility detection |
CN101936900A (en) * | 2010-06-12 | 2011-01-05 | 北京中科卓视科技有限责任公司 | Video-based visibility detecting system |
Non-Patent Citations (2)
Title |
---|
Fog detection system based on computer vision techniques;Bronte S.等;《2009. ITSC "09. 12th International IEEE Conference on Intelligent Transportation Systems》;20091004;第1-6页 * |
无需人工标记的视频对比度道路能见度检测;李勃等;《计算机辅助设计与图形学学报》;20091130;第21卷(第11期);第1575-1582页 * |
Also Published As
Publication number | Publication date |
---|---|
CN102779349A (en) | 2012-11-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102779349B (en) | Foggy day detecting method based on image color spatial feature | |
KR102167291B1 (en) | System and method for providing road status information | |
CN103236191B (en) | Video-based safety precaution method for vehicle merging from highway ramp | |
CN204166693U (en) | A kind of road traffic cruising inspection system based on SUAV (small unmanned aerial vehicle) | |
KR102005713B1 (en) | Intelligent tunnel management system | |
CN104634784B (en) | atmospheric visibility monitoring method and device | |
CN204614213U (en) | A kind of traffic violation evidence collecting apparatus for variable speed-limit control system | |
CN105628194B (en) | A kind of road lighting quality on-site measurement method | |
KR102167292B1 (en) | Apparatus and method for providing road status information | |
CN102162788A (en) | Visibility detection method based on high-definition video | |
CN103149603B (en) | Road weather detection method based on video | |
CN116434525A (en) | Intelligent management early warning system for expressway | |
CN115331401A (en) | Intelligent analysis early warning system for running safety of vehicles in long-distance tunnel on highway | |
CN102589515B (en) | Foggy-weather distance measurement method and device thereof as well as distance pre-warning method and device thereof | |
Miclea et al. | Visibility detection in foggy environment | |
CN102024336A (en) | Intelligent derivation device of slip-road | |
CN106709445A (en) | Freeway foggy weather detection early warning method based on video image | |
CN104715615B (en) | Be positioned at the electronic recognition platform violating the regulations of traffic intersection | |
CN105262984B (en) | A kind of detector with fixing device | |
CN103927523A (en) | Fog level detection method based on longitudinal gray features | |
CN116631187A (en) | Intelligent acquisition and analysis system for case on-site investigation information | |
CN202433311U (en) | Device for detecting damage of road surface | |
KR102317633B1 (en) | System for detecting black ice in real time at roads based on multiple road image and method thereof | |
KR102178202B1 (en) | Method and apparatus for detecting traffic light | |
CN201903970U (en) | Intelligent induction device at freeway entry/exit |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150218 Termination date: 20170630 |
|
CF01 | Termination of patent right due to non-payment of annual fee |