CN103778790A - Traffic flow square-wave statistical method based on video sequence - Google Patents

Traffic flow square-wave statistical method based on video sequence Download PDF

Info

Publication number
CN103778790A
CN103778790A CN201410014861.5A CN201410014861A CN103778790A CN 103778790 A CN103778790 A CN 103778790A CN 201410014861 A CN201410014861 A CN 201410014861A CN 103778790 A CN103778790 A CN 103778790A
Authority
CN
China
Prior art keywords
markings
image
vehicle
video
processing
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
Application number
CN201410014861.5A
Other languages
Chinese (zh)
Other versions
CN103778790B (en
Inventor
孔万增
周凌霄
徐思佳
徐飞鹏
孙志海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Gaoxin Technology Co Ltd
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN201410014861.5A priority Critical patent/CN103778790B/en
Publication of CN103778790A publication Critical patent/CN103778790A/en
Application granted granted Critical
Publication of CN103778790B publication Critical patent/CN103778790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a traffic flow square-wave statistical method based on a video sequence. In the method, a CCD camera and an image acquisition card are used to obtain images that automobiles pass a highway and then the information is transmitted to a computer and video files are converted into frame pictures of a BMP format through conversion software and then the frame pictures are named according to a specific format. Digital image processing is performed on each frame of image and the processing includes grey processing, frame difference and binaryzation and the like performed on the acquired images. And a main objective of the processing is to extract moving objects in a background. Then a marker line area, that is an area in which passing of automobiles is detected, is set. In the area, a square-wave detection method is used to analyze binary images. According to the number of white pixels in a detection line, whether vehicles pass is judged. When the number of the white pixel points is larger than a specific threshold at a specific moment, it is judged that vehicles pass and thus the vehicles are counted. The traffic flow square-wave statistical method based on the video sequence is capable of effectively avoiding errors resulted from camera shaking so that measurement precision is improved.

Description

A kind of vehicle flowrate square wave statistic law based on video sequence
Technical field
The image the invention belongs in intelligent traffic administration system technical field is processed and area of pattern recognition, is specifically related to a kind of based on difference and binaryzation co-treatment extraction video frequency motion target and the vehicle flowrate square wave statistic law based on markings are set.
Background technology
Traffic jam has become quite serious problem of modern society.In more than ten years, how people's notice carries out in effective and reasonable traffic administration if being placed in the past.Intelligent transportation system (ITS) is considered to solve unique way that traffic above-ground is blocked, a lot of bibliographical informations relevant research.
As the basis of ITS, traffic control system (ATMS), it is to rely on advanced Traffic monitoring technology, Computerized Information Processing Tech and the communication technology, traffic operation and facility to urban road and interurban highway integrated network carry out integrated control and management, by monitoring that vehicle operating controls the flow of traffic, process rapidly and accurately the variety of event of local generation, to make passenger and freight transportation reach optimum condition.In the research field of a large amount of acquisition of road traffic information, the acquisition method of video image is because its powerful true reflection ability has become one of research main flow.
At present, the traffic information acquisition system based on vision is reasonable is to use the detection method of entropy as characteristic parameter.But the shortcoming of the method is too sensitive to DE Camera Shake, may causes like this mistake survey to vehicle, thereby affect the degree of accuracy of detection limit.Viarani has proposed one and has been referred to as the method for " virtual inductance loop " and extracted transport information, but this method is very sensitive to different light condition.
Summary of the invention
The present invention is directed to the deficiencies in the prior art, a kind of vehicle flowrate square wave detection method based on video sequence is provided, the method is that the square wave statistic law based on difference and binaryzation co-treatment extraction video frequency motion target and markings setting realizes.
The technical solution adopted in the present invention is: use CCD camera lens and image pick-up card to obtain the image that highway automobile travelled, information is passed to computing machine and by switching software, video file is transformed into the frame picture of BMP form, and according to must form name.Then every two field picture is carried out to Digital Image Processing, comprise that image to gathering carries out that gray scale processing, frame are poor, binaryzation etc., its object is mainly extracted in the Moving Objects in background.Next markings region is set, detect the region that automobile passes through, at this region user's wave detecting method, bianry image is analyzed, judge whether that according to the number of the white pixel in detection line car passes through, when the quantity of white pixel point is at a time greater than a certain threshold value, judgement has automobile to pass through, thereby carries out the counting of vehicle.
The invention has the beneficial effects as follows, provide a kind of to DE Camera Shake susceptibility a little less than, thereby improve the real-time traffic flow amount Approach for road detection of measuring accuracy.
Accompanying drawing explanation
Fig. 1 is specific embodiment of the invention system module block diagram;
Fig. 2 is specific embodiment of the invention system flowchart;
Fig. 3 is specific embodiment of the invention square wave wave number figure;
Fig. 4 is specific embodiment of the invention vehicle detection step and design sketch.
Embodiment
With reference to explanation accompanying drawing 1, core process of the present invention is: first inputted video image, then according to road concrete condition, the parameter on markings and each markings is set, in the time that the position of markings is set, system is using the image on current markings and monitored area as initial background image, so can only set in the time that markings do not have vehicle.After completing above-mentioned parameter initialization, system just can carry out vehicle detection, first needs image to carry out pre-service when vehicle detection, and pre-treatment step comprises that gray processing processing, background subtraction calculate, binaryzation; After image pre-service, carry out again square wave calculating, finally carry out vehicle count and context update step.
With reference to explanation accompanying drawing 2, below each step is described in detail:
Step S1, enter video information.
Step S2, for the road video information reading, reads the first two field picture frame as a setting, for subsequent parameter setting provides reference.Due to different highways, track quantity, background are all inconsistent, and in order to make can to realize wagon flow quantitative statistics in different highways, the present invention has selected multilane that the method for mark line is set.Be that every track all arranges markings, detect the vehicle flowrate in this track, then the flow number in all tracks is added, can draw this highway vehicle flowrate of section at a time.In order to adapt to the shooting of different angles and the highway in different tracks, the present invention arranges the function of markings position manual setting.By regulating track quantity, the left width of each markings, right width and height, obtain optimal detection region, thereby make car statistics more accurate.
Step S3, video image is carried out to gray scale processing, and image after processing is done to Difference Calculation, eliminate because of external cause impacts produced on recording of video image such as illumination, weather, brightness, camera shooting shakes, then use OTSU(maximum variance between clusters) method does two-value processing to difference image, thereby extracts moving target.Wherein:
Gray processing processing:
Suppose R, G, the B value of image point, the brightness value of this point:
Y=0.299×R+0.587×G+0.114×B;
Make again: R=G=B=Y, the new images obtaining, is gray-scale map.
Method of difference:
Be located at t 1and t 2the two width gray level image values in moment are f (x, y, t 1) and f (x, y, t 2), binaryzation difference diagram is: f chafen=f (x, y, t 1)-f (x, y, t 2).
Binaryzation: wherein T dit is the threshold values that adopts maximum variance between clusters to obtain.
Step S4, enters square wave calculation stages.
1) in markings, automobile extracts
A certain position in track arranges after markings, if while having car through this track, must pass through these markings.After two-value is processed, the position of moving target can show with white pixel point clearly in bianry image, and background is shown as black.Therefore,, when moving target does not pass through markings, the pixel of markings position is black; While having moving target to pass through markings, the pixel in a certain region of markings can change, and has become white by black before, until moving target leaves markings, markings region becomes black again.
When automobile does not enter markings, each pixel of markings position is black.
When automobile has just entered markings, markings position partial pixel point starts to change, and one part of pixel point becomes white from black.
When body of a motor car enters markings, automobile nearly all becomes white by the region of markings.
When automobile tail will leave markings, markings position pixel transfers black to by white.
When automobile leaves markings, the pixel that markings location restore is original.
Analyze the pixel that automobile enters markings position above, be not difficult to find out, when automobile passes through markings, the pixel of markings position is one and continues the process changing.Therefore, as long as the quantity of judgement symbol line position white point is in the time becoming 0 from a certain value, illustrated that a car has passed through markings, thereby extracted automobile at markings place.
And in practice, if there is car and then, when the tailstock of last car does not also leave markings, when then the headstock of a car has entered markings, if according to thought before, runs into this situation two cars and can only remember into one.Although so the automobile that method before can judgement symbol line position, thus can not accurately judge and can not accurately extract automobile, so that the statistics to automobile afterwards exerts an influence.
For above-mentioned situation, the present invention has adopted the method that threshold value is set.In the time that the white pixel point in markings is less than a certain threshold value, judge that automobile passes through, automobile quantity adds 1.When the tailstock of last car, also do not leave markings, when then the headstock of a car has entered markings, the pixel of white point is far smaller than the white point number of vehicle body in markings region, pixel when as long as the threshold value arranging is greater than automobile and joins end to end, the quantity that judges so accurately automobile is feasible.Therefore use solving the above problems that this method can be good.
That is: markings white point pixel is less than threshold value, passes through without automobile.
Except the problem that vehicle head tail joins, in the time of image binaryzation the length of automobile, width, highly, the imaging of color while all having affected binaryzation.The long meeting of automobile causes the bianry image imaging of automobile to produce breakpoint, and the color that vehicle color approaches road surface causes binaryzation white point quantity very few, once be less than the threshold value of setting, cannot judge.Said above, when automobile passes through markings, markings position continues to occur white point, if we judge in the time that the quantity of white point is greater than a certain value for just there being a car to pass through, when a car continues to pass through, white point quantity is only greater than this threshold value, no matter be that white point is on the low side, still having breakpoint to judge is same car.Thereby extract accurately the automobile in markings.
That is: markings white point pixel is greater than threshold value, is just having an automobile to pass through.
In conjunction with two kinds of problems talking about, by the assignment test respectively of two threshold values, find best results in the time that the value of two threshold values equates above.In order to adapt to various highways, the shooting of different angles, different light rays, the present invention has added the function of revising threshold value, even if scene changes, also can pass through the adjusting to threshold value, realizes the extraction of vehicle in markings position.
2) square wave calculates
By above method, we can be identified in the automobile in markings, and can distinguish each automobile.In car statistics, the method for user's wave-wave value of the present invention.Thereby pass through the quantity of the judgement accounting automobile of the other side's wave-wave value.
Supposing has two automobiles on highway, and front and back are at a distance of 20 meters.First markings position probing goes out, and passes through without vehicle, and square wave wave number is made as 0; When first car is when the markings, markings judge to such an extent that appear at and just have an automobile to pass through by pixel, and establishing square wave wave number is 1; When automobile is by after markings, when markings position white point quantity is less than certain threshold value, the wave number of square wave is 0; First car later through must time interval second car by markings, be 1 through out-of-date square wave equally, by after be 0.According to the wave number of square wave above, draw as shown in square wave image (as Fig. 3).
Step S5, S7, vehicle count; As can be seen from Figure 3, when the wave number of square wave is from 0 during to 1 variation, thereby judgement now has vehicle to realize wagon flow quantitative statistics by markings.Through experiment, the statistics of vehicle that result has shown realization that the method is good.Experimental result is accurate.
Step S6, context update; The method that this embodiment has adopted background dynamics to upgrade adapts to time dependent background, obtaining after difference diagram, and be current frame image context update.
Step S8, judges whether frame of video finishes, and whether this process continues input for detection of video flowing, if do not log off, if any, enter S6 and upgrade background, then enter the image processing of next link.
The final effect of vehicle flowrate monitoring, as shown in Figure 4.

Claims (1)

1. the vehicle flowrate square wave statistic law based on video sequence, is characterized in that the method comprises the following steps:
Step S1, input road video information;
Step S2, for the road video information reading, reads the first two field picture frame as a setting, markings is all set in every track simultaneously, detects the vehicle flowrate in this track;
Step S3, carries out gray scale processing to video image, and image after processing is done to Difference Calculation, eliminates the external cause impact produced on recording of video image, then uses maximum variance between clusters to do two-value processing to difference image, thereby extracts moving target; Wherein:
Described gray scale processing is: suppose R, G, the B value of image point, and the brightness value of this point: Y=0.299 × R+0.587 × G+0.114 × B, then make: R=G=B=Y, the new images obtaining, is gray-scale map;
Described method of difference is calculated: be located at t 1and t 2the two width gray level image values in moment are f (x, y, t 1) and f (x, y, t 2), binaryzation difference diagram is: f chafen=f (x, y, t 1)-f (x, y, t 2);
Described two-value processing is:
Figure FDA0000456383390000011
wherein T dit is the threshold values that adopts maximum variance between clusters to obtain;
Step S4, after above-mentioned steps, enter square wave calculation stages;
First detect markings position, in the time passing through without vehicle, square wave wave number is made as 0; When car is when the markings, markings judge to such an extent that appear at and just have an automobile to pass through by pixel, and establishing square wave wave number is 1; When automobile is by after markings, when markings position white point quantity is less than setting threshold, the wave number of square wave is 0;
Step S5, vehicle are by judgement; When the wave number of square wave is from 0 during to 1 variation, judgement now has vehicle to pass through markings;
Step S6, context update; The method that has adopted background dynamics to upgrade adapts to time dependent background, obtaining after difference diagram, and be current frame image context update;
Step S7, vehicle count; Now there is vehicle to pass through markings when judging, upgrade when vehicle in front is by sum;
Step S8, judges whether frame of video finishes, and whether this process continues input for detection of video flowing; If do not have new frame of video to exit detection; Enter step S6 if having and upgrade background, then go to step S3.
CN201410014861.5A 2014-01-13 2014-01-13 A kind of vehicle flowrate square wave statistic law based on video sequence Active CN103778790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410014861.5A CN103778790B (en) 2014-01-13 2014-01-13 A kind of vehicle flowrate square wave statistic law based on video sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410014861.5A CN103778790B (en) 2014-01-13 2014-01-13 A kind of vehicle flowrate square wave statistic law based on video sequence

Publications (2)

Publication Number Publication Date
CN103778790A true CN103778790A (en) 2014-05-07
CN103778790B CN103778790B (en) 2015-08-12

Family

ID=50570974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410014861.5A Active CN103778790B (en) 2014-01-13 2014-01-13 A kind of vehicle flowrate square wave statistic law based on video sequence

Country Status (1)

Country Link
CN (1) CN103778790B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504913A (en) * 2014-12-25 2015-04-08 珠海高凌环境科技有限公司 Video traffic stream detection method and video traffic stream detection device
CN108648181A (en) * 2018-04-25 2018-10-12 佛山科学技术学院 A kind of automobile quantity statistics method and its system based on particle filter algorithm
CN110956824A (en) * 2019-12-12 2020-04-03 天地伟业技术有限公司 Event monitoring method based on video
CN111477004A (en) * 2020-04-17 2020-07-31 山东传媒职业学院 Intelligent analysis method and system for traffic flow
CN112232285A (en) * 2020-11-05 2021-01-15 浙江点辰航空科技有限公司 Unmanned aerial vehicle system that highway emergency driveway was patrolled and examined

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080152261A1 (en) * 2006-12-22 2008-06-26 Ricoh Company, Ltd. Image processing apparatus, image processing method, computer program, and information storage medium
CN102385803A (en) * 2011-10-28 2012-03-21 南京邮电大学 All-weather urban vehicle tracking and counting method based on video monitoring
CN102496284A (en) * 2011-12-24 2012-06-13 重庆大学 Method for acquiring and predicting road traffic flow
CN103413444A (en) * 2013-08-26 2013-11-27 深圳市川大智胜科技发展有限公司 Traffic flow surveying and handling method based on unmanned aerial vehicle high-definition video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080152261A1 (en) * 2006-12-22 2008-06-26 Ricoh Company, Ltd. Image processing apparatus, image processing method, computer program, and information storage medium
CN102385803A (en) * 2011-10-28 2012-03-21 南京邮电大学 All-weather urban vehicle tracking and counting method based on video monitoring
CN102496284A (en) * 2011-12-24 2012-06-13 重庆大学 Method for acquiring and predicting road traffic flow
CN103413444A (en) * 2013-08-26 2013-11-27 深圳市川大智胜科技发展有限公司 Traffic flow surveying and handling method based on unmanned aerial vehicle high-definition video

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104504913A (en) * 2014-12-25 2015-04-08 珠海高凌环境科技有限公司 Video traffic stream detection method and video traffic stream detection device
CN104504913B (en) * 2014-12-25 2017-03-15 珠海高凌信息科技有限公司 Video car flow detection method and device
CN108648181A (en) * 2018-04-25 2018-10-12 佛山科学技术学院 A kind of automobile quantity statistics method and its system based on particle filter algorithm
CN110956824A (en) * 2019-12-12 2020-04-03 天地伟业技术有限公司 Event monitoring method based on video
CN111477004A (en) * 2020-04-17 2020-07-31 山东传媒职业学院 Intelligent analysis method and system for traffic flow
CN112232285A (en) * 2020-11-05 2021-01-15 浙江点辰航空科技有限公司 Unmanned aerial vehicle system that highway emergency driveway was patrolled and examined

Also Published As

Publication number Publication date
CN103778790B (en) 2015-08-12

Similar Documents

Publication Publication Date Title
CN102722704B (en) Method and system for recognizing vehicle license plate by integrating video dynamic tracking
CN102765365B (en) Pedestrian detection method based on machine vision and pedestrian anti-collision warning system based on machine vision
CN109284674B (en) Method and device for determining lane line
CN108986465B (en) Method, system and terminal equipment for detecting traffic flow
KR101756849B1 (en) Parking control and management system for on-street parking lot
RU2698610C2 (en) Method and processing unit for control over traffic monitoring system
CN105336169B (en) A kind of method and system that traffic congestion is judged based on video
EP3026651B1 (en) Vehicle monitoring device and vehicle monitoring method
CN105185118B (en) A kind of vehicles peccancy detection means and its method based on video detection
CN108615358A (en) A kind of congestion in road detection method and device
CN106373426A (en) Computer vision-based parking space and illegal lane occupying parking monitoring method
CN103778790B (en) A kind of vehicle flowrate square wave statistic law based on video sequence
CN107301776A (en) Track road conditions processing and dissemination method based on video detection technology
Li et al. Nighttime lane markings recognition based on Canny detection and Hough transform
CN103824452A (en) Lightweight peccancy parking detection device based on full view vision
CN104616502A (en) License plate identification and positioning system based on combined type vehicle-road video network
JP6139088B2 (en) Vehicle detection device
CN103413439B (en) A kind of passenger vehicle based on video and lorry sorting technique
CN101615342B (en) Vehicle detection method
CN111915883A (en) Road traffic condition detection method based on vehicle-mounted camera shooting
JP2012160165A (en) Baseline band video monitoring system and method
CN104794906A (en) Vehicle management platform of outdoor parking lot exit
CN109359596A (en) A kind of highway vehicle localization method fast and accurately
CN107358236A (en) A kind of number-plate number identifying system and method based on camera device
CN103021179A (en) Real-time monitoring video based safety belt detection method

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
TR01 Transfer of patent right

Effective date of registration: 20210806

Address after: 303 Wenhui Road, Hangzhou, Zhejiang 310000

Patentee after: ZHEJIANG HIGHWAY INFORMATION ENGINEERING TECHNOLOGY Co.,Ltd.

Address before: 310018 No. 2 street, Xiasha Higher Education Zone, Hangzhou, Zhejiang

Patentee before: HANGZHOU DIANZI University

TR01 Transfer of patent right
CP01 Change in the name or title of a patent holder

Address after: 303 Wenhui Road, Hangzhou, Zhejiang 310000

Patentee after: Zhejiang Gaoxin Technology Co.,Ltd.

Address before: 303 Wenhui Road, Hangzhou, Zhejiang 310000

Patentee before: ZHEJIANG HIGHWAY INFORMATION ENGINEERING TECHNOLOGY CO.,LTD.

CP01 Change in the name or title of a patent holder