CN110276318A - Nighttime road rains recognition methods, device, computer equipment and storage medium - Google Patents

Nighttime road rains recognition methods, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110276318A
CN110276318A CN201910560424.6A CN201910560424A CN110276318A CN 110276318 A CN110276318 A CN 110276318A CN 201910560424 A CN201910560424 A CN 201910560424A CN 110276318 A CN110276318 A CN 110276318A
Authority
CN
China
Prior art keywords
image
video image
rectangle frame
frame
binaryzation
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.)
Pending
Application number
CN201910560424.6A
Other languages
Chinese (zh)
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.)
Beihang University
Beijing University of Aeronautics and Astronautics
Original Assignee
Beijing University of Aeronautics and Astronautics
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 Beijing University of Aeronautics and Astronautics filed Critical Beijing University of Aeronautics and Astronautics
Priority to CN201910560424.6A priority Critical patent/CN110276318A/en
Publication of CN110276318A publication Critical patent/CN110276318A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • G06V10/443Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/44Event detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of rainy recognition methods of Nighttime road, device, computer equipment and storage mediums, and wherein method includes: the video image for obtaining Nighttime road;The video image is pre-processed, the video image after obtaining binaryzation;The rectangle frame of raindrop is identified from the video image after the binaryzation;The quantity of rectangle frame described in video image after counting the binaryzation;Determine whether the highway region rains based on the quantity of rectangle frame.After the present invention is by the video image pretreatment to Nighttime road, the rectangle frame of raindrop is identified from the video image of binaryzation, count the quantity of the rectangle frame of raindrop again to determine whether highway region rains and identify highway night rainy Weather information, the information that can be used as push and early warning is sent to driver, solves the problem of nighttime driving person visual field is poor, to Changes in weather delay of response in turn.

Description

Nighttime road rains recognition methods, device, computer equipment and storage medium
Technical field
The present invention relates to field of computer technology, and in particular to a kind of Nighttime road rainy recognition methods, device, computer Equipment and storage medium.
Background technique
As China's highway network is increasingly mature, freeway incident repeatedly occurs.It leads on its high speed night rain road The traffic accident Frequent Accidents of cause.The visual field is poor when driver's night running, judges inaccuracy to rainy weather, how public to night high speed The weather conditions and condition of road surface real-time monitoring on road, and become the research direction of many experts to driver feedback in time.
In recent years, with the development of computer vision technique, more and more experts and scholars are using image come inverting weather Situation.Inventors have found that can quickly and accurately obtain real-time condition of road surface, and can benefit using image-recognizing method With the original camera of highway, cost is greatly reduced.Current research is mostly used the characteristics such as edge gradient greatly to simulate Visibility, and research direction is concentrated mainly on the identification for foggy weather on daytime.It rains this kind of weather conditions for night It studies less, does not find also to can recognize that rainy weather, therefore, fail preferably to assist to driver feedback weather conditions Driver drives vehicle.
Summary of the invention
The invention solves in the prior art not to the identifying schemes of Nighttime road rainy weather the problem of, to provide A kind of Nighttime road rains recognition methods, device, computer equipment and storage medium.
An aspect of of the present present invention provides a kind of rainy recognition methods of Nighttime road, comprising: obtain the video of Nighttime road Image;The video image is pre-processed, the video image after obtaining binaryzation;Video image after the binaryzation In identify the rectangle frame of raindrop;The quantity of rectangle frame described in video image after counting the binaryzation;Based on rectangle frame Quantity determine whether the highway region rains.
Optionally, the video image of Nighttime road is obtained, comprising: obtain the image of the camera shooting on the highway; The image information in the image of the camera shooting is identified using Edge Server, obtains the video image.
Optionally, the image information in the image of the camera shooting is identified using Edge Server, comprising: will be described The image of camera shooting is converted to the image data of matrix format;Gaussian Blur is carried out to the image data of the matrix format Processing, the image data that obtains that treated;The gradient magnitude of each pixel and direction in image data that treated described in calculating; Using the gradient magnitude and direction of each pixel to the effective image information identified in treated the image data.
Optionally, the video image is pre-processed, the video image after obtaining binaryzation, comprising: to each frame The video image carries out gray proces, obtains the video frame images of gray processing;Using frame difference method to the video frame of adjacent two frame Image does calculus of differences, obtains difference image;Binary conversion treatment is carried out to the difference image, the view after obtaining the binaryzation Frequency image.
Optionally, calculus of differences is being done using video frame images of the frame difference method to adjacent two frame, after obtaining difference image, Further include: gaussian filtering process is carried out to the difference image;And/or median filter process is carried out to the difference image.
Optionally, the rectangle frame of raindrop is identified from the video image after the binaryzation, comprising: identify the two-value All rectangle frames in video image after change, the rectangle frame is using the boundary of different value as profile;Using pre-set Rule of judgment judge each rectangle frame whether be raindrop rectangle frame, the Rule of judgment include: rectangle frame length-width ratio and Area.
Optionally, using pre-set Rule of judgment judge each rectangle frame whether be raindrop rectangle frame, comprising: Judge whether the length-width ratio of rectangle frame is greater than default ratio, and judges whether its area is greater than preset area;When the length of rectangle frame Width is than being greater than the default ratio, and its area is greater than the preset area, it is determined that the rectangle frame is the square of the raindrop Shape frame.
Another aspect of the present invention provides a kind of highway Weather information method for pushing, comprising: obtains the camera shooting on highway The image of head shooting and the location information of the highway;Identify that the highway is using the rainy recognition methods of the Nighttime road It is no to rain, obtain recognition result;The recognition result and the location information are pushed to the vehicle of current driving.
Another aspect of the present invention provides a kind of rainy identification device of Nighttime road, comprising: module is obtained, for obtaining Take the video image of Nighttime road;Preprocessing module, for being pre-processed to the video image, the view after obtaining binaryzation Frequency image;Identification module, for identifying the rectangle frame of raindrop from the video image after the binaryzation;Statistical module is used In the quantity for counting rectangle frame described in the video image after the binaryzation;Determining module, for the quantity based on rectangle frame Determine whether the highway region rains.
Another aspect of the present invention, provides a kind of computer equipment, including memory, processor and is stored in storage On device and the computer program that can run on a processor, the processor realize Nighttime road when executing the computer program The step of identification the method for raining.
Another aspect of the present invention provides a kind of computer readable storage medium, is stored thereon with computer program: institute State when computer program is executed by processor realize Nighttime road rain recognition methods the step of.
According to embodiments of the present invention, by obtaining the video image of Nighttime road, after obtaining binaryzation after pretreatment Video image, the rectangle frame of raindrop is then identified from the video image of binaryzation, then count the number of the rectangle frame of raindrop It measures to determine whether highway region rains and identify highway night rainy Weather information, can be used as push and pre- Alert information is sent to driver, and then it is poor to solve the nighttime driving person visual field, the problem of to Changes in weather delay of response.It helps Driver preferably identifies weather, careful driving at night.
The institute of the embodiment of the present invention is that edge side Edge Server and onboard servers and highway are existing according to equipment There is camera, can solve the problems, such as night rainy identification.
The embodiment of the present invention combines the Weather information and location information of each camera, has been integrally formed highway day Gas net.And send Weather information in each driving vehicle in real time, form the expressway Weather web of bus or train route collaboration.
The embodiment of the present invention replaces previous urban transportation central server using edge side Edge Server, in previous Centre server mass data processing work share to multiple edge side Edge Servers, not only reduce data transmission at This, also improves the efficiency of data processing, can send Weather information in time to driver, improve the real-time of weather monitoring Property.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is highway night rainy identifying system frame diagram in the embodiment of the present invention;
Fig. 2 is the flow chart of the rainy recognition methods of Nighttime road in the embodiment of the present invention;
Fig. 3 is the flow chart of highway Weather information method for pushing in the embodiment of the present invention;
Fig. 4 is the schematic diagram of the rainy identification device of Nighttime road in the embodiment of the present invention;
Fig. 5 is the hardware structural diagram of computer equipment of the embodiment of the present invention.
Specific embodiment
Technical solution of the present invention is clearly and completely described below in conjunction with attached drawing, it is clear that described implementation Example is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that term " first ", " second ", " third " are used for description purposes only, It is not understood to indicate or imply relative importance.
As long as in addition, the non-structure each other of technical characteristic involved in invention described below different embodiments It can be combined with each other at conflict.
The rainy recognition methods of Nighttime road described in the embodiment of the present invention and device can be used for the one of the embodiment of the present invention Highway night of the kind based on edge side image perception rainy identifying system, as shown in Figure 1, the system includes four subsystems System: information gathering subsystem, data process subsystem, onboard subsystem and Edge Server subsystem.
Wherein, information gathering subsystem can acquire the camera video image and geographical location information of each fastlink, and Information above is integrated into the data packet of Video Stream type by edge side information Fusion Module, by edge side communication module with Unicast mode (unicast video stream type data packets) is sent to Edge Server, the data packet include each camera the address ip, Port numbers, video stream data, wherein the address ip includes the location information of the fastlink.
Edge Server is communicated by Edge Server communication module with other subsystems, is believed by Edge Server The image information in processing module identification video streaming data packet is ceased, specifically can be and led using the identification of Canny edge detection algorithm Broadcast the image information in video streaming data packet.Data packet after treatment is sent to data by Edge Server communication module Manage subsystem.
Data process subsystem, which receives, comes from the processed data packet of Edge Server, pre-processes first to data, It carries out frame difference method and filtering processing obtains pretreatment image, then set raindrop restrictive condition further according to image information, carry out rain Point identification, judges whether rain;The location information of Weather information and highway is finally integrated into data packet, is taken by edge Business device is sent to onboard subsystem, and driver is reminded to take care.
The embodiment of the invention provides a kind of rainy recognition methods of Nighttime road, as shown in Fig. 2, method includes:
Step S201 obtains the video image of Nighttime road.
The video image can be the image taken by the camera on highway, be also possible to the image taken Image after treatment.Highway can be urban road, be also possible to highway.Video image can be to be taken the photograph using infrared The image of camera shooting.
Step S202, pre-processes the video image, the video image after obtaining binaryzation.
The characteristics of will form bright filament in the image of shooting due to night raindrop especially shoots in infrared camera Image in, by the pretreatment to video image, form binary image, the feature of raindrop can be protruded.
Step S203 identifies the rectangle frame of raindrop from the video image after the binaryzation.
Since the image after binaryzation can accurately embody the profile of specific objective, can know from these objective contours Not Chu raindrop rectangle frame.
Step S204, the quantity of rectangle frame described in the video image after counting the binaryzation.
Step S205 determines whether the highway region rains based on the quantity of rectangle frame.
Threshold value Max and Min are arranged to the quantity for the rectangle frame for being judged as raindrop, the quantity of rectangle frame is greater than Max, then recognizes It is raining heavily for present image;The quantity of rectangle frame thinks to spot between Max and Min, otherwise it is assumed that not raining.
According to embodiments of the present invention, by obtaining the video image of Nighttime road, after obtaining binaryzation after pretreatment Video image, the rectangle frame of raindrop is then identified from the video image of binaryzation, then count the number of the rectangle frame of raindrop It measures to determine whether highway region rains and identify highway night rainy Weather information, can be used as push and pre- Alert information is sent to driver.Solves the problem of nighttime driving person visual field is poor, to Changes in weather delay of response in turn.It helps Driver preferably identifies weather, careful driving at night.
Institute of the invention is edge side Edge Server and onboard servers and the existing camera shooting of highway according to equipment Head can solve the problems, such as night rainy identification.
As a kind of optional embodiment of the embodiment of the present invention, above-mentioned steps S201 obtains the video figure of Nighttime road Picture, comprising: obtain the image of the camera shooting on the highway;The figure of the camera shooting is identified using Edge Server Image information as in, obtains the video image, can be and believes using using Canny edge detection algorithm come monitoring image Breath.Canny edge detection algorithm is a kind of multistage edge detection method, is widely used because of its high-precision and high sensitivity. Wherein it is possible to which acquiring road by the original camera of highway for above- mentioned information acquisition subsystem is canalized image.
Further, the image information in the above-mentioned image for identifying the camera shooting using Edge Server, comprising:
The image that the camera is shot is converted to the image data of matrix format by step S11.
Step S12 carries out Gaussian Blur processing to the image data of the matrix format, the picture number that obtains that treated According to.
If the pixel value of the point of position (x, y) is I (x, y).Two-dimensional Gaussian function is defined first:
Set variances sigma2Initial value, establish blur radius be 1 weight matrix:
It is normalized to weight matrix, the weight matrix after normalization are as follows:
After obtaining weight matrix, convolutional filtering is carried out to image data, the pixel value of each position of image can be changed, i.e., it is complete At Gaussian Blur processing.
Step S13 calculates the gradient magnitude of each pixel and direction in treated the image data.
For above-mentioned matrix pixel point, the gradient in the direction x and y is calculated first with Sobel operator, formula is as follows:
Obtaining GxAnd GyAfterwards, pixel gradient amplitude and direction are calculated:
θ=arctan (Gx,Gy)
Step S14, using the gradient magnitude and direction of each pixel to identifying in treated the image data Effective image information.Effective image information can be the image information after rejecting weak marginal point.First image data can be carried out Then dual threshold is arranged to inhibit isolated weak marginal point, to obtain effective image information in edge thinning processing.
Specifically, edge thinning can be carried out using the method for non-maximum suppression.The gradient intensity of more current point and just The gradient intensity of negative gradient direction point, if it is most that the gradient intensity of current point compares with the gradient intensity of other equidirectional points Greatly, retain its value.Otherwise inhibit, that is, be set as 0.
Canny algorithm application bivalve value, i.e. a high threshold values and a low valve valve distinguish edge pixel.If edge picture Vegetarian refreshments gradient value is greater than high threshold values, then is considered as strong edge point.If edge gradient value is less than high threshold values, it is greater than low valve valve, Then it is labeled as weak marginal point.Point less than low valve valve is then suppressed.After dual threshold is arranged, it is special that apparent edge is presented in image Sign.
Code is described as follows:
There are two types of possible at the weak edge generated: one is the weak edge generated due to noise, one kind is true weak edge. Think that true weak edge is connected with strong edge in the present invention, therefore true to regard as by judging whether to be connected with strong edge Weak edge.Its code is described as follows:
In the embodiment of the present invention, after obtaining highway video image, inputted video image first, and to image by frame Then reason carries out gray proces to each frame image.Followed by frame difference method by front and back two field pictures difference, difference diagram is obtained Picture.It is specifically above-mentioned that the video image is pre-processed, the video image after obtaining binaryzation, comprising:
Step S21, the video image described in each frame carry out gray proces, obtain the video frame images of gray processing.
Image sometime is taken out from video sequence, is denoted as f (x, y, t), indicates the frame occurred in the t moment video Image, and f (x, y, t-1) and f (x, y, t+1) then respectively indicate its former frame and a later frame image.Wherein x, y are pixel position It sets, t is the time.Using first frame image as the movement images of first time difference.
The color image of acquisition uses RGB mode, can be asked the three-component brightness in color image using mean value method Average value obtains a gray value, completes the pretreatment of image.The gray proces formula of use is as follows:
Gray (i, j)=(R (i, j)+G (i, j)+B (i, j))/3
Step S22 does calculus of differences using video frame images of the frame difference method to adjacent two frame, obtains difference image.
Calculus of differences is done using two continuous frames image of the frame difference method to sequence of video images, can get and obtain moving target wheel It is wide.When occurring abnormal object movement in monitoring scene, it will appear more apparent difference, Ke Yitong between adjacent two field pictures It crosses two frames to subtract each other, acquires the absolute value of the difference of image corresponding position pixel, then judge whether it is greater than a certain threshold value based on this, into And analyze the object of which movement characteristic of video or image sequence.Its formula is described as follows:
The advantages of frame difference method is that algorithm realizes simple, and programming complexity is low, and the speed of service is fast;Dynamic environment is adaptive Property it is strong, and to scene light change it is insensitive.According to the API document of OpenCV3, function cv2.absdiff letter can use Number realizes that frame is poor, and code is accomplished by
cv2.absdiff(src1,src2[,dst])
Wherein each meaning of parameters is as shown in table 1 below:
src1 First image array of input, is inputted with grayscale format
src2 Second image array of input, is inputted with grayscale format
Dst It is identical as input array to export array, size and type
Table 1
Optionally, after the difference image obtained, image can also tentatively be removed dryness using Gaussian filter, then to difference Gray level image after point carries out binaryzation.Salt-pepper noise of further going out finally is removed dryness using intermediate value, completes the pre- place to image Reason.It that is to say and doing calculus of differences using video frame images of the frame difference method to adjacent two frame, after obtaining difference image, also wrap It includes: gaussian filtering process is carried out to the difference image;And/or median filter process is carried out to the difference image.
Since treated raindrop picture is there are some noises, the embodiment of the present invention can be used gaussian filtering and be eliminated Noise, while carrying out smoothing processing to a certain extent.Gaussian filtering is a kind of linear smoothing filtering, is made an uproar suitable for eliminating Gauss Sound is widely used in the noise abatement process of image procossing, it can more protrude central point in the smoothed out weight of pixel.Gaussian filtering Concrete operations are: with each of convolution scan image pixel, recycling the weighted average of grey scale pixel value in neighborhood Go the value of alternate template central pixel point.Its weighted value is related to Gaussian function, and the size for a filter kernel is x0, y0 Template, it is as follows that each weighted value obtains calculation formula:
The following figure shows the example of a Gaussian filter:
1/16 2/16 1/16
2/16 2/16 2/16
1/16 2/16 1/16
The reality that the cv2.GaussianBlur function in opencv3 carries out gaussian filtering can be used in the embodiment of the present invention It is existing, the API document of opencv3 is consulted, code is accomplished by
Cv2.GaussianBlur (src, ksize, sigmaX [, dst [, sigmaY [, borderType]]])
→dst
Wherein each meaning of parameters is as shown in table 2 below:
Table 2
On the other hand, the embodiment of the present invention can use median filter to remove salt-pepper noise.It is needed with other filters Difference is calculated, median filtering is to choose median after being ranked up all pixels value in filter and be replaced.It is rolled up The size of product core is an odd number.Common median filter is as follows:
The embodiment of the present invention realizes median filtering using the cv2.medianBlur function in opencv3.It consults The API document of opencv3, code are realized as follows
Cv2.medianBlur (src, ksize [, dst])
→dst
Wherein each meaning of parameters is as shown in table 3 below:
Table 3
Step S23 carries out binary conversion treatment to the difference image, the video image after obtaining the binaryzation.
The characteristics of bright filament can be formed in infrared camera according to night raindrop, the embodiment of the present invention is by the ash of image Angle value carries out binaryzation to protrude rainy effect.0 or 255 are set by the gray value of the pixel on image, makes entirely to scheme As showing apparent black and white color difference.The embodiment of the present invention realizes black and white two using the cv2.threshold function in opencv3 The API document of OPENCV3 is consulted in value, and code realizes that formula is as follows:
Cv2.threshold (src, thresh, maxval, type [, dst])
Wherein each meaning of parameters is as shown in table 4 below:
Table 4
As a kind of optional embodiment, in the embodiment of the present invention, above-mentioned steps S203, the video after the binaryzation The rectangle frame of raindrop is identified in image, comprising:
Step S31, all rectangle frames in the video image after identifying the binaryzation, the rectangle frame is with different value Boundary is as profile.In the embodiment of the present invention, apparent black and white color difference can be presented after pretreatment in image, and the present invention is implemented Example can first identify the profile of white area, then draw rectangle frame.
It can use the included function of openCV, draw out all rectangle frames of image after treatment.According to The API document of opencv3, the code realize that formula is as follows:
Cv2.findContours (image, mode, method [, contours [, hierarchy [, offset]]])
→ image, contours, hierarchy
Table 5
Minimum rectangle frame is drawn to the profile identified, and then draws the rectangle block diagram of each identification raindrop, and every The upper left corner of one rectangle frame marks the number of the raindrop, and suitable raindrop are screened after convenient.This patent uses opencv3's Rectangle function realizes that, according to its API document, code is accomplished by
Cv2.rectangle (img, pt1, pt2, color [, thickness [, lineType [, shift]]])
→img
Wherein each parameter is as shown in table 6 below:
Table 6
Step S32, using pre-set Rule of judgment judge each rectangle frame whether be raindrop rectangle frame, it is described Rule of judgment includes: the length-width ratio and area of rectangle frame.
Rule of judgment in the embodiment of the present invention, which can be, carries out statistical disposition according to the sample video image comprising raindrop Obtained boundary condition.Specifically, due to the length and width and area of the exportable rectangle frame of rectangle function, the embodiment of the present invention It can be by calling rectangle function, the area information for each rectangle frame that will identify that is exported into tables of data.
It is depicted as scatter plot using every n frame output raindrop image data as sample, and by data, carries out variance analysis, really Determine the boundary condition of raindrop.N can according to need setting, such as 200.Specific variance analysis includes: first to define one and rectangle The relevant function f of length-width ratio10) and a function f relevant to rectangular area2(A0).Function is defined as follows:
For function f10), independent variable λ0, range is [0,10].λiFor the average value of length-width ratio in every frame image, it is Function f10) parameter.It solves and works as f10) obtain minimum value when, independent variable λ0Value.
For function f2(A0), independent variable A0, range is [0,10000].AiIt is averaged for length-width ratio in every frame image Value is function f2(A0) parameter.It solves and works as f10) obtain minimum value when, independent variable λ0Value.
Whether be raindrop rectangle frame, specifically, using preparatory if obtaining length-width ratio and area as threshold decision using analysis The Rule of judgment of setting judge each rectangle frame whether be raindrop rectangle frame, comprising: judge rectangle frame length-width ratio whether Greater than default ratio, and judge whether its area is greater than preset area;When rectangle frame length-width ratio be greater than the default ratio, and And its area is greater than the preset area, it is determined that the rectangle frame is the rectangle frame of the raindrop.
For example, by analysis it is found that when area is 1000, the variance of sample is minimum when length-width ratio is 3.Therefore square is worked as in setting Shape frame length-width ratio is greater than 3, and area is greater than 1000, it is believed that the region is raindrop.Wherein, length and width can be using pixel as single Position.
The embodiment of the invention also provides a kind of highway Weather information method for pushing, as shown in figure 3, this method comprises:
Step S301 obtains the image of the camera shooting on highway and the location information of the highway.
Step S302 identifies whether the highway rains using Nighttime road recognition methods of raining, obtains recognition result.It should Nighttime road rains recognition methods for recognition methods provided in an embodiment of the present invention, referring in particular to being described above, no longer goes to live in the household of one's in-laws on getting married here It states.
The recognition result and the location information are pushed to the vehicle of current driving by step S303.It is pushed to form Vehicle can refer to the terminal for being pushed to onboard subsystem, or being pushed to driver.
The embodiment of the present invention, by identifying whether highway rains, and the location information for the result and highway that judgement is identified The vehicle of push value traveling, informs the Weather information of driver section highway, improves the accuracy of night rainy identification And timeliness.
The embodiment of the invention also provides a kind of rainy identification devices of Nighttime road, as shown in figure 4, the device includes:
Module 401 is obtained, for obtaining the video image of Nighttime road;
Preprocessing module 402, for being pre-processed to the video image, the video image after obtaining binaryzation;
Identification module 403, for identifying the rectangle frame of raindrop from the video image after the binaryzation;
Statistical module 404, for counting the quantity of rectangle frame described in the video image after the binaryzation;
Determining module 405 determines whether the highway region rains for the quantity based on rectangle frame.
According to embodiments of the present invention, by obtaining the video image of Nighttime road, after obtaining binaryzation after pretreatment Video image, the rectangle frame of raindrop is then identified from the video image of binaryzation, then count the number of the rectangle frame of raindrop It measures to determine whether highway region rains and identify highway night rainy Weather information, can be used as push and pre- Alert information is sent to driver.Solves the problem of nighttime driving person visual field is poor, to Changes in weather delay of response in turn.It helps Driver preferably identifies weather, careful driving at night.
Institute of the invention is edge side Edge Server and onboard servers and the existing camera shooting of highway according to equipment Head can solve the problems, such as night rainy identification.
It specifically describes referring to above method embodiment, which is not described herein again.
The present embodiment also provides a kind of computer equipment, can such as execute the desktop computer of program, rack-mount server, Blade server, tower server or Cabinet-type server are (including composed by independent server or multiple servers Server cluster) etc..The computer equipment 20 of the present embodiment includes, but is not limited to: that company can be in communication with each other by system bus Memory 21, the processor 22 connect, as shown in Figure 5.It should be pointed out that Fig. 5 illustrates only the computer with component 21-22 Equipment 20, it should be understood that being not required for implementing all components shown, the implementation that can be substituted is more or less Component.
In the present embodiment, memory 21 (i.e. readable storage medium storing program for executing) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic Disk, CD etc..In some embodiments, memory 21 can be the internal storage unit of computer equipment 20, such as the calculating The hard disk or memory of machine equipment 20.In further embodiments, memory 21 is also possible to the external storage of computer equipment 20 The plug-in type hard disk being equipped in equipment, such as the computer equipment 20, intelligent memory card (Smart Media Card, SMC), peace Digital (Secure Digital, SD) card, flash card (Flash Card) etc..Certainly, memory 21 can also both include meter The internal storage unit for calculating machine equipment 20 also includes its External memory equipment.In the present embodiment, memory 21 is commonly used in storage It is installed on the operating system and types of applications software of computer equipment 20, such as Nighttime road described in embodiment rains and identifies dress The program code etc. set.In addition, memory 21 can be also used for temporarily storing all kinds of numbers that has exported or will export According to.
Processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU), Controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in control computer equipment 20 overall operation.In the present embodiment, program code or processing data of the processor 22 for being stored in run memory 21, Such as the rainy identification device of operation Nighttime road, the rainy recognition methods of Nighttime road to realize embodiment.
The present embodiment also provides a kind of computer readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, magnetic Disk, CD, server, App are stored thereon with computer program, phase are realized when program is executed by processor using store etc. Answer function.The computer readable storage medium of the present embodiment is executed by processor for storing the rainy identification device of Nighttime road The rainy recognition methods of the Nighttime road of Shi Shixian embodiment.
Obviously, the above embodiments are merely examples for clarifying the description, and does not limit the embodiments.It is right For those of ordinary skill in the art, can also make on the basis of the above description it is other it is various forms of variation or It changes.There is no necessity and possibility to exhaust all the enbodiments.And it is extended from this it is obvious variation or It changes among still in the protection scope of the application.

Claims (11)

  1. The recognition methods 1. a kind of Nighttime road rains characterized by comprising
    Obtain the video image of Nighttime road;
    The video image is pre-processed, the video image after obtaining binaryzation;
    The rectangle frame of raindrop is identified from the video image after the binaryzation;
    The quantity of rectangle frame described in video image after counting the binaryzation;
    Determine whether the highway region rains based on the quantity of rectangle frame.
  2. 2. the method according to claim 1, wherein obtaining the video image of Nighttime road, comprising:
    Obtain the image of the camera shooting on the highway;
    The image information in the image of the camera shooting is identified using Edge Server, obtains the video image.
  3. 3. according to the method described in claim 2, it is characterized in that, identifying the figure of the camera shooting using Edge Server Image information as in, comprising:
    The image that the camera is shot is converted to the image data of matrix format;
    Gaussian Blur processing is carried out to the image data of the matrix format, the image data that obtains that treated;
    The gradient magnitude of each pixel and direction in image data that treated described in calculating;
    Using the gradient magnitude and direction of each pixel to the effective image information identified in treated the image data.
  4. 4. obtaining binaryzation the method according to claim 1, wherein pre-processing to the video image Video image afterwards, comprising:
    The video image described in each frame carries out gray proces, obtains the video frame images of gray processing;
    Calculus of differences is done using video frame images of the frame difference method to adjacent two frame, obtains difference image;
    Binary conversion treatment is carried out to the difference image, the video image after obtaining the binaryzation.
  5. 5. according to the method described in claim 4, it is characterized in that, being done using video frame images of the frame difference method to adjacent two frame Calculus of differences, after obtaining difference image, further includes:
    Gaussian filtering process is carried out to the difference image;
    And/or median filter process is carried out to the difference image.
  6. 6. the method according to claim 1, wherein identifying raindrop from the video image after the binaryzation Rectangle frame, comprising:
    All rectangle frames in video image after identifying the binaryzation, the rectangle frame is using the boundary of different value as wheel It is wide;
    Using pre-set Rule of judgment judge each rectangle frame whether be raindrop rectangle frame, the Rule of judgment packet It includes: the length-width ratio and area of rectangle frame.
  7. 7. the method according to claim 1, wherein judging each rectangle using pre-set Rule of judgment Frame whether be raindrop rectangle frame, comprising:
    Judge whether the length-width ratio of rectangle frame is greater than default ratio, and judges whether its area is greater than preset area;
    When rectangle frame length-width ratio be greater than the default ratio, and its area be greater than the preset area, it is determined that the rectangle Frame is the rectangle frame of the raindrop.
  8. 8. a kind of highway Weather information method for pushing characterized by comprising
    Obtain the image of the camera shooting on highway and the location information of the highway;
    It identifies whether the highway rains using the rainy recognition methods of the described in any item Nighttime roads of claim 1 to 7, obtains Recognition result;
    The recognition result and the location information are pushed to the vehicle of current driving.
  9. The identification device 9. a kind of Nighttime road rains characterized by comprising
    Module is obtained, for obtaining the video image of Nighttime road;
    Preprocessing module, for being pre-processed to the video image, the video image after obtaining binaryzation;
    Identification module, for identifying the rectangle frame of raindrop from the video image after the binaryzation;
    Statistical module, for counting the quantity of rectangle frame described in the video image after the binaryzation;
    Determining module determines whether the highway region rains for the quantity based on rectangle frame.
  10. 10. a kind of computer equipment, which is characterized in that including memory, processor and store on a memory and can locate The computer program run on reason device, the processor realize any one of claim 1 to 7 institute when executing the computer program The step of stating method.
  11. 11. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program The step of any one of claim 1 to 7 the method is realized when being executed by processor.
CN201910560424.6A 2019-06-26 2019-06-26 Nighttime road rains recognition methods, device, computer equipment and storage medium Pending CN110276318A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910560424.6A CN110276318A (en) 2019-06-26 2019-06-26 Nighttime road rains recognition methods, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910560424.6A CN110276318A (en) 2019-06-26 2019-06-26 Nighttime road rains recognition methods, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110276318A true CN110276318A (en) 2019-09-24

Family

ID=67963312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910560424.6A Pending CN110276318A (en) 2019-06-26 2019-06-26 Nighttime road rains recognition methods, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110276318A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111276106A (en) * 2020-02-19 2020-06-12 京东方科技集团股份有限公司 Area statistics-based anomaly labeling method and device
CN113311508A (en) * 2021-04-15 2021-08-27 泸州市气象局 Method for recognizing weather process by using voice
CN113421437A (en) * 2021-06-03 2021-09-21 上海大学 Rainy day road condition monitoring method and system based on computer vision
CN114937347A (en) * 2022-06-13 2022-08-23 上海源悦汽车电子股份有限公司 Rainfall detection method, device and equipment of vehicle and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814139A (en) * 2010-04-14 2010-08-25 华中科技大学 Raindrop identifying method
CN102254149A (en) * 2011-06-13 2011-11-23 南京航空航天大学 Method for detecting and identifying raindrops in video image
CN102254191A (en) * 2011-07-08 2011-11-23 华中科技大学 Rainfall particle phase identification method based on image processing
CN102707340A (en) * 2012-06-06 2012-10-03 南京大学 Rainfall measurement method based on video images
CN103543638A (en) * 2013-10-10 2014-01-29 山东神戎电子股份有限公司 Automatic windshield wiper control method
CN105068147A (en) * 2015-08-14 2015-11-18 中国气象局公共气象服务中心 Weather box device
CN108986117A (en) * 2018-07-18 2018-12-11 北京优酷科技有限公司 Video image segmentation method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814139A (en) * 2010-04-14 2010-08-25 华中科技大学 Raindrop identifying method
CN102254149A (en) * 2011-06-13 2011-11-23 南京航空航天大学 Method for detecting and identifying raindrops in video image
CN102254191A (en) * 2011-07-08 2011-11-23 华中科技大学 Rainfall particle phase identification method based on image processing
CN102707340A (en) * 2012-06-06 2012-10-03 南京大学 Rainfall measurement method based on video images
CN103543638A (en) * 2013-10-10 2014-01-29 山东神戎电子股份有限公司 Automatic windshield wiper control method
CN105068147A (en) * 2015-08-14 2015-11-18 中国气象局公共气象服务中心 Weather box device
CN108986117A (en) * 2018-07-18 2018-12-11 北京优酷科技有限公司 Video image segmentation method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王忆勤: "《中医面诊与计算机辅助诊断》", 30 November 2010, 上海科学技术出版 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111276106A (en) * 2020-02-19 2020-06-12 京东方科技集团股份有限公司 Area statistics-based anomaly labeling method and device
CN113311508A (en) * 2021-04-15 2021-08-27 泸州市气象局 Method for recognizing weather process by using voice
CN113421437A (en) * 2021-06-03 2021-09-21 上海大学 Rainy day road condition monitoring method and system based on computer vision
CN114937347A (en) * 2022-06-13 2022-08-23 上海源悦汽车电子股份有限公司 Rainfall detection method, device and equipment of vehicle and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN110276318A (en) Nighttime road rains recognition methods, device, computer equipment and storage medium
CN107274445B (en) Image depth estimation method and system
CN107507173B (en) No-reference definition evaluation method and system for full-slice image
CN110097044B (en) One-stage license plate detection and identification method based on deep learning
CN110544211B (en) Method, system, terminal and storage medium for detecting lens attached object
CN109635656A (en) Vehicle attribute recognition methods, device, equipment and medium neural network based
CN106934374B (en) Method and system for identifying traffic signboard in haze scene
WO2022027931A1 (en) Video image-based foreground detection method for vehicle in motion
CN102665034A (en) Night effect removal method for camera-collected video
TW201716266A (en) Image inpainting system area and method using the same
CN107705254B (en) City environment assessment method based on street view
CN112651293B (en) Video detection method for road illegal spreading event
CN112149476A (en) Target detection method, device, equipment and storage medium
CN107748882A (en) A kind of method for detecting lane lines and device
CN111144301A (en) Road pavement defect quick early warning device based on degree of depth learning
Lam et al. Real-time traffic status detection from on-line images using generic object detection system with deep learning
FAN et al. Robust lane detection and tracking based on machine vision
CN111524121A (en) Road and bridge fault automatic detection method based on machine vision technology
CN111159150A (en) Data expansion method and device
CN112863194B (en) Image processing method, device, terminal and medium
CN103226809A (en) Image haze removal device and image haze removal method
CN108090425B (en) Lane line detection method, device and terminal
CN110070122A (en) A kind of convolutional neural networks blurred picture classification method based on image enhancement
Rahaman et al. Lane detection for autonomous vehicle management: PHT approach
CN106682611B (en) image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190924