CN111477004A - Intelligent analysis method and system for traffic flow - Google Patents

Intelligent analysis method and system for traffic flow Download PDF

Info

Publication number
CN111477004A
CN111477004A CN202010307733.5A CN202010307733A CN111477004A CN 111477004 A CN111477004 A CN 111477004A CN 202010307733 A CN202010307733 A CN 202010307733A CN 111477004 A CN111477004 A CN 111477004A
Authority
CN
China
Prior art keywords
picture
identification area
traffic flow
analysis method
intelligent analysis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010307733.5A
Other languages
Chinese (zh)
Inventor
罗东华
董善志
鲁娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Media Vocational College
Original Assignee
Shandong Media Vocational College
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 Shandong Media Vocational College filed Critical Shandong Media Vocational College
Priority to CN202010307733.5A priority Critical patent/CN111477004A/en
Publication of CN111477004A publication Critical patent/CN111477004A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/0104Measuring and analyzing of parameters relative to traffic conditions
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/065Traffic control systems for road vehicles by counting the vehicles in a section of the road or in a parking area, i.e. comparing incoming count with outgoing count

Abstract

The invention discloses an intelligent traffic flow analysis method, which comprises the following steps of S1, acquiring a traffic flow video; s2, intercepting pictures of the traffic flow video according to a set time interval; s3, processing the pictures one by one according to the time sequence, comparing the processed picture with the previous processed picture, and accumulating the number of vehicles according to the comparison result; s4, obtaining the increment of the number of vehicles in a certain time length, and calculating the traffic flow in the time length according to the time length and the increment. The invention can be used for conveniently and simply and quickly counting the traffic flow.

Description

Intelligent analysis method and system for traffic flow
Technical Field
The invention relates to the technical field of traffic, in particular to a traffic flow intelligent analysis method and a traffic flow intelligent analysis system.
Background
To obtain the traffic condition, it is usually necessary to obtain the traffic flow of each road.
In the prior art, a sensor coil is usually embedded below a road for acquiring the traffic flow, and when a vehicle passes through the road, the sensor coil generates a current signal, so that the traffic flow is counted. Once malfunctioning, it is difficult to repair and replace. Certainly, in the prior art, the traffic flow is counted by using the camera, and the counting method relies on an accurate image recognition technology and has higher requirements on the technology and hardware. Is not suitable for wide application.
Disclosure of Invention
The invention aims to provide an intelligent traffic flow analysis method, which can be used for solving the defects in the prior art and conveniently and quickly counting the traffic flow.
The invention provides an intelligent analysis method for traffic flow, which comprises the following steps,
S1, acquiring a traffic flow video;
S2, intercepting pictures of the traffic flow video according to a set time interval;
S3, processing the pictures one by one according to the time sequence, comparing the processed picture with the previous processed picture, and accumulating the number of vehicles according to the comparison result;
S4, obtaining the increment of the number of vehicles in a certain time length, and calculating the traffic flow in the time length according to the time length and the increment.
The method for intelligently analyzing the traffic flow as described above, wherein optionally, in step S2, the time interval is not greater than 0.5S.
The method for intelligently analyzing traffic flow as described above, wherein optionally, step S1 further includes obtaining a background picture, where the background picture is a picture of a vehicle without a vehicle;
The background picture and the intercepted pictures are RBG three-color pictures.
The method for intelligently analyzing the traffic flow as described above, wherein optionally, the step S3 includes the following steps:
S31, preprocessing the intercepted picture;
S32, sequentially deleting pixels of the picture and planning an identification area in the picture;
S33, acquiring a similar identification area of the pixels in the identification area;
And S34, judging whether the identification area meets the accumulation condition, and if so, accumulating the number of vehicles.
The method for intelligently analyzing traffic flow as described above, wherein optionally, in step S31, the preprocessing the picture includes:
Cutting each picture to form a first intermediate picture, wherein the cutting areas of the pictures are the same; an area of the first intermediate picture includes lanes to be measured.
The intelligent analysis method for vehicle flow rate as described above, wherein, optionally, the step S32 includes,
S321, cutting the background image, wherein the cutting area of the background image is the same as the cutting area of the picture;
S322, sequentially obtaining each pixel on the cut background image and each pixel of the first intermediate image;
S323, subtracting each pixel on the corresponding background image from each pixel on the first intermediate image to obtain a second intermediate image; and planning an identification area on the second middle picture, wherein the planned identification area spans each lane to be measured.
The intelligent analysis method for the traffic flow as described above, wherein, optionally, the step S33 includes the following specific steps,
S331, carrying out gray level processing on the second intermediate picture;
S332, acquiring each identification area in the identification area according to the gray value.
The intelligent analysis method for traffic flow as described above, wherein, optionally, the condition for judging whether the identification area meets the accumulation is,
a, the area of the identification area is larger than a set value; and is
And b, as for the lane corresponding to the identification area, the condition that the rear end of the identification area is superposed with the rear edge of the identification area does not exist in the previous picture.
The method for intelligently analyzing the traffic flow as described above, wherein optionally, the length of the identification area corresponds to an actual length not greater than 5 meters.
The invention also provides an intelligent traffic flow analysis system, which comprises a camera for acquiring the traffic flow video, wherein the camera is used for being fixed above the road;
A processor connected to the camera, the processor configured to perform the method of any of the above;
The memory is connected with the processor and is used for storing the traffic flow video.
Compared with the prior art, the traffic flow is analyzed by using the video, so that the method can be realized by using the existing camera arranged on the road without additionally adding equipment.
Drawings
FIG. 1 is a flow chart illustrating the steps of an intelligent traffic flow analysis method according to the present invention;
Fig. 2 is a flowchart showing the detailed steps of step S3;
Fig. 3 is a flowchart showing the detailed steps of step S32;
Fig. 4 is a flowchart showing the detailed steps of step S33;
FIG. 5 is a schematic illustration of a second intermediate picture after a grey scale process;
Fig. 6 is a block diagram of a traffic flow intelligent analysis system according to the present invention.
Detailed Description
The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
Example 1
Referring to fig. 1 to 5, the present embodiment provides an intelligent traffic flow analysis method, which includes the following steps,
S1, acquiring a traffic flow video; the traffic video referred to herein is a vehicle driving video taken at a road, for example, a video taken by fixing a camera to a stand above the road. In specific implementation, the method further comprises the steps of obtaining a background picture, wherein the background picture is a picture in the absence of a vehicle; the background picture and the intercepted pictures are RBG three-color pictures.
S2, intercepting pictures of the traffic flow video according to a set time interval; specifically, the time interval calculation formula of the captured picture is as follows:
Figure BDA0002456374500000031
Wherein T is the maximum time interval, and V is the maximum allowable speed of the road; and S is the corresponding actual length of the identification area in the lane direction. The maximum speed limit is 72km/h, the corresponding actual length of the identification area in the lane direction is 2m, and the maximum time interval is 0.1s by substituting the formula. That is, under the above conditions, the time interval for capturing pictures should not exceed 0.1S at maximum. In other cases, the calculation should be done according to the above formula. In a normal situation, the actual length of the recognition area in the lane direction is not as large as possible, and is not as small as possible, and in a normal situation, the time interval should be limited to be less than 0.5s, and the time interval is too small, which leads to a complicated algorithm processing process, and the pressure on the device is too large, thereby reducing the requirement on hardware. When the traffic flow video is intercepted, the intercepted picture is an RGB (red, green and blue) tricolor map.
S3, processing the pictures one by one according to the time sequence, comparing the processed picture with the previous processed picture, and accumulating the number of vehicles according to the comparison result; when the first picture is processed, the number of vehicles is accumulated from 0. Of course, the first picture referred to herein may be the first picture of a certain time period, at the beginning of which the number of vehicles is cleared. In a specific implementation, the vehicle number may be cleared when the vehicle number reaches a set value.
Specifically, referring to fig. 2, step S3 includes the following steps:
S31, preprocessing the intercepted picture; specifically, the preprocessing the picture includes:
Cutting each picture to form a first intermediate picture, wherein the cutting areas of the pictures are the same; an area of the first intermediate picture includes lanes to be measured. Through the pretreatment, on one hand, the workload of subsequent treatment can be reduced; on the other hand, the influence of interference information can be eliminated, especially the influence of the image of the oncoming vehicle on the calculation can be eliminated, and the accuracy of statistics can be ensured.
S32, sequentially deleting pixels of the picture and planning an identification area in the picture; in a specific implementation, the identification area spans each lane to be measured. Specifically, referring to fig. 3, step S32 includes,
S321, cutting the background image, wherein the cutting area of the background image is the same as the cutting area of the picture; because the background picture and the traffic flow video are both pictures shot by the same camera when fixed at the same position. When the cutting areas are the same, the actual areas corresponding to the rest areas are the same.
S322, sequentially obtaining each pixel on the cut background image and each pixel of the first intermediate image; the pixels referred to herein are the values of the RBG tristimulus map. S323, subtracting each pixel on the corresponding background image from each pixel on the first intermediate image to obtain a second intermediate image; and planning an identification area on the second middle picture, wherein the planned identification area spans each lane to be measured. By pruning, the background in the second intermediate picture can be removed, so that the RGB value at the background is (0, 0, 0); for the vehicle on the lane, the RGB value is not (0, 0, 0) due to the color difference with the lane; in this way, vehicles in the identification area can be distinguished conveniently. In the process of pruning, since the result may be a negative value, when calculating the corresponding RGB value, if the value is negative, it is taken as an absolute value. That is, if the value of RGB should be (-5, -20, -30) after the subtraction, the RGB value is modified to (5, 20, 30). This modification is done, on the one hand, to make the respective values of RGB between 0 and 255, and, on the other hand, to highlight the differences in the modified RGB values corresponding to the background for counting.
S33, a similar discriminating region of the pixels within the discriminating region is obtained. Specifically, the discrimination area refers to an area where the pixels are not 0 and the pixel values are close to each other. At this step, the pixel is 0, i.e. the background part in the picture, and the part where the pixel is not 0, i.e. the vehicle or pedestrian walking on the road.
In specific implementation, referring to fig. 4, step S33 includes the following specific steps,
S331, carrying out gray level processing on the second intermediate picture; that is, the RGB values at each pixel in the second intermediate picture are converted into grayscale values. Specifically, a pixel with a certain RGB value (x, y, z) is converted into an example, and the formula is as follows:
Figure BDA0002456374500000051
Wherein Gray is the converted Gray value.
In the specific application process, since the RGB tristimulus values of the identification area are small after the deletion, if the average value is directly used for calculating the gray value, the obtained gray value is too small to be easily distinguished from the value of the background, and the obtained gray value is not easy to distinguish from the value of the background
Figure BDA0002456374500000052
This makes it possible to increase the gradation value to some extent after conversion, compared with calculation by the average value, without exceeding the maximum limit value of the gradation. Therefore, the algorithm for converting the three RGB colors into the gray values is more suitable for the case where the three RGB values are smaller in the present invention, so as to highlight the corresponding region of the vehicle.
S332, acquiring each identification area in the identification area according to the gray value. Specifically, when the gray values of all the regions are greater than 0, and the peripheries of all the regions are the edges of which the gray values are basically 0 or close to the identification region; then that area is the authentication zone.
And S34, judging whether the identification area meets the accumulation condition, and if so, accumulating the number of vehicles. In specific implementation, the condition of judging whether the identification area meets the accumulation is that the following conditions are met:
a, the area of the identification area is larger than a set value; through the screening to the area in the differentiation district, can effectively screen out electric motor car, pedestrian and image processing in-process error etc to can carry out accurate statistics to the traffic flow.
And b, as for the lane corresponding to the identification area, the condition that the rear end of the identification area is superposed with the rear edge of the identification area does not exist in the previous picture. In this way, duplicate statistics for the same vehicle can be reduced. In specific implementation, the length of the identification area corresponds to an actual length not greater than 5 m. Preferably, the length of the identification area may be any value from 1.5 to 5 meters. Such as, among others, 2 meters, 2.3 meters, 2.7 meters, 3 meters, 3.3 meters, 3.7 meters, 4 meters, 4.3 meters, or 4.7 meters.
S4, obtaining the increment of the number of vehicles in a certain time length, and calculating the traffic flow in the time length according to the time length and the increment.
Example 2
Referring to fig. 6, the invention further provides an intelligent traffic flow analysis system, which includes a camera for acquiring a traffic flow video, wherein the camera is used for being fixed above a road.
A processor coupled to the camera, the processor configured to perform the method of embodiment 1.
The memory is connected with the processor and is used for storing the traffic flow video.
When the system is specifically implemented, the traffic flow can be counted conveniently. Specifically, image processing and calculation can be directly performed on the existing road monitoring system, so that a sensor coil does not need to be laid below the road surface for counting the traffic flow, and the road monitoring system is more convenient to use and maintain. Because the existing road monitoring system can be directly utilized for modification, the installation process is simple and convenient.
The construction, features and functions of the present invention are described in detail in the embodiments illustrated in the drawings, which are only preferred embodiments of the present invention, but the present invention is not limited by the drawings, and all equivalent embodiments modified or changed according to the idea of the present invention should fall within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.

Claims (10)

1. An intelligent analysis method for traffic flow is characterized in that: comprises the following steps of (a) carrying out,
S1, acquiring a traffic flow video;
S2, intercepting pictures of the traffic flow video according to a set time interval;
S3, processing the pictures one by one according to the time sequence, comparing the processed picture with the previous processed picture, and accumulating the number of vehicles according to the comparison result;
S4, obtaining the increment of the number of vehicles in a certain time length, and calculating the traffic flow in the time length according to the time length and the increment.
2. The intelligent analysis method of the vehicle flow according to claim 1, characterized in that: in step S2, the time interval is not greater than 0.5S.
3. The intelligent analysis method of the vehicle flow according to claim 1, characterized in that: step S1 further comprises the steps of obtaining a background picture, wherein the background picture is a picture in the absence of a vehicle;
The background picture and the intercepted pictures are RBG three-color pictures.
4. The intelligent analysis method of the vehicle flow according to claim 3, characterized in that: step S3 includes the following steps:
S31, preprocessing the intercepted picture;
S32, sequentially deleting pixels of the picture and planning an identification area in the picture;
S33, acquiring a similar identification area of the pixels in the identification area;
And S34, judging whether the identification area meets the accumulation condition, and if so, accumulating the number of vehicles.
5. The intelligent analysis method of the vehicle flow according to claim 4, characterized in that: in step S31, the preprocessing the picture includes:
Cutting each picture to form a first intermediate picture, wherein the cutting areas of the pictures are the same; an area of the first intermediate picture includes lanes to be measured.
6. The intelligent analysis method of the vehicle flow according to claim 5, characterized in that: the step S32 includes the steps of,
S321, cutting the background image, wherein the cutting area of the background image is the same as the cutting area of the picture;
S322, sequentially obtaining each pixel on the cut background image and each pixel of the first intermediate image;
S323, subtracting each pixel on the corresponding background image from each pixel on the first intermediate image to obtain a second intermediate image; and planning an identification area on the second middle picture, wherein the planned identification area spans each lane to be measured.
7. The intelligent analysis method of the vehicle flow according to claim 6, characterized in that: step S33 includes the following specific steps,
S331, carrying out gray level processing on the second intermediate picture;
S332, acquiring each identification area in the identification area according to the gray value.
8. The intelligent analysis method of the vehicle flow according to claim 7, characterized in that: the condition of judging whether the identification area meets the accumulation is,
a, the area of the identification area is larger than a set value; and is
And b, as for the lane corresponding to the identification area, the condition that the rear end of the identification area is superposed with the rear edge of the identification area does not exist in the previous picture.
9. The intelligent analysis method of the vehicle flow according to any one of claims 4 to 8, characterized in that: the length of the identification area corresponds to the actual length not more than 5 meters.
10. The utility model provides a traffic flow intelligent analysis system which characterized in that: the system comprises a camera for acquiring a traffic flow video, wherein the camera is used for being fixed above a road;
A processor coupled to the camera, the processor configured to perform the method of any of claims 1-9;
The memory is connected with the processor and is used for storing the traffic flow video.
CN202010307733.5A 2020-04-17 2020-04-17 Intelligent analysis method and system for traffic flow Pending CN111477004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010307733.5A CN111477004A (en) 2020-04-17 2020-04-17 Intelligent analysis method and system for traffic flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010307733.5A CN111477004A (en) 2020-04-17 2020-04-17 Intelligent analysis method and system for traffic flow

Publications (1)

Publication Number Publication Date
CN111477004A true CN111477004A (en) 2020-07-31

Family

ID=71754014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010307733.5A Pending CN111477004A (en) 2020-04-17 2020-04-17 Intelligent analysis method and system for traffic flow

Country Status (1)

Country Link
CN (1) CN111477004A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587646A (en) * 2008-05-21 2009-11-25 上海新联纬讯科技发展有限公司 Method and system of traffic flow detection based on video identification technology
US20100079306A1 (en) * 2008-09-26 2010-04-01 Regents Of The University Of Minnesota Traffic flow monitoring for intersections with signal controls
CN103208190A (en) * 2013-03-29 2013-07-17 西南交通大学 Traffic flow detection method based on object detection
CN103778790A (en) * 2014-01-13 2014-05-07 杭州电子科技大学 Traffic flow square-wave statistical method based on video sequence
CN108986465A (en) * 2018-07-27 2018-12-11 深圳大学 A kind of method of vehicle Flow Detection, system and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587646A (en) * 2008-05-21 2009-11-25 上海新联纬讯科技发展有限公司 Method and system of traffic flow detection based on video identification technology
US20100079306A1 (en) * 2008-09-26 2010-04-01 Regents Of The University Of Minnesota Traffic flow monitoring for intersections with signal controls
CN103208190A (en) * 2013-03-29 2013-07-17 西南交通大学 Traffic flow detection method based on object detection
CN103778790A (en) * 2014-01-13 2014-05-07 杭州电子科技大学 Traffic flow square-wave statistical method based on video sequence
CN108986465A (en) * 2018-07-27 2018-12-11 深圳大学 A kind of method of vehicle Flow Detection, system and terminal device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李晶: "基于视频的车流量统计系统研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
林鑫: "基于视频的车流量检测系统研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 *

Similar Documents

Publication Publication Date Title
CN110322522B (en) Vehicle color recognition method based on target recognition area interception
CN109635758B (en) Intelligent building site video-based safety belt wearing detection method for aerial work personnel
US9811746B2 (en) Method and system for detecting traffic lights
CN109218695A (en) Video image enhancing method, device, analysis system and storage medium
CN113887412B (en) Detection method, detection terminal, monitoring system and storage medium for pollution emission
CN103235938A (en) Method and system for detecting and identifying license plate
CN112149543B (en) Building dust recognition system and method based on computer vision
CN103093458B (en) The detection method of key frame and device
US20130021496A1 (en) Method and system for facilitating color balance synchronization between a plurality of video cameras and for obtaining object tracking between two or more video cameras
JP2002074368A (en) Moving object recognizing and tracking device
CN107248296B (en) Video traffic flow statistical method based on unmanned aerial vehicle and time sequence characteristics
CN106339657A (en) Straw incineration monitoring method and device based on monitoring video
CN106127124A (en) The automatic testing method of the abnormal image signal in region, taxi front row
CN102088539A (en) Method and system for evaluating pre-shot picture quality
CN114511519A (en) Train bottom bolt loss detection method based on image processing
KR101026778B1 (en) Vehicle image detection apparatus
CN114708532A (en) Monitoring video quality evaluation method, system and storage medium
CN113873229B (en) Image dead pixel detection method, system and device
CN102999994A (en) Flame detection device based on video image analysis
CN102280028B (en) Vehicle monitoring method based on dynamic background analysis and monitoring tape scanning
CN111477004A (en) Intelligent analysis method and system for traffic flow
CN108346313B (en) Empty parking space detection method and system
CN110688979A (en) Illegal vehicle tracking method and device
CN110969135A (en) Vehicle logo recognition method in natural scene
JP6126849B2 (en) Lane identification device and lane identification method

Legal Events

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

Application publication date: 20200731

RJ01 Rejection of invention patent application after publication