CN105966358B - The detection algorithm of raindrop on a kind of shield glass - Google Patents
The detection algorithm of raindrop on a kind of shield glass Download PDFInfo
- Publication number
- CN105966358B CN105966358B CN201510752995.1A CN201510752995A CN105966358B CN 105966358 B CN105966358 B CN 105966358B CN 201510752995 A CN201510752995 A CN 201510752995A CN 105966358 B CN105966358 B CN 105966358B
- Authority
- CN
- China
- Prior art keywords
- frame
- raindrop
- pixel
- gray value
- image
- 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
Links
Abstract
The invention discloses a kind of detection algorithms of raindrop on shield glass, and the method includes the steps of:Obtain the video image on shield glass;The video image that video camera obtains is read, and video stabilization processing is carried out to image;Will treated video image framing, gray processing is carried out to image, obtains the gray level image of a frame frame to be processed;The gray value of each each pixel of frame of gray level image obtained after acquisition processing;Compare some pixel in the frame and in preceding a later frame, the gray value in front and rear two frame;Algorithm condition coupling is carried out, it is eligible to think that the pixel there are raindrop, otherwise thinks that raindrop are not present in the frame in the pixel in the frame.The method of the present invention can more accurately detect raindrop in the scene of heavy rain, and obtaining better video effect for the rainy day provides basis.
Description
Technical field
The present invention relates to a kind of detection calculations of raindrop in technical field of machine vision more particularly to shield glass
Method.
Background technology
Automobile becomes the indispensable vehicles of modern society, it changes people’s lives mode, has pushed society
Expanding economy and the progress of human culture.Recent years, the paces that automobile enters family are gradually accelerated, at present the civilian vapour of China
Vehicle ownership more than 1.5 hundred million, more than Germany, is only second to the U.S..Meanwhile Chinese population is numerous, major urban population density
Very high, Che Yuche, the contradiction of people and vehicle is also especially acute, and Frequent Accidents on road, the quantity that traffic accident occurs is much higher than
Developed country, also above other developing countries.Learnt according to Public Security Department and State Statistics Bureau's statistical data, China it is annual because
It is that traffic accident direct economic loss reaches billions of members, but also in ascendant trend year by year, so for automobile machine vision side
The research in face seems extremely important.
In sensor used by automobile, video camera has many advantages, such as low cost, easy care and highly integrated property, therefore obtains
To being widely applied.For example automobile data recorder is the instrument of the relevent informations such as image and the sound in record vehicle traveling way.
After automobile data recorder is installed, it is able to record the video image and sound of running car overall process, evidence can be provided for traffic accident.
Like the people of self-driving travel, the process for conquering difficulties and dangers can also be recorded with it.Record a video during driving when walking, at the same when
Between, speed, position be all recorded in video recording, suitable black box.Also it can be in and shoot the joy of life, Huo Zhezuo as DV
It monitors and uses for household.Parking monitoring can also be usually done, automobile data recorder is installed, video data cannot be cut, if cut out
It cuts, help can not be then provided after liability accident generation.Also for preventing those social inevitable blackmail behaviors now.
The clarity of video is particularly important during video is recorded, and the raindrop on shield glass are to acquisition video
Clarity has very big influence, and the detection of in-depth study raindrop is conducive to remove raindrop, obtains better video effect.
This raindrop detecting system needs to obtain the video image of covering shield glass comprehensively, using video stabilization
Technology handles video, obtains the image/video of background less stationary, then obtains each pixel in each frame image
Gray value.
The matching of algorithm condition is exactly to extract its gray value in 5 frames simultaneously to a certain pixel to be compared, this is
A most important step in the system, by comparing the size of gray value of the pixel in the frame and the gray value in preceding a later frame
The size of the gray value of even front and rear two frames carries out the matching of constraints, can thus calculate the pixel in the frame
Whether merit is in raindrop.
Invention content
The technical problem to be solved in the present invention is for the defects in the prior art, to provide a kind of shield glass
The detection algorithm of upper raindrop.
The technical solution adopted by the present invention to solve the technical problems is:The detection of raindrop on a kind of shield glass
Algorithm includes the following steps:
1) video image on shield glass is acquired;
2) video image obtained is read, and video stabilization processing is carried out to image;
3) will treated video image framing, gray processing is carried out to image, obtains wanting the gray level image of a frame frame;
4) gray value of each pixel of each frame gray level image obtained after acquisition processing;
5) gray value of the more a certain pixel in the frame and the gray value in preceding a later frame, exist if obtaining the pixel
The gray value of this frame is simultaneously greater than the gray value of a later frame before this frame, then it is assumed that there are raindrop in the frame for the pixel;
Otherwise it is transferred to step 6);
6) compare the pixel the frame gray value in this frame to front cross frame and backward gray value of two frames, such as
Fruit obtains gray value of the pixel in this frame simultaneously greater than in this frame to front cross frame and backward gray value of two frames, then recognizes
For the pixel, in the frame, there are raindrop;Otherwise it is assumed that raindrop are not present at this in the pixel for a moment.
By said program, the video image in the step 1) is all standing image of shield glass.
By said program, video stabilization processing is carried out to image in the step 2).
By said program, gray processing is carried out to image in the step 3).
The beneficial effect comprise that:The matching of the algorithm condition of the method for the present invention is exactly that a certain pixel is expanded
It is compared to its gray value in 5 frames, this is a most important step in the system, by comparing the pixel in the frame
Gray value carries out of constraints with the size of the gray value in preceding a later frame or even the size of the gray value of front and rear two frames
Match, thus can accurately calculate the pixel and whether there is raindrop in the frame.
Description of the drawings
Below in conjunction with accompanying drawings and embodiments, the invention will be further described, in attached drawing:
Fig. 1 is the fixed schematic diagram of camera position in the embodiment of the present invention;
Fig. 2 is the realistic picture of camera shooting video image in the embodiment of the present invention;
Fig. 3 is that the realistic picture after greyscale transformation is carried out in the embodiment of the present invention;
Fig. 4 is that there are the realistic pictures of the frame of raindrop in the embodiment of the present invention;
Fig. 5 is the physical characteristic figure of raindrop in the embodiment of the present invention;
Fig. 6 is single pixel light intensity variation diagram caused by raindrop in the embodiment of the present invention;
Fig. 7 is the method flow diagram of the embodiment of the present invention.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to embodiments, to the present invention
It is further elaborated.It should be appreciated that specific embodiment described herein is not used to limit only to explain the present invention
The fixed present invention.
As shown in fig. 7, on a kind of shield glass raindrop detection algorithm, include the following steps:
1) as shown in Figure 1, according to method to the needs of field of view, a camera shooting is fixed in shield glass
Machine acquires the video image on shield glass;Before the complete front windshield of automobile being obtained by the video camera
Video image, as shown in Figure 2;
2) video image obtained is read, and video stabilization processing is carried out to image;
It eliminates and shakes by using video stabilization technology, improve accuracy, and such case can be approximately considered and be
Image background is static.The reasons why this shake removal:1), for automobile in low-speed motion, video camera is in dither state;
2), automobile during exercise in video the variation of image in tiny time variation it is considered that when image in video, is static.
3) will treated video image framing, gray processing is carried out to image, obtains wanting the gray level image of a frame frame;
The information that coloured image carries is relatively more, and when shield glass is covered by raindrop, image is affected
Maximum element is light intensity i.e. gray value, for the ease of subsequently to the operation of image, being herein uniformly converted into all images
Gray level image.
4) gray value of each pixel of each frame gray level image obtained after acquisition processing;
All gray-scale maps as Fig. 3 are carried out with the reading of the gray value of each each pixel of frame, by all frames 2
The gray value of each pixel carries out three-dimensional matrice storage.Material as the reference of algorithm below.
According to the physical characteristic of raindrop figure, that is, Fig. 5, rain is the collection of the water droplet random distribution with different shapes and sizes
It closes, these water droplets are moved with speed quickly.The typical sizes of the radius of one raindrop are 0.1mm to O.35mm, Fig. 5 (a) institutes
Show be a typical raindrop radius distribution.Subtract it was noted that the density of raindrop is exponential with the increase of raindrop radius
It is small.The shape of raindrop is approximately the function of raindrop size, and Fig. 5 (b) is different size of rain drop shapes.Small raindrop are counted as
Sphere and big raindrop approximation spheroid.Under normal circumstances, the radius of most raindrop is less than 1mm.Therefore, we recognize at approximation
It is sphere for most raindrop.When raindrop fall, it is believed that it has reached a final speed.
Single pixel light intensity variation diagram, that is, Fig. 6 can be obtained caused by raindrop:Assuming that T is the time for exposure of camera system,
The optical density in entire time T is calculated, to determine the pixel value I influenced by raindropd, Fig. 6 (a) show interior at [t, t+T]
Raindrop fall the front and rear variation by the pixel point value occupied by raindrop, τ represent the pixel by the time occupied by raindrop due to
Raindrop whereabouts is very fast, therefore τ will be far smaller than T, so IdIt is as by the original optical density E of the pixel occupied by raindropbgWith
The optical density E of the raindropdTwo parts are formed:
When background or be it is static or when being slowly to move, can be E in time TbgRegard constant as, then formula can be reduced to:
E in formuladIf the pixel is not occupied by raindrop for raindrop average optical density, have:
Ibg=EbgT
Therefore a pixel by raindrop influenced caused by pixel value changes delta I be
Δ I=Id-Ibg=τ (Ed-Ebg)>0;As shown in Fig. 6 (b);
5) gray value of the more a certain pixel in the frame and the gray value in preceding a later frame, exist if obtaining the pixel
The gray value of this frame is simultaneously greater than the gray value of a later frame before this frame, then it is assumed that there are raindrop in the frame for the pixel;
Otherwise it is transferred to step 6);
If light intensity is respectively k-1, k and k+1 frame for I and continuous 3 frame,
Constraints (1) and (2) are met by the pixel that raindrop cover simultaneously in this 3 frame:
Δ I (1)=I (k)-I (k+1) >=c1; (1)
Δ I (2)=I (k)-I (k-1) >=c2; (2)
As met, then it is assumed that there are raindrop in the frame for the pixel.C1, c2 are more than 0.
6) compare the pixel the frame gray value in this frame to front cross frame and backward gray value of two frames, such as
Fruit obtains gray value of the pixel in this frame simultaneously greater than in this frame to front cross frame and backward gray value of two frames, then recognizes
For the pixel, in the frame, there are raindrop;Otherwise it is assumed that raindrop are not present at this in the pixel for a moment.
If light intensity is respectively k-2, k-1, k, k+1, k+2 frame for I and continuous 5 frame,
Constraints (3) and (4) are met by the pixel that raindrop cover simultaneously in this 5 frame:
Δ I (3)=I (k)-I (k+2) >=c3; (3)
Δ I (4)=I (k)-I (k-2) >=c4; (4)
Here c3, c4 be more than 0, you can think the pixel in the frame there are raindrop, otherwise it is assumed that the pixel exists
Raindrop are not present in this for a moment.
It should be understood that for those of ordinary skills, can be improved or converted according to the above description,
And all these modifications and variations should all belong to the protection domain of appended claims of the present invention.
Claims (2)
1. the detection algorithm of raindrop on a kind of shield glass, which is characterized in that include the following steps:
1)Acquire the video image on shield glass;
2)The video image obtained is read, and video stabilization processing is carried out to image;
3)Will treated video image framing, gray processing is carried out to image, obtains wanting the gray level image of a frame frame;
4)The gray value of each pixel of each frame gray level image obtained after acquisition processing;
5)Gray value of the more a certain pixel in the frame and the gray value in preceding a later frame, if obtaining the pixel at this
The gray value of frame is simultaneously greater than the gray value of a later frame before this frame, then it is assumed that there are raindrop in the frame for the pixel;Otherwise
It is transferred to step 6);
6)Compare the pixel the frame gray value in this frame to front cross frame and backward gray value of two frames, if must
To the pixel this frame gray value simultaneously greater than in this frame to front cross frame and backward gray value of two frames, then it is assumed that this
There are raindrop in the frame for pixel;Otherwise it is assumed that raindrop are not present at this in the pixel for a moment.
2. detection algorithm according to claim 1, which is characterized in that the step 1)In video image be automotive front baffle
The all standing image of wind glass.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510752995.1A CN105966358B (en) | 2015-11-06 | 2015-11-06 | The detection algorithm of raindrop on a kind of shield glass |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510752995.1A CN105966358B (en) | 2015-11-06 | 2015-11-06 | The detection algorithm of raindrop on a kind of shield glass |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105966358A CN105966358A (en) | 2016-09-28 |
CN105966358B true CN105966358B (en) | 2018-06-08 |
Family
ID=56988121
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510752995.1A Active CN105966358B (en) | 2015-11-06 | 2015-11-06 | The detection algorithm of raindrop on a kind of shield glass |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105966358B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106945638A (en) * | 2017-03-21 | 2017-07-14 | 重庆长安汽车股份有限公司 | A kind of rain blowing controlled system |
CN110782432B (en) * | 2019-10-15 | 2022-10-04 | 智洋创新科技股份有限公司 | Automatic defogging method for image monitoring device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10316794A1 (en) * | 2003-04-11 | 2004-11-11 | Audi Ag | Rain sensor for road vehicle windscreen has camera looking forward through windscreen to observe raindrops and connected to transmission module and picture evaluation circuit |
CN101470900A (en) * | 2007-12-25 | 2009-07-01 | 东风汽车有限公司 | Intelligent control method and device for vehicle |
CN102114816A (en) * | 2009-12-31 | 2011-07-06 | 鸿富锦精密工业(深圳)有限公司 | Driving safety maintenance system and maintenance method thereof |
CN103593847A (en) * | 2013-11-25 | 2014-02-19 | 中国航天科工集团第三研究院第八三五七研究所 | Raindrop detection analysis method based on machine vision |
CN103917989A (en) * | 2011-09-07 | 2014-07-09 | 法雷奥开关和传感器有限责任公司 | Method and camera assembly for detecting raindrops on a windscreen of a vehicle |
CN103918006A (en) * | 2011-09-07 | 2014-07-09 | 法雷奥开关和传感器有限责任公司 | Method and camera assembly for detecting raindrops on windscreen of vehicle |
CN104080663A (en) * | 2012-08-06 | 2014-10-01 | 康蒂特米克微电子有限公司 | Detection of rain drops on a plate by means of a camera and illumination |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150085118A1 (en) * | 2011-09-07 | 2015-03-26 | Valeo Schalter Und Sensoren Gmbh | Method and camera assembly for detecting raindrops on a windscreen of a vehicle |
-
2015
- 2015-11-06 CN CN201510752995.1A patent/CN105966358B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10316794A1 (en) * | 2003-04-11 | 2004-11-11 | Audi Ag | Rain sensor for road vehicle windscreen has camera looking forward through windscreen to observe raindrops and connected to transmission module and picture evaluation circuit |
CN101470900A (en) * | 2007-12-25 | 2009-07-01 | 东风汽车有限公司 | Intelligent control method and device for vehicle |
CN102114816A (en) * | 2009-12-31 | 2011-07-06 | 鸿富锦精密工业(深圳)有限公司 | Driving safety maintenance system and maintenance method thereof |
CN103917989A (en) * | 2011-09-07 | 2014-07-09 | 法雷奥开关和传感器有限责任公司 | Method and camera assembly for detecting raindrops on a windscreen of a vehicle |
CN103918006A (en) * | 2011-09-07 | 2014-07-09 | 法雷奥开关和传感器有限责任公司 | Method and camera assembly for detecting raindrops on windscreen of vehicle |
CN104080663A (en) * | 2012-08-06 | 2014-10-01 | 康蒂特米克微电子有限公司 | Detection of rain drops on a plate by means of a camera and illumination |
CN103593847A (en) * | 2013-11-25 | 2014-02-19 | 中国航天科工集团第三研究院第八三五七研究所 | Raindrop detection analysis method based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
CN105966358A (en) | 2016-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109919008A (en) | Moving target detecting method, device, computer equipment and storage medium | |
US9846927B2 (en) | Systems and methods for haziness detection | |
CN102509098B (en) | Fisheye image vehicle identification method | |
CN107330373A (en) | A kind of parking offense monitoring system based on video | |
US9811746B2 (en) | Method and system for detecting traffic lights | |
US9626599B2 (en) | Reconfigurable clear path detection system | |
JP5982719B2 (en) | Image fog removal apparatus, image fog removal method, and image processing system | |
WO2022027931A1 (en) | Video image-based foreground detection method for vehicle in motion | |
CN108399403B (en) | Vehicle distance detection method based on license plate size calculation | |
CN106611510A (en) | Parking stall detecting device and method and electronic equipment | |
CN114514535A (en) | Instance segmentation system and method based on semantic segmentation | |
CN109858456B (en) | Railway vehicle state fault analysis system | |
CN107944388A (en) | A kind of method for detecting lane lines, device and terminal | |
JP2018022220A (en) | Behavior data analysis system, and behavior data analysis device, and behavior data analysis method | |
CN105966358B (en) | The detection algorithm of raindrop on a kind of shield glass | |
CN104378539A (en) | Scene-adaptive video structuring semantic extraction camera and method thereof | |
CN114913449A (en) | Road surface camera shooting analysis method for Internet of vehicles | |
CN104732489A (en) | Image processing apparatus and image processing method for removing rain streaks from image data | |
WO2024051296A1 (en) | Method and apparatus for obstacle detection in complex weather | |
CN114418998A (en) | Vehicle part defect detection method and system and electronic equipment | |
JP2009301495A (en) | Image processor and image processing method | |
CN107454319B (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
JP2004086417A (en) | Method and device for detecting pedestrian on zebra crossing | |
CN111127503A (en) | Method, device and storage medium for detecting the pattern of a vehicle tyre | |
CN108960181B (en) | Black smoke vehicle detection method based on multi-scale block LBP and hidden Markov model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |