CN103778790B - A kind of vehicle flowrate square wave statistic law based on video sequence - Google Patents

A kind of vehicle flowrate square wave statistic law based on video sequence Download PDF

Info

Publication number
CN103778790B
CN103778790B CN201410014861.5A CN201410014861A CN103778790B CN 103778790 B CN103778790 B CN 103778790B CN 201410014861 A CN201410014861 A CN 201410014861A CN 103778790 B CN103778790 B CN 103778790B
Authority
CN
China
Prior art keywords
markings
image
vehicle
square wave
automobile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410014861.5A
Other languages
Chinese (zh)
Other versions
CN103778790A (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

Abstract

The present invention relates to a kind of vehicle flowrate square wave statistic law based on video sequence.The image that the present invention uses CCD camera lens and image pick-up card acquisition highway automobile to run over, passes to video file is transformed into BMP form by computing machine frame picture by switching software by information, and according to naming by form.Then Digital Image Processing is carried out to every two field picture, comprise the image gathered is carried out that gray proces, frame are poor, binaryzation etc., its object is mainly extracted in the Moving Objects in background.Next markings region is set, namely the region that automobile passes through is detected, at this region user's wave detecting method, bianry image is analyzed, judge whether that car passes through according to the number of the white pixel in detection line, when the quantity of white pixel point is at a time greater than a certain threshold value, then judge have automobile to pass through, thus carry out the counting of vehicle.The error that the present invention can effectively avoid DE Camera Shake to cause, improves measuring accuracy.

Description

A kind of vehicle flowrate square wave statistic law based on video sequence
Technical field
The invention belongs to the image procossing in technical field of intelligent traffic management and area of pattern recognition, be specifically related to a kind ofly extract video frequency motion target based on difference and binaryzation co-treatment and based on the vehicle flowrate square wave statistic law arranging markings.
Background technology
Traffic jam has become the quite serious problem of modern society one.In the past in more than ten years, how the notice of people carries out in effective and reasonable traffic administration if being placed on.Intelligent transportation system (ITS) is considered to solve unique way that traffic above-ground is blocked, the research that a lot of bibliographical information is relevant.
As the basis of ITS, traffic control system (ATMS), it relies on advanced Traffic monitoring technology, Computerized Information Processing Tech and the communication technology, the traffic operation of urban road and interurban highway integrated network and facility are carried out to the control and management of integration, by monitoring that vehicle operating controls the flow of traffic, process the various events of local generation rapidly and accurately, 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 studies one of main flow because its powerful true reflection ability has become.
At present, the traffic information acquisition system of view-based access control model is reasonable is use entropy as the detection method of characteristic parameter.But the shortcoming of the method is too sensitive to DE Camera Shake, may causes like this and the mistake of vehicle is surveyed, thus affect the degree of accuracy of detection limit.Viarani proposes a method being referred to as " virtual inductance loop " to extract 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, provide a kind of vehicle flowrate square wave detection method based on video sequence, the method extracts the square wave statistic law realization of video frequency motion target and markings setting based on difference and binaryzation co-treatment.
The technical solution adopted in the present invention is: use the image that CCD camera lens and image pick-up card acquisition highway automobile run over, information is passed to video file is transformed into BMP form by computing machine frame picture by switching software, and according to naming by form.Then Digital Image Processing is carried out to every two field picture, comprise the image gathered is carried out that gray proces, frame are poor, binaryzation etc., its object is mainly extracted in the Moving Objects in background.Next markings region is set, namely the region that automobile passes through is detected, at this region user's wave detecting method, bianry image is analyzed, judge whether that car passes through according to the number of the white pixel in detection line, when the quantity of white pixel point is at a time greater than a certain threshold value, then judge have automobile to pass through, thus carry out the counting of vehicle.
The invention has the beneficial effects as follows, provide a kind of more weak to DE Camera Shake susceptibility, thus 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 accompanying drawing 1 is described, core process of the present invention is: first inputted video image, then the parameter on markings and each markings is set according to road concrete condition, when arranging the position of markings system using the image on current flag line and monitored area as initial background image, so can only set when markings do not have vehicle.After completing above-mentioned parameter initialization, system just can carry out vehicle detection, first needs to carry out pre-service to image during vehicle detection, and pre-treatment step comprises gray processing process, background subtraction calculates, binaryzation; Carry out square wave calculating again after Image semantic classification, finally carry out vehicle count and context update step.
With reference to accompanying drawing 2 is described, below each step is described in detail:
Step S1, enter video information.
Step S2, for the road video information read, reads the first two field picture frame as a setting, provides reference for subsequent parameter is arranged.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 have selected the method that multilane arranges mark line.Namely every track all arranges markings, detects the vehicle flowrate in this track, then the flow number in all tracks is added, can draws the vehicle flowrate of this highway in certain period.In order to the highway of the shooting and different track that adapt to different angles, 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, thus make car statistics more accurate.
Step S3, gray proces is carried out to video image, and image after process is done Difference Calculation, eliminate the impact because the recordings of external cause on video image such as illumination, weather, brightness, camera shooting shake produce, then OTSU(maximum variance between clusters is used) method does two-value process to difference image, thus extracts moving target.Wherein:
Gray processing process:
Suppose R, G, B value of image point, then the brightness value of this point:
Y=0.299×R+0.587×G+0.114×B;
Making: R=G=B=Y, the new images obtained, is gray-scale map again.
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), then binaryzation difference diagram is: f chafen=f (x, y, t 1)-f (x, y, t 2).
Binaryzation: wherein T dit is the threshold values adopting maximum variance between clusters to obtain.
Step S4, enters square wave calculation stages.
1) in markings, automobile extracts
After a certain position in track arranges markings, if having car through this track, must travel this markings.After two-value process, the position of moving target can show with white pixel point clearly in bianry image, and background is then shown as black.Therefore, when moving target is without markings, the pixel of markings position is black; When having moving target by markings, the pixel in a certain region of markings can change, and become white by black before, until moving target leaves markings, markings region becomes black again.
During the non-enter sign line of automobile, each pixel of markings position is black.
During the firm enter sign line of automobile, markings position partial pixel point starts to change, and one part of pixel point becomes white from black.
During body of a motor car enter sign line, 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 of automobile enter sign line position above, be not difficult to find out, when automobile is by markings, the pixel of markings position is a process continuing change.Therefore, as long as the quantity of judgement symbol line position white point is when becoming 0 from a certain value, illustrated that a car have passed markings, thus 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, then the headstock of a car enter sign line time, if according to thought before, run into this situation two cars and can only remember into one.Although so method before can the automobile of judgement symbol line position, accurately can not judge thus accurately can not extract automobile, so that the statistics of automobile is had an impact afterwards.
For above-mentioned situation, present invention employs the method that threshold value is set.Namely, when 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, then the headstock of a car enter sign line time, the pixel of white point is far smaller than the white point number of vehicle body in markings region, as long as the threshold value arranged is greater than pixel when automobile joins end to end, judge that the quantity of automobile is feasible so accurately.What therefore use that this method can be good solves the above problems.
That is: markings white point pixel is less than threshold value, then pass through without automobile.
Except the problem that vehicle head tail connects, the length of automobile, width, imaging highly, when color all have impact on binaryzation when image binaryzation.The long meeting of automobile causes the bianry image imaging of automobile to produce breakpoint, and vehicle color causes binaryzation white point quantity very few close to the color on road surface, once be less than the threshold value of setting, cannot judge.Said above, when automobile is by markings, markings position continues to occur white point, if we judge when the quantity of white point is greater than a certain value as just there being a car to pass through, when a car continues through, white point quantity is only greater than this threshold value, no matter is that white point is on the low side, and still having breakpoint to judge is same car.Thus the automobile extracted accurately in markings.
That is: markings white point pixel is greater than threshold value, then just having an automobile to pass through.
In conjunction with the two kinds of problems talked about, by the assignment test respectively of two threshold values, find the best results when the value of two threshold values is equal above.In order to adapt to various highway, the shooting of different angles, different light rays, the present invention with the addition of the function of amendment threshold value, even if scene changes, also by the adjustment 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.Namely by the judgement of the other side's wave-wave value thus the quantity of accounting automobile.
Suppose that highway has two automobiles, front and back are at a distance of 20 meters.First markings position detects, passes through without vehicle, and square wave wave number is set to 0; When first car is by markings, markings judge appear at and just have an automobile to pass through by pixel, then set square wave wave number as 1; When automobile is by after markings, when namely markings position white point quantity is less than certain threshold value, the wave number of square wave is 0; After first car through must time interval second car by markings, equally through out-of-date square wave be 1, by after be 0.According to the wave number of square wave above, draw 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 to 1 change, judge now have vehicle by markings thus realize wagon flow quantitative statistics.Through experiment, result shows the statistics achieving vehicle that the method is good.Experimental result is accurate.
Step S6, context update; This embodiment have employed the method for background dynamics renewal to adapt to time dependent background, namely after obtaining difference diagram, is current frame image context update.
Step S8, judges whether frame of video terminates, and whether this process continues input for detecting video flowing, if not, logs off, if any, then enter S6 and upgrade background, then enter the image procossing of next link.
The final effect of vehicle flowrate monitoring, as shown in Figure 4.

Claims (1)

1., based on a vehicle flowrate square wave statistic law for video sequence, it is characterized in that the method comprises the following steps:
Step S1, input road video information;
Step S2, for the road video information read, reads the first two field picture frame as a setting, all arranges markings simultaneously, detect the vehicle flowrate in this track in every track;
Step S3, carries out gray proces to video image, and image after process is done Difference Calculation, eliminates the impact that the recording of external cause on video image produces, and then uses maximum variance between clusters to do two-value process to difference image, thus extracts moving target; Wherein:
Described gray proces is: R, G, B value supposing image point, the then brightness value of this point: Y=0.299 × R+0.587 × G+0.114 × B, then makes: R=G=B=Y, and the new images obtained is gray-scale map;
Described method of difference calculates: 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), then binaryzation difference diagram is: f chafen=f (x, y, t 1)-f (x, y, t 2);
Described two-value process is: wherein T dit is the threshold values adopting maximum variance between clusters to obtain;
Step S4, after above-mentioned steps, namely enters square wave calculation stages:
First detect markings position, when passing through without vehicle, square wave wave number is set to 0; When car is by markings, markings white point pixel is greater than threshold value, and markings judge appear at and just have an automobile to pass through by pixel, then set square wave wave number as 1; When automobile is by after markings, when namely markings position white point quantity is less than setting threshold value, the wave number of square wave is 0;
Step S5, vehicle is by judging: when the wave number of square wave is from 0 to 1 change, judge now have vehicle to pass through markings;
Step S6, context update: the method that have employed background dynamics renewal, to adapt to time dependent background, namely after obtaining difference diagram, is current frame image context update;
Step S7, vehicle count: when judging now there is vehicle by markings, then upgrade Current vehicle by sum;
Step S8, judges whether frame of video terminates, and whether this process continues input for detecting video flowing; If there is no new frame of video, exit detection; If have, enter step S6 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 CN103778790A (en) 2014-05-07
CN103778790B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

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

Also Published As

Publication number Publication date
CN103778790A (en) 2014-05-07

Similar Documents

Publication Publication Date Title
CN102722704B (en) Method and system for recognizing vehicle license plate by integrating video dynamic tracking
CN103279756B (en) Vehicle detection based on integrated classifier analyzes system and determination method thereof
CN104537841B (en) Unlicensed vehicle violation detection method and detection system thereof
CN102810250B (en) Video based multi-vehicle traffic information detection method
CN104751634B (en) The integrated application method of freeway tunnel driving image acquisition information
CN100468443C (en) Method for accurately recognizing high speed mobile vehicle mark based on video
CN103778790B (en) A kind of vehicle flowrate square wave statistic law based on video sequence
Hung et al. A real-time mobile vehicle license plate detection and recognition
CN105336169B (en) A kind of method and system that traffic congestion is judged based on video
CN105185118B (en) A kind of vehicles peccancy detection means and its method based on video detection
CN109949579A (en) A kind of illegal automatic auditing method that makes a dash across the red light based on deep learning
CN107301776A (en) Track road conditions processing and dissemination method based on video detection technology
CN205486314U (en) License plate discernment parking area management equipment
CN103077617A (en) Pedestrian crosswalk intelligent traffic light monitoring system and method based on computer vision
CN103871079A (en) Vehicle tracking method based on machine learning and optical flow
CN103971097A (en) Vehicle license plate recognition method and system based on multiscale stroke models
CN108269407B (en) Security robot capable of automatically managing people stream and logistics
CN107491720A (en) A kind of model recognizing method based on modified convolutional neural networks
Pan et al. Traffic surveillance system for vehicle flow detection
CN105740855A (en) Front and rear license plate detection and recognition method based on deep learning
CN102496281A (en) Vehicle red-light violation detection method based on combination of tracking and virtual loop
CN104794906A (en) Vehicle management platform of outdoor parking lot exit
CN106205135A (en) A kind of detection method of vehicle behavior that turns around violating the regulations, Apparatus and system and a kind of ball machine
CN114049306A (en) Traffic anomaly detection system design based on image camera and high-performance display card
CN105389991A (en) Self-adaptive snapshot method for behavior of running red light

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