CN102509101A - Background updating method and vehicle target extracting method in traffic video monitoring - Google Patents
Background updating method and vehicle target extracting method in traffic video monitoring Download PDFInfo
- Publication number
- CN102509101A CN102509101A CN2011103881106A CN201110388110A CN102509101A CN 102509101 A CN102509101 A CN 102509101A CN 2011103881106 A CN2011103881106 A CN 2011103881106A CN 201110388110 A CN201110388110 A CN 201110388110A CN 102509101 A CN102509101 A CN 102509101A
- Authority
- CN
- China
- Prior art keywords
- image
- target
- background
- foreground image
- shade
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- 238000012544 monitoring process Methods 0.000 title claims abstract description 25
- 238000005314 correlation function Methods 0.000 claims abstract description 8
- 238000001514 detection method Methods 0.000 claims description 28
- 230000008030 elimination Effects 0.000 claims description 17
- 238000003379 elimination reaction Methods 0.000 claims description 17
- 230000001186 cumulative effect Effects 0.000 claims description 10
- 230000001788 irregular Effects 0.000 claims description 8
- 238000003708 edge detection Methods 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 241000283070 Equus zebra Species 0.000 description 1
- 230000001154 acute effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Traffic Control Systems (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a background updating method and a vehicle target extracting method in traffic video monitoring. The background updating method comprises the following step of: carrying out background updating judgment based on Canny edge detection. The background updating method solves the problem that the real-time background updating property is poor when traffic jams occur in urban cross roads and people wait a traffic light at a traffic light cross road. The vehicle target extracting method comprises the background updating method disclosed by the invention and a shadow and adhesion eliminating method. The vehicle target extracting method comprises the following step of: extracting a foreground image of a vehicle target on the premise of obtaining an ideal background based on the background updating method; and then eliminating shadows and adhesions, wherein the shadow and adhesion eliminating method comprises the following steps of: eliminating the shadows by using a cross-correlation function, filling a hole, cutting edges, and sequentially carrying out noise reduction, vertical projection and horizontal projection, and thus the problems of target vehicle adhesion and inaccurate outline caused by the shadows are solved; and extracting an ideal vehicle target.
Description
Technical field
The invention belongs to the intelligent transportation technical field of video monitoring, be specifically related to a kind of background update method based on the Canny rim detection, and based on the vehicle target method for distilling of above-mentioned background update method.
Background technology
Vehicle checking method development based on the video monitoring technology is very fast, because surveyed area is big, system is provided with outstanding advantages such as flexible, has become a research focus in intelligent transportation system field.Therefore video monitoring technology handles, analyzes, is interpreted as that with video image basic video monitor technology more and more causes people's attention for traffic system provides intuitively, analysis means easily.Vehicle detection is the important component part of intelligent transportation system; Because video equipment and the development of high-performance computer hardware and the maturation of video processing technique, become the research focus of traffic and transport field and obtain application more and more widely based on the wagon detector of video.Following main Points is most important in the middle of vehicle detection.
One, background modeling:
Background image acquisition method commonly used has: manually provide background method, median method, mixed Gauss model method etc.
1, manually provides the background method: need artificially to intervene in real time, when the people starts camera head when not having vehicle target and obtains background image observing.
Shortcoming: this method has increased man power and material's demand, can not realize that automatic background upgrades, and is difficult under the situation that does not have vehicle target under a lot of situation and obtains background image, like the vehicle detecting system of expressway.
2, median method: in a period of time, gray values of pixel points is got intermediate value, use this intermediate value gray-scale value of image corresponding point as a setting.
Shortcoming: to each pixel degree point, when not having vehicle target to pass through or light when changing, it is stable that the gray-scale value of this some keeps in a very little scope, however as vehicle target through or the light variation, acute variation can take place in the gray-scale value of this point.This method is suitable for the less occasion of scene vehicle target, when target frequently occurs, easily the prospect vehicle target is sneaked in the middle of the background image, produces mixing phenomena, thereby the target that causes extracting is inaccurate.
3, mixed Gauss model method: after reading in one section video, the gray scale of an image point is added up.When not having vehicle target to pass through, it is stable that the gray-scale value of changing the time keeps, have only when vehicle target through the time, violent variation just can take place in the gray scale of changing the time, thereby and according to this gray scale that changes of elimination set up background model.
Shortcoming: the mixture model calculated amount is big, the long-term situation that algorithm lost efficacy when static of vehicle target can occur.
4, Chinese patent " background update method in the traffic monitoring "; CN200910019287.1; Under the desirable state, be not a lot of when only being applicable to the initial background modeling such as the expressway vehicle flowrate, obtain under the desirable background according to vehicle flowrate judgement background update method.The drawback of this patent is: (1) is applicable to that the initial background modeling needs perfect condition; Can not be suitable for the urban road mouth, especially traffic lights crossing vehicle crowded and the time stop and wait red light, the initial background modeling is difficult; Other highway sections except that the traffic lights crossing comprise that the expressway vehicle is in motion state always; Seldom as the traffic lights crossing in urban district, traffic lights crossing vehicle relatively blocks up, and red light phenomenon such as existence; Therefore the initial background of a satisfaction of other highway sections acquisitions is relatively easy; 1., following bad situation arranged after the background extracting easily and there is following difficulty in the traffic lights crossing:: a. initial background is because vehicle slowly motion in guarded region always, and it is local fuzzy to cause background extracting to be come out, the inaccurate back vehicle detection accuracy that influences of background extracting; When b. initial background was set up, vehicle was waiting red light, in the background that therefore obtains a lot of vehicles was arranged, and background extracting quite inaccurate has a strong impact on vehicle detection; 2. the problem brought of context update: for other update algorithm, can be after vehicle movement leaves guarded region with under context update to the desirable situation, but red lights such as next ripple vehicle the time; Can vehicle replacement in background, so just have an endless loop again: to well, it is poor to arrive again by difference for background; Arrive again; Circulation is always gone down, for some algorithm even obtain less than good background always, like this let alone the accuracy of detection.(2) according to vehicle flowrate judgement context update, this needs the very complicated wagon flow determination methods of a cover.(3) if this patent initial background is undesirable, all follow-up work are all influenced.
Two, shade is eliminated and necessity:
In vehicle target detected, because the characteristic and the background of vehicle shadow are far different, and shade had identical motion feature with vehicle target, causes the motion shade to be easy to be mistaken for vehicle target, detects tracking for follow-up vehicle target and brings very big error.And the existence of shade can make a plurality of target adhesions, and erroneous judgement is a target; Also can make the vehicle target shape distortion.Therefore effectively shadow Detection and removal are necessary in real time.
Common shade removing method: shadow Detection, simple crosscorrelation shadow Detection etc. under the color space.
1, shadow Detection algorithm under the color space
At present mostly shadow algorithm is under the HIS space, to carry out, and tone H and saturation degree S have comprised colouring information, and intensity I then has nothing to do with chromatic information; When a pixel was covered by shade, its brightness changed greatly, and carrier chrominance signal changes not quite.
Shortcoming: vehicle window is similar with some local vehicle body information of same shade, carries out after shade eliminates, and vehicle window and local vehicle body are eliminated as shade, and can there be cavity, a very big zone in vehicle body, influences vehicle body information and positional information in the vehicle detection like this.
2, simple crosscorrelation shadow Detection algorithm
Because the brightness value of pixel when not covering by the shade covering with by shade is approximate linear, therefore can utilize the character of cross correlation function coefficient to carry out shadow Detection.
Shortcoming: same vehicle window and local vehicle body are eliminated, and the vehicle shadow edge can not eliminate, and cause vehicle detection inaccurate.
Summary of the invention
In order to overcome above-mentioned defective; The invention provides a kind of based on the background update method in the traffic video monitoring of Canny rim detection; And based on the vehicle target method for distilling in the traffic video monitoring of background update method of the present invention; The problem of the background real-time update difference the when background update method in the traffic video monitoring of the present invention has solved the red light such as grade that common crossing, urban district vehicle blocks up and the traffic lights crossing is common, the vehicle target method for distilling in the traffic video monitoring of the present invention has also solved vehicle target adhesion and the inaccurate problem of profile that shade caused.
The present invention for the technical scheme that solves its technical matters and adopt is:
The present invention is based on the Canny edge detection method, the Canny edge detection method is at first asked first order derivative at X and y direction, is combined as the derivative of four direction then.The point that these directional derivatives reach local maximum is exactly a candidate point of forming the edge.Yet the most important characteristics of Canny algorithm are that it is attempted become candidate pixel and be assembled into profile of independent pixel, and the formation of profile is that these pixels have been used two threshold values, upper limit threshold and lower thresholds.If the gradient of a pixel greater than upper limit threshold, then is considered to edge pixel, if be lower than lower threshold, then be abandoned, if between between the two, have only when it is connected with the pixel that is higher than upper limit threshold and just can be accepted.The bound threshold ratio that Canny recommends is between 2: 1 to 3: 1.The prospect gray level image is carried out the Canny rim detection can be found; The marginal information of vehicle body is very abundant; Vehicle window, wheel, car light etc. are arranged; Shade then is smoother, has only the curve in edge, utilizes this characteristic can carry out follow-up elimination shade preferably and solves the vehicle adhesion problems.
Based on above-mentioned Canny edge detection method, the background update method in the traffic video monitoring of the present invention comprises the steps:
Steps A, read a two field picture, appoint and get a kind of background modeling method, obtain the initial background image;
Step B, carry out context update judgement;
Step C, context update;
Wherein, among the step B, the step of carrying out the context update judgement is following:
B1, obtaining on the basis of background image the gray level image of present frame to be done the Canny rim detection, obtain comprising in the current frame image profile information of background and prospect;
B2, detect foreground target with background subtraction;
B3, the prospect gray level image is done the Canny rim detection, obtain the edge contour of foreground image;
B4, the edge-detected image of present frame and the edge-detected image of prospect are carried out AND-operation;
B5, the image after the AND-operation is carried out the statistics of pixel, if the cumulative total of pixel is during smaller or equal to a certain predetermined value, execution in step C then; If the cumulative total of pixel during greater than said predetermined value, is then returned steps A.
Based on background update method of the present invention, the vehicle target method for distilling in the traffic video monitoring of the present invention comprises background update method and the method for eliminating shade and adhesion,
Said background update method comprises the steps A to C:
Steps A, read a two field picture, appoint and get a kind of background modeling method, obtain the initial background image;
Step B, carry out context update judgement;
Wherein, among the step B, the step of carrying out the context update judgement is following:
B1, obtaining on the basis of background image the gray level image of present frame to be done the Canny rim detection, obtain comprising in the current frame image profile information of background and prospect;
B2, detect foreground target with background subtraction;
B3, the prospect gray level image is done the Canny rim detection, obtain the edge contour of foreground image;
B4, the edge-detected image of present frame and the edge-detected image of prospect are carried out AND-operation;
B5, the image after the AND-operation is carried out the statistics of pixel, if the cumulative total of pixel is during smaller or equal to a certain predetermined value, execution in step C then; If the cumulative total of pixel during greater than said predetermined value, is then returned steps A;
Step C, context update;
Based on said background update method, obtaining under the prerequisite of a desirable background, carry out step D, with current frame image subtracting background two field picture and carry out binaryzation, obtain the foreground image of vehicle target;
The foreground image that then step D is obtained is eliminated shade and adhesion, and the method for said elimination shade and adhesion comprises the steps E to I:
Step e, utilize cross correlation function that the foreground image that step D obtains is removed shade for the first time;
Target cavity in step F, the foreground image that step e is obtained is filled up and the edge cutting;
Step G, the foreground image that step F is obtained carry out region growing, eliminate the interference of noise, little target and irregular target;
Step H, the foreground image that step G is obtained carry out " vertical projection " to eliminate left and right vehicle wheel shade and adhesion;
Step I, the foreground image that step H is obtained carry out " horizontal projection " to eliminate vehicle front and back shade and adhesion.
The further technical scheme that the present invention adopted is that in the said step e, the foreground image that utilizes cross correlation function that step D is obtained goes the step of shade following for the first time:
Utilize formula
The calculating current pixel point (x, and cross-correlation coefficient NCC y) (x, y), wherein:
(x y) is background image to B, and (x y) is current frame image to C, and definition is so that (x is that central point, size are the template T of (2L+1) * (2L+1) y)
X, y(m, n)=C (x+m, y+n), wherein-L≤m≤L ,-L≤n≤L, L=5; If (x y) greater than setting threshold, thinks that then current pixel point is the shadow region, and the pixel in the corresponding foreground image is changed to 0 NCC, realizes foreground image is gone the shade operation for the first time.
The further technical scheme that the present invention adopted is, in the said step F, the target cavity in the foreground image that step e is obtained fills up following with the step of edge cutting:
Use 5 * 5 structure factor to through going for the first time the foreground image behind the shade to expand the image one (Image1) after obtaining handling; Use 9 * 9 structure factor to without going for the first time the foreground image behind the shade to expand the image two (Image2) after obtaining handling; The structure factor of use 3 * 3 corrodes the image three (Image3) after obtaining handling to image two (Image2); At last image one (Image1) and image three (Image3) are carried out AND-operation, the target cavity in the foreground image is filled up and the edge cutting with realization.
The further technical scheme that the present invention adopted is, among the said step G, the foreground image that step F is obtained carries out region growing, and the step of interference of eliminating noise, little target and irregular target is following:
In the foreground image that step F obtains, carry out region growing; Obtain N target UNICOM territory; Said N is meant several, adds up the pixel number in this N UNICOM territory and the ratio of width to height and the dutycycle that this UNICOM territory belongs to external frame then, if the ratio of width to height and dutycycle that the pixel number in corresponding UNICOM territory and this UNICOM territory belong to external frame are during less than setting threshold; Then all pixels in this UNICOM territory are changed to 0, realize elimination noise, little target and irregular target.
The further technical scheme that the present invention adopted is that among the said step H, " vertical projection " is with the step of eliminating left and right vehicle wheel shade and adhesion:
The foreground image that step G is obtained carries out region growing once more, obtains N
1Individual target UNICOM territory, N
1Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the horizontal ordinate point in each UNICOM territory prospect edge image and foreground image are carried out vertical scanning then, count the pixel number m that each horizontal ordinate point is gone up corresponding prospect edge image respectively
1Pixel number n with foreground image
1, work as m
1And n
1During respectively smaller or equal to a certain preset value, then pairing each pixel of foreground image on this horizontal ordinate point vertical direction in this UNICOM zone is changed to 0, realizes elimination vehicle target left and right sides shade and adhesion.
The further technical scheme that the present invention adopted is that among the said step I, " horizontal projection " is with the step of eliminating vehicle front and back shade and adhesion:
The foreground image that step H is obtained carries out the elimination of noise, little target and irregular target once more, and the foreground image after using 5 * 5 structure factor to denoising then expands respectively and corrodes, and once more carry out region growing to foreground image this moment, obtains N
2Individual target UNICOM territory, N
2Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the ordinate point in each UNICOM territory prospect edge image and foreground image are carried out horizontal scanning then, count the pixel number m that each ordinate point is gone up corresponding prospect edge image respectively
2Pixel number n with foreground image
2, work as m
2And n
2During respectively less than a certain preset value, then pairing each pixel of foreground image on this ordinate point vertical direction in this UNICOM zone is changed to 0, realizes elimination shade before and after the vehicle target and adhesion.
Numerical value such as the predetermined value described in the present invention, threshold value and preset value do not have concrete qualification in the present invention; These numerical value need to adjust according to conditions such as the actual conditions in concrete monitoring highway section and pixel height; And those skilled in the art are after studying the present invention carefully and can given suitable numerical value according to existing general knowledge and experience; For example the predetermined value among the step B5 can be set to 300, and the threshold value in the step e can be set at 0.985 etc.N described in the present invention, N
1Individual, N
2Individual, m
1, n
1, m
2And n
2Also do not have concrete numerical value and scope etc. quantity, these quantity are automatic generations, can be different and different according to actual conditions, and these " N ", " N
1Individual ", " N
2Individual " all be meant a plurality ofly, for the ease of distinguishing, obscure, so respectively with " N is individual ", " N in order to avoid produce
1Individual ", " N
2Individual " explain.
The invention has the beneficial effects as follows: the present invention is applicable to any monitoring highway section; Having solved crossing, urban district vehicle blocks up and the extreme case of vehicle background real-time update difference when waiting red light particularly; Vehicle target method for distilling of the present invention has also solved adhesion and the inaccurate problem of objective contour that vehicle causes because of shade simultaneously; Can extract vehicle target more exactly, method is simple and reliable, and accuracy and robustness height;
Compared with prior art, the invention has the advantages that:
1, adapt to nearly all background modeling method, as long as obtain an initial background, background is undesirable also passable;
2, can obtain a desirable background very soon in context update judgement and after upgrading and real-time update is gone down, will be real-time desirable background in case obtain desirable background always;
3, biggest advantage of the present invention: no matter any highway section video monitoring, can obtain a satisfied initial background very soon, and real-time update, particularly urban road and traffic lights crossing;
4, because decision method is accurate, simple context update algorithm can be adopted, real-time can be guaranteed;
5, do not receive illumination variation, camera shake, background disturbance and vehicle target disturbing effect;
6, shade removing method of the present invention can be preserved the vehicle body information integrity preferably, and shade is eliminated relatively clean, has solved the vehicle adhesion and the inaccurate problem of vehicle ' s contour that cause because of shade simultaneously.
Description of drawings
Fig. 1 is the process flow diagram of context update judgement of the present invention;
Fig. 2 is the process flow diagram of elimination shade of the present invention and adhesion.
Embodiment
Embodiment: set forth in detail in the face of preferred embodiment of the present invention down, thereby protection scope of the present invention is made more explicit defining so that advantage of the present invention and characteristic can be easier to it will be appreciated by those skilled in the art that.
Based on the Canny edge detection method, the invention provides the background update method in a kind of traffic video monitoring, undertaken by following step:
Steps A, read a two field picture, appoint and get a kind of background modeling method, obtain the initial background image;
Step B, carry out context update judgement, its concrete steps are following:
B1, obtaining on the basis of background image; The gray level image of present frame is done the Canny rim detection; Obtain comprising in the current frame image profile information (edge1) of background and prospect, like the contour edge information of track and zebra stripes etc. in profiles such as the vehicle window of car in the current frame image, vehicle tyre, car light and the background image;
B2, detect foreground target, calculate the poor of current frame image and background image, obtain the prospect gray level image, promptly detect vehicle target with background subtraction;
B3, the prospect gray level image is done the Canny rim detection, obtain the edge contour (edge) of foreground image;
B4, the edge-detected image edge of present frame and the edge-detected image edge1 of prospect are carried out AND-operation, obtain image edge_and,
B5, traversal edge_and image are obtained and are not 0 pixel sum, if the cumulative total of pixel is during smaller or equal to a certain predetermined value, and execution in step C then, the refreshing weight bigger to the context update setting carried out quick context update; If the cumulative total of pixel is during greater than said predetermined value, corresponding situation possibly be: one and above vehicle target are arranged in a. current frame image; B. vehicle gets congestion; C. vehicle is waiting red light etc., at this moment just should not return steps A to context update, if the words of upgrading easily with vehicle replacement in background, the detection effect of influence back is then.
C, context update: no matter obtain under the whether desirable situation in background; Grasp one section current image that does not have foreground target; Just can be updated to desirable background in time, continual and steady real-time update background is with not blocked up and waiting the vehicle of red light to influence shortly.When judging that by step B5 when not having foreground target to exist in the present frame, fast updating will not influence the effect of context update this moment, thus adopt the very low algorithm of complexity to carry out quick context update, that is:
B
k(x,y)=(1-a)I
k(x,y)+aB
k-1(x,y),
B
k(x is y) for upgrading the pixel of rear backdrop image, I
k(x y) is the pixel of present frame, B
K-1(x y) is the pixel of background image before upgrading, and a is a refreshing weight, can regulate.Adopting the simplest this update method, mainly is because judgment condition is accurate, can obtain good background like this, and algorithm complex is very low always, guarantees real-time.
The present invention also provides the method for distilling of the vehicle target in a kind of traffic video monitoring; Comprise background update method of the present invention and the method for eliminating shade and adhesion; Based on background update method of the present invention; Obtaining under the prerequisite of a desirable background, carrying out step D, with current frame image subtracting background two field picture and carry out binaryzation, obtaining the foreground image of vehicle target.
The foreground image that then step D is obtained is eliminated shade and adhesion, and the method for said elimination shade and adhesion comprises the steps E to I:
Step e, because the brightness value of pixel when not covered by shade and being covered by shade is approximate linear, therefore can utilize the character of cross correlation function coefficient to embody this relation and go shade to operate for the first time:
Utilize formula
The calculating current pixel point (x, and cross-correlation coefficient NCC y) (x, y), wherein:
(x y) is background image to B, and (x y) is current frame image to C, and definition is so that (x is that central point, size are the template T of (2L+1) * (2L+1) y)
X, y(m, n)=C (x+m, y+n), wherein-L≤m≤L ,-L≤n≤L, L=5; If (x y) greater than 0.985, thinks that then current pixel point is the shadow region, and the pixel in the corresponding foreground image is changed to 0 NCC, realizes foreground image is gone the shade operation for the first time.Because using cross correlation function to carry out shade eliminates; Can cause vehicle window and local vehicle body also to be eliminated, the cavity appears in vehicle target, and the vehicle shadow edge can not be eliminated; Cause vehicle detection inaccurate, eliminate so also must follow-uply carry out more careful ground shade.
Target cavity in step F, the foreground image that step e is obtained is filled up and the edge cutting: use 5 * 5 structure factor to through going for the first time the foreground image behind the shade to expand the image one (Image1) after obtaining handling; Use 9 * 9 structure factor to without going for the first time the foreground image behind the shade to expand the image two (Image2) after obtaining handling; The structure factor of use 3 * 3 corrodes the image three (Image3) after obtaining handling to image two (Image2); At last image one (Image1) and image three (Image3) are carried out AND-operation, the target cavity in the foreground image is filled up and the edge cutting with realization.
Step G, the foreground image that step F is obtained carry out region growing; Eliminate the interference of noise, little target and irregular target: in foreground image, carry out region growing; Obtain N target UNICOM territory; Said N is meant several, adds up the pixel number in this N UNICOM territory and the ratio of width to height and the dutycycle that this UNICOM territory belongs to external frame then, if the ratio of width to height and dutycycle that the pixel number in corresponding UNICOM territory and this UNICOM territory belong to external frame are during less than setting threshold; Then all pixels in this UNICOM territory are changed to 0, realize elimination noise, little target and irregular target.
Step H, the foreground image that step G is obtained carry out " vertical projection " to eliminate left and right vehicle wheel shade and adhesion: the foreground image that step G is obtained carries out region growing once more, obtains N
1Individual target UNICOM territory, N
1Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the horizontal ordinate point in each UNICOM territory prospect edge image and foreground image are carried out vertical scanning then, count the pixel number m that each horizontal ordinate point is gone up corresponding prospect edge image respectively
1Pixel number n with foreground image
1, work as m
1<6 and n
1During<2/3 vehicle commander (vehicle commander's pixel number in the image), then pairing each pixel of foreground image on this horizontal ordinate point vertical direction in this UNICOM zone is changed to 0, realizes elimination vehicle target left and right sides shade and adhesion.
Step I, the foreground image that step H is obtained carry out " horizontal projection " to eliminate vehicle front and back shade and adhesion: the foreground image that step H is obtained carries out the elimination of noise, little target and irregular target once more; Foreground image after using 5 * 5 structure factor to denoising then expands respectively and corrodes; Once more carry out region growing to foreground image this moment, obtains N
2Individual target UNICOM territory, N
2Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the ordinate point in each UNICOM territory prospect edge image and foreground image are carried out horizontal scanning then, count the pixel number m that each ordinate point is gone up corresponding prospect edge image respectively
2Pixel number n with foreground image
2, work as m
2<6 and n
2<2/3 overall width (pixel number of overall width in the image) then is changed to 0 with pairing each pixel of foreground image on this ordinate point vertical direction in this UNICOM zone, realizes the elimination to shade before and after the vehicle target and adhesion.
After step H and I processing, the foreground target that stays is exactly a complete vehicle.In above processing procedure, no matter whether be that the vehicle adhesion that shade causes can both be resolved, because the corrosion expansion process of image also very easily causes the adhesion of foreground target, so whether this invention is to no matter be that the adhesion that causes of shade is all effectively same.
The above is merely preferable possible embodiments of the present invention; Non-so limit to claim of the present invention; The present invention can also have other implementation method; So the technical scheme that equal replacement that all utilizations instructions of the present invention and diagramatic content are done or equivalent transformation form, all be contained in requirement protection of the present invention scope in.
Claims (7)
1. the background update method in the traffic video monitoring comprises the steps:
Steps A, read a two field picture, appoint and get a kind of background modeling method, obtain the initial background image;
Step B, carry out context update judgement;
Step C, context update;
It is characterized in that among the step B, the step of carrying out the context update judgement is following:
B1, obtaining on the basis of background image the gray level image of present frame to be done the Canny rim detection, obtain comprising in the current frame image profile information of background and prospect;
B2, detect foreground target with background subtraction;
B3, the prospect gray level image is done the Canny rim detection, obtain the edge contour of foreground image;
B4, the edge-detected image of present frame and the edge-detected image of prospect are carried out AND-operation;
B5, the image after the AND-operation is carried out the statistics of pixel, if the cumulative total of pixel is during smaller or equal to a certain predetermined value, execution in step C then; If the cumulative total of pixel during greater than said predetermined value, is then returned steps A.
2. the vehicle target method for distilling in the traffic video monitoring is characterized in that, comprises background update method and the method for eliminating shade and adhesion,
Said background update method comprises the steps A to C:
Steps A, read a two field picture, appoint and get a kind of background modeling method, obtain the initial background image;
Step B, carry out context update judgement;
Wherein, among the step B, the step of carrying out the context update judgement is following:
B1, obtaining on the basis of background image the gray level image of present frame to be done the Canny rim detection, obtain comprising in the current frame image profile information of background and prospect;
B2, detect foreground target with background subtraction;
B3, the prospect gray level image is done the Canny rim detection, obtain the edge contour of foreground image;
B4, the edge-detected image of present frame and the edge-detected image of prospect are carried out AND-operation;
B5, the image after the AND-operation is carried out the statistics of pixel, if the cumulative total of pixel is during smaller or equal to a certain predetermined value, execution in step C then; If the cumulative total of pixel during greater than said predetermined value, is then returned steps A;
Step C, context update;
Based on said background update method, obtaining under the prerequisite of a desirable background, carry out step D, with current frame image subtracting background two field picture and carry out binaryzation, obtain the foreground image of vehicle target;
The foreground image that then step D is obtained is eliminated shade and adhesion, and the method for said elimination shade and adhesion comprises the steps E to I:
Step e, utilize cross correlation function that the foreground image that step D obtains is removed shade for the first time;
Target cavity in step F, the foreground image that step e is obtained is filled up and the edge cutting;
Step G, the foreground image that step F is obtained carry out region growing, eliminate the interference of noise, little target and irregular target;
Step H, the foreground image that step G is obtained carry out " vertical projection " to eliminate left and right vehicle wheel shade and adhesion;
Step I, the foreground image that step H is obtained carry out " horizontal projection " to eliminate vehicle front and back shade and adhesion.
3. the vehicle target method for distilling in the traffic video monitoring according to claim 2 is characterized in that, in the said step e, the foreground image that utilizes cross correlation function that step D is obtained goes the step of shade following for the first time:
Utilize formula
The calculating current pixel point (x, and cross-correlation coefficient NCC y) (x, y), wherein:
(x y) is background image to B, and (x y) is current frame image to C, and definition is so that (x is that central point, size are the template T of (2L+1) * (2L+1) y)
X, y(m, n)=C (x+m, y+n), wherein-L≤m≤L ,-L≤n≤L, L=5; If (x y) greater than setting threshold, thinks that then current pixel point is the shadow region, and the pixel in the corresponding foreground image is changed to 0 NCC, realizes foreground image is gone the shade operation for the first time.
4. the vehicle target method for distilling in the traffic video monitoring according to claim 2 is characterized in that, in the said step F, the target cavity in the foreground image that step e is obtained fills up following with the step of edge cutting:
Use 5 * 5 structure factor to through going for the first time the foreground image behind the shade to expand the image one after obtaining handling; Use 9 * 9 structure factor to without going for the first time the foreground image behind the shade to expand the image two after obtaining handling; The structure factor of use 3 * 3 corrodes the image three after obtaining handling to image two; At last image one and image three are carried out AND-operation, the target cavity in the foreground image is filled up and the edge cutting with realization.
5. the vehicle target method for distilling in the traffic video monitoring according to claim 2 is characterized in that, among the said step G, the foreground image that step F is obtained carries out region growing, and the step of the interference of elimination noise, little target and irregular target is following:
In the foreground image that step F obtains, carry out region growing; Obtain N target UNICOM territory; Said N is meant several, adds up the pixel number in this N UNICOM territory and the ratio of width to height and the dutycycle that this UNICOM territory belongs to external frame then, if the ratio of width to height and dutycycle that the pixel number in corresponding UNICOM territory and this UNICOM territory belong to external frame are during less than setting threshold; Then all pixels in this UNICOM territory are changed to 0, realize elimination noise, little target and irregular target.
6. the vehicle target method for distilling in the traffic video monitoring according to claim 2 is characterized in that, among the said step H, " vertical projection " with the step of eliminating left and right vehicle wheel shade and adhesion is:
The foreground image that step G is obtained carries out region growing once more, obtains N
1Individual target UNICOM territory, N
1Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the horizontal ordinate point in each UNICOM territory prospect edge image and foreground image are carried out vertical scanning then, count the pixel number m that each horizontal ordinate point is gone up corresponding prospect edge image respectively
1Pixel number n with foreground image
1, work as m
1And n
1During respectively smaller or equal to a certain preset value, then pairing each pixel of foreground image on this horizontal ordinate point vertical direction in this UNICOM zone is changed to 0, realizes elimination vehicle target left and right sides shade and adhesion.
7. the vehicle target method for distilling in the traffic video monitoring according to claim 2 is characterized in that, among the said step I, " horizontal projection " with the step of eliminating vehicle front and back shade and adhesion is:
The foreground image that step H is obtained carries out the elimination of noise, little target and irregular target once more, and the foreground image after using 5 * 5 structure factor to denoising then expands respectively and corrodes, and once more carry out region growing to foreground image this moment, obtains N
2Individual target UNICOM territory, N
2Individually be meant several; The surveyed area location is carried out in each UNICOM territory; Differentiate the regional location at its place; On the ordinate point in each UNICOM territory prospect edge image and foreground image are carried out horizontal scanning then, count the pixel number m that each ordinate point is gone up corresponding prospect edge image respectively
2Pixel number n with foreground image
2, work as m
2And n
2During respectively less than a certain preset value, then pairing each pixel of foreground image on this ordinate point vertical direction in this UNICOM zone is changed to 0, realizes elimination shade before and after the vehicle target and adhesion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110388110 CN102509101B (en) | 2011-11-30 | 2011-11-30 | Background updating method and vehicle target extracting method in traffic video monitoring |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110388110 CN102509101B (en) | 2011-11-30 | 2011-11-30 | Background updating method and vehicle target extracting method in traffic video monitoring |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102509101A true CN102509101A (en) | 2012-06-20 |
CN102509101B CN102509101B (en) | 2013-06-26 |
Family
ID=46221182
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110388110 Expired - Fee Related CN102509101B (en) | 2011-11-30 | 2011-11-30 | Background updating method and vehicle target extracting method in traffic video monitoring |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102509101B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103065145A (en) * | 2012-12-07 | 2013-04-24 | 北京中邮致鼎科技有限公司 | Vehicle movement shadow eliminating method |
CN103077617A (en) * | 2012-12-24 | 2013-05-01 | 南京航空航天大学 | Pedestrian crosswalk intelligent traffic light monitoring system and method based on computer vision |
CN103795909A (en) * | 2012-10-29 | 2014-05-14 | 株式会社日立制作所 | Shooting optimization device, image-pickup device and shooting optimization method |
CN104280036A (en) * | 2013-07-05 | 2015-01-14 | 北京四维图新科技股份有限公司 | Traffic information detection and positioning method, device and electronic equipment |
CN104899881A (en) * | 2015-05-28 | 2015-09-09 | 湖南大学 | Shadow detection method for moving vehicle in video image |
CN105069770A (en) * | 2015-09-09 | 2015-11-18 | 苏州威盛视信息科技有限公司 | AOI image scanning detection processing method |
CN105335985A (en) * | 2014-08-01 | 2016-02-17 | 深圳中集天达空港设备有限公司 | Real-time capture method and system of docking airplane on the basis of machine vision |
CN106446790A (en) * | 2016-08-30 | 2017-02-22 | 上海交通大学 | Method for tracking and analyzing traffic video flow of fixed camera |
WO2017028010A1 (en) * | 2015-08-14 | 2017-02-23 | 富士通株式会社 | Background model extracting method and apparatus and image processing device |
CN106874837A (en) * | 2016-12-29 | 2017-06-20 | 中国船舶重工集团公司第七0研究所 | A kind of vehicle checking method based on Computer Vision |
CN107123287A (en) * | 2017-06-27 | 2017-09-01 | 吉林大学 | A kind of traffic lights control integrated device based on Self-organizing Coordinated |
CN108279287A (en) * | 2018-02-01 | 2018-07-13 | 李绍辉 | Smog Quick diffusing system based on the communication technology |
CN106023650B (en) * | 2016-07-01 | 2018-11-30 | 南京邮电大学 | Real-time pedestrian's method for early warning based on traffic intersection video and computer parallel processing system |
CN109063634A (en) * | 2018-07-29 | 2018-12-21 | 国网上海市电力公司 | Using the method for hough-circle transform identification target object region electrical symbol in power monitoring |
CN109726691A (en) * | 2018-12-30 | 2019-05-07 | 杭州铭智云教育科技有限公司 | A kind of monitoring method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102867415B (en) * | 2012-09-12 | 2015-05-13 | 重庆大学 | Video detection technology-based road jam judgement method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101236606A (en) * | 2008-03-07 | 2008-08-06 | 北京中星微电子有限公司 | Shadow cancelling method and system in vision frequency monitoring |
US20100208987A1 (en) * | 2009-02-16 | 2010-08-19 | Institute For Information Industry | Method and system for foreground detection using multi-modality fusion graph cut |
CN101860664A (en) * | 2010-06-13 | 2010-10-13 | 华中科技大学 | Moving target detection method robust to illumination variation |
-
2011
- 2011-11-30 CN CN 201110388110 patent/CN102509101B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101236606A (en) * | 2008-03-07 | 2008-08-06 | 北京中星微电子有限公司 | Shadow cancelling method and system in vision frequency monitoring |
US20100208987A1 (en) * | 2009-02-16 | 2010-08-19 | Institute For Information Industry | Method and system for foreground detection using multi-modality fusion graph cut |
CN101860664A (en) * | 2010-06-13 | 2010-10-13 | 华中科技大学 | Moving target detection method robust to illumination variation |
Non-Patent Citations (1)
Title |
---|
王晓冬等: "基于快速归一化互相关函数的运动车辆阴影检测算法", 《计算机应用》 * |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103795909A (en) * | 2012-10-29 | 2014-05-14 | 株式会社日立制作所 | Shooting optimization device, image-pickup device and shooting optimization method |
CN103065145A (en) * | 2012-12-07 | 2013-04-24 | 北京中邮致鼎科技有限公司 | Vehicle movement shadow eliminating method |
CN103077617A (en) * | 2012-12-24 | 2013-05-01 | 南京航空航天大学 | Pedestrian crosswalk intelligent traffic light monitoring system and method based on computer vision |
CN103077617B (en) * | 2012-12-24 | 2015-11-04 | 南京航空航天大学 | Based on crossing intelligent traffic light supervisory systems and the method for computer vision |
CN104280036A (en) * | 2013-07-05 | 2015-01-14 | 北京四维图新科技股份有限公司 | Traffic information detection and positioning method, device and electronic equipment |
CN105335985A (en) * | 2014-08-01 | 2016-02-17 | 深圳中集天达空港设备有限公司 | Real-time capture method and system of docking airplane on the basis of machine vision |
CN105335985B (en) * | 2014-08-01 | 2019-03-01 | 深圳中集天达空港设备有限公司 | A kind of real-time capturing method and system of docking aircraft based on machine vision |
CN104899881A (en) * | 2015-05-28 | 2015-09-09 | 湖南大学 | Shadow detection method for moving vehicle in video image |
CN104899881B (en) * | 2015-05-28 | 2017-11-28 | 湖南大学 | Moving vehicle shadow detection method in a kind of video image |
WO2017028010A1 (en) * | 2015-08-14 | 2017-02-23 | 富士通株式会社 | Background model extracting method and apparatus and image processing device |
CN105069770A (en) * | 2015-09-09 | 2015-11-18 | 苏州威盛视信息科技有限公司 | AOI image scanning detection processing method |
CN106023650B (en) * | 2016-07-01 | 2018-11-30 | 南京邮电大学 | Real-time pedestrian's method for early warning based on traffic intersection video and computer parallel processing system |
CN106446790A (en) * | 2016-08-30 | 2017-02-22 | 上海交通大学 | Method for tracking and analyzing traffic video flow of fixed camera |
CN106874837A (en) * | 2016-12-29 | 2017-06-20 | 中国船舶重工集团公司第七0研究所 | A kind of vehicle checking method based on Computer Vision |
CN106874837B (en) * | 2016-12-29 | 2020-10-30 | 中国船舶重工集团公司第七一0研究所 | Vehicle detection method based on video image processing |
CN107123287A (en) * | 2017-06-27 | 2017-09-01 | 吉林大学 | A kind of traffic lights control integrated device based on Self-organizing Coordinated |
CN107123287B (en) * | 2017-06-27 | 2019-08-02 | 吉林大学 | A kind of traffic lights control integrated device based on Self-organizing Coordinated |
CN108279287A (en) * | 2018-02-01 | 2018-07-13 | 李绍辉 | Smog Quick diffusing system based on the communication technology |
CN108279287B (en) * | 2018-02-01 | 2020-12-18 | 嘉兴市丰成五金材料股份有限公司 | Smoke rapid emission system based on communication technology |
CN109063634A (en) * | 2018-07-29 | 2018-12-21 | 国网上海市电力公司 | Using the method for hough-circle transform identification target object region electrical symbol in power monitoring |
CN109726691A (en) * | 2018-12-30 | 2019-05-07 | 杭州铭智云教育科技有限公司 | A kind of monitoring method |
CN109726691B (en) * | 2018-12-30 | 2020-12-04 | 安徽润谷科技有限公司 | Monitoring method |
Also Published As
Publication number | Publication date |
---|---|
CN102509101B (en) | 2013-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102509101B (en) | Background updating method and vehicle target extracting method in traffic video monitoring | |
CN102289948B (en) | Multi-characteristic fusion multi-vehicle video tracking method under highway scene | |
CN110287905B (en) | Deep learning-based real-time traffic jam area detection method | |
CN103077617B (en) | Based on crossing intelligent traffic light supervisory systems and the method for computer vision | |
CN100545867C (en) | Aerial shooting traffic video frequency vehicle rapid checking method | |
CN102289940B (en) | Hybrid differential-based traffic flow detection method | |
CN101639983B (en) | Multilane traffic volume detection method based on image information entropy | |
CN108615358A (en) | A kind of congestion in road detection method and device | |
CN104183142B (en) | A kind of statistical method of traffic flow based on image vision treatment technology | |
CN103150559B (en) | Head recognition and tracking method based on Kinect three-dimensional depth image | |
CN102280030B (en) | Method and system for detecting vehicle at night | |
CN104599502A (en) | Method for traffic flow statistics based on video monitoring | |
CN106951879A (en) | Multiple features fusion vehicle checking method based on camera and millimetre-wave radar | |
CN103730015B (en) | Intersection traffic flow detecting method and device | |
CN103034862A (en) | Road snow and rain state automatic identification method based on feature information classification | |
CN103500338A (en) | Road zebra crossing automatic extraction method based on vehicle-mounted laser scanning point cloud | |
CN103366572B (en) | Method for detecting video traffic parameters of intersection | |
CN103207988A (en) | Method and device for image identification | |
CN102682602B (en) | Collecting method for road traffic parameters based on video technique | |
CN103927526A (en) | Vehicle detecting method based on Gauss difference multi-scale edge fusion | |
CN103383733A (en) | Lane video detection method based on half-machine study | |
CN101231756A (en) | Method and apparatus for detecting moving goal shade | |
CN104794907A (en) | Traffic volume detection method using lane splitting and combining | |
CN103077387B (en) | Carriage of freight train automatic testing method in video | |
CN106887004A (en) | A kind of method for detecting lane lines based on Block- matching |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130626 |