CN109377770B - Method and device for counting traffic flow, computing equipment and storage medium - Google Patents

Method and device for counting traffic flow, computing equipment and storage medium Download PDF

Info

Publication number
CN109377770B
CN109377770B CN201811031635.2A CN201811031635A CN109377770B CN 109377770 B CN109377770 B CN 109377770B CN 201811031635 A CN201811031635 A CN 201811031635A CN 109377770 B CN109377770 B CN 109377770B
Authority
CN
China
Prior art keywords
video
traffic flow
vehicle
video stream
video frame
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
CN201811031635.2A
Other languages
Chinese (zh)
Other versions
CN109377770A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201811031635.2A priority Critical patent/CN109377770B/en
Publication of CN109377770A publication Critical patent/CN109377770A/en
Priority to PCT/CN2019/087229 priority patent/WO2020048156A1/en
Application granted granted Critical
Publication of CN109377770B publication Critical patent/CN109377770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a method and a device for counting traffic flow and computing equipment. In the method, a computing device acquires a video stream of a monitored traffic flow; the video stream includes a plurality of video frames, the computing device identifying vehicles in each video frame from the video stream; the computing equipment computes the traffic flow monitored by the video stream according to the vehicles in each video frame in the video stream and the traffic flow direction according to the time sequence. Therefore, the traffic flow on the road can be monitored in a video streaming mode.

Description

Method and device for counting traffic flow, computing equipment and storage medium
Technical Field
The present application relates to the field of video, and in particular, to a method and apparatus for counting traffic flow, a computing device, and a computer-readable storage medium.
Background
Vehicles have become common vehicles for people to travel. With the popularity of vehicles, roads (e.g., urban traffic) are often congested, so traffic flow needs to be monitored. The current monitoring mode is to monitor the passing vehicle by radar signals or by gravity sensors.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for counting traffic flow, and a computing device, which can monitor the traffic flow through a video stream.
In a first aspect, the present application provides a method for traffic flow statistics. The method comprises the steps that a computing device obtains a video stream of monitoring traffic flow; for example, the video stream may be a video stream generated by a capture device monitoring traffic flow on a road, the computing device obtaining the video stream from the capture device.
The video stream includes a plurality of video frames. The computing device identifies vehicles in each video frame from the video stream.
The computing equipment computes the traffic flow monitored by the video stream according to the vehicles in each video frame in the video stream and the traffic flow direction according to the time sequence.
Therefore, the traffic flow on the road can be monitored in a video streaming mode.
In one possible design of the first aspect, the computing device may calculate the traffic flow in the following manner.
In this approach, the computing device sets a reference line at the same position in each video frame in the video stream, the reference line being perpendicular to the traffic direction. In this way, the computing device may count vehicles passing the reference line.
Specifically, the computing device identifies the number of vehicles passing through the reference line from the video stream in chronological order and traffic direction. The number of vehicles passing through the reference line is the traffic flow.
In one possible design of the first aspect, the computing device may identify the number of vehicles passing through the reference line from the video stream as follows.
In this manner, the computing device determines a target vehicle in each video frame, the target vehicle being the vehicle closest to the reference line in the video frame in the traffic direction. The calculation device calculates a distance between the target vehicle in the video frame and the reference line, and takes the calculated distance as a target distance in the video frame. By analogy, the computing device may calculate the target distance in each video frame in the video stream.
The computing device identifies each vehicle that passes through the reference line in chronological order based on a policy and a target distance in each of the video frames in the video stream. The strategy is as follows: and identifying a vehicle passing through at present when the target distance in a first video frame is smaller than the target distance in a second video frame, wherein the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream in a time sequence.
Therefore, the method and the device can identify that the vehicles pass through the reference line and identify the number of the vehicles passing through the reference line simultaneously through the event that the target distance of the adjacent video frames in the video stream is increased. By analogy, the vehicle passing the reference line each time can be identified from the video stream; in this way, all times the vehicles passing the reference line, i.e., the traffic flow, can be calculated.
In one possible design of the first aspect, in each video frame in the video stream, the computing device calculates a distance from a head of the target vehicle to a reference line in the video frame, and the calculated distance is a target distance in the video frame.
In one possible design of the first aspect, in each video frame in the video stream, the computing device calculates a distance from a vehicle tail of the target vehicle in the video frame to the reference line, the calculated distance being the target distance in the video frame.
In one possible design of the first aspect, in each video frame in the video stream, the calculation device calculates a distance from a reference point on the body of the target vehicle in the video frame to the reference line, the calculated distance being the target distance in the video frame.
In a second aspect, the present application provides a device for counting traffic flow, comprising a plurality of functional units. The apparatus performs the steps in the method of the first aspect or any possible design of the first aspect of the present invention for traffic flow statistics by means of the plurality of functional units.
In a third aspect, the present application provides a computing device comprising a processor and a memory. The memory stores computer instructions; the processor executes the computer instructions stored by the memory to cause the computing device to perform the steps in the method of accounting for traffic flow provided by the first aspect or any possible design of the first aspect.
In a possible design of the third aspect, the computer instructions stored in the memory are used to implement the functional units in any one of the traffic flow counting devices provided in the second aspect. The computing device executes the steps in the method for counting the traffic flow through the functional unit.
In a fourth aspect, a computer-readable storage medium is provided, in which computer instructions are stored, which, when executed by a processor of a computing device, perform the steps in the method for traffic flow statistics provided by the first aspect or any possible design of the first aspect.
In a possible design of the fourth aspect, the computer instructions stored in the computer-readable storage medium are used to implement functional units in any one of the traffic flow statistics apparatuses provided in the second aspect. The computing device executes the steps in the method for counting the traffic flow through the functional unit.
In a fifth aspect, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computing device may read and execute the computer instructions from the computer-readable storage medium, causing the computing device to perform the steps in the method of accounting for traffic provided by the first aspect or any possible design of the first aspect.
In a possible design of the fifth aspect, the computer instructions in the computer program product are used to implement the functional units in any one of the apparatus for counting traffic flow provided in the second aspect. The computing device executes the steps in the method for counting the traffic flow through the functional unit.
In a sixth aspect, there is provided a system for traffic flow statistics, the system comprising a computing device and a capturing device of the first aspect or any possible design of the first aspect. The computing device performs the steps of the method for traffic flow statistics provided by the first aspect or any possible design of the first aspect, for example, the computing device deploys the apparatus for traffic flow statistics provided by the second aspect, and the computing device performs the steps of the method through a functional unit in the apparatus.
Drawings
FIG. 1 is a schematic view of a traffic stream;
FIG. 2 is a schematic diagram of a scenario in which the method provided herein is applied;
FIG. 3 is a schematic flow chart of a method for counting traffic flow according to the present application;
FIGS. 4A and 4B are schematic diagrams of the present application illustrating the passage of a vehicle;
FIG. 5 is a schematic diagram of a logic structure of the device 50 for counting traffic flow provided by the present application;
fig. 6 is a schematic diagram of a hardware structure of the computing device 12 provided in the present application.
Detailed Description
The technical solutions provided in the present application will be described below with reference to the drawings in the present application.
Brief introduction of terminology
Vehicle: refers to a vehicle that moves the vehicle body by turning the wheels. For example, the vehicle may be a non-motor vehicle or a motor vehicle.
The traffic flow direction: the same direction of movement of a plurality of vehicles on a road. Taking fig. 1 as an example, three vehicles (A, B, C) are traveling on a lane, and the three vehicles travel in the same direction, which is the direction of traffic flow.
Traffic flow rate: the vehicle is a vehicle which flows in the same direction in unit time and passes through the same reference line on a road. Fig. 1 illustrates the reference line that the vehicle (A, B) has not reached and the vehicle C is passing. Alternatively, the reference line may be a straight line, or a line consisting of a plurality of spaced points. Alternatively, the reference line may be a straight line, or another type of line. Optionally, the reference line is perpendicular to the direction of traffic flow.
A mode for calculating traffic flow is characterized in that the number of vehicles passing through the reference line in a preset time period is M, the traffic flow is the ratio of M to the preset time period, and M is a positive integer.
The embodiment of the application provides a system for counting traffic flow. Referring to fig. 2, in this embodiment, the system includes a photographing apparatus 21 and a computing apparatus 22. It will be appreciated that in further embodiments, the system may further include other processing devices, such as network forwarding devices, video processing devices, and the like.
In the embodiment shown in fig. 2, the photographing device 11 is used for acquiring the traffic flow on the monitored road and photographing the vehicles passing through the fixed road section. The photographing apparatus 11 forms a video stream including a plurality of video frames based on the pictures obtained by the continuous photographing, that is, each frame in the video stream is a video frame. The method for forming the video stream based on the plurality of photos is not limited; for example, one photo obtained by each photographing is a video frame, and a plurality of photos obtained by photographing are combined into a video stream according to the time sequence; for example, a video stream may be formed of a plurality of photographs taken, one photograph corresponding to each video frame, but with the characteristics of the vehicle in the photograph being retained in the video frame.
The photographing apparatus 11 transmits the generated video stream to the computing apparatus 12 in the system. The computing device 12 may use the methods provided herein to account for traffic flow.
The present application provides an embodiment of a method of accounting for traffic flow in which the computing device 12 of the embodiment shown in fig. 2 described above may be used to account for traffic flow. The method includes step S31, step S32, and step S33, as shown in fig. 3.
In step S31, the computing device 12 acquires the video stream from the photographing device 11.
As described above, the video stream is a video stream in which the photographing device 11 monitors the traffic flow of the preset road section, and the video stream includes a plurality of video frames.
Alternatively, computing device 12 may request a video stream from capture device 11, which capture device 11 sends to computing device 12.
Alternatively, the capture device 11 may actively transmit the video stream to the computing device 12, for example, periodically. Accordingly, the computing device 12 receives the video stream transmitted by the photographing device 11, thus completing the acquisition of the video stream.
At step S32, computing device 12 identifies vehicles in each of the video frames from the video stream.
The video stream includes a plurality of video frames, and the computing device 12 identifies vehicles for each video frame in the video stream.
Optionally, the computing device 12 deploys a Convolutional Neural Network (CNN) algorithm for identifying the vehicle. The computing device 12 identifies vehicles from the video frames through the CNN algorithm, such as identifying the vehicle closest to the reference line, or identifying all vehicles.
Optionally, the computing device 12 deploys a region candidate (RP) algorithm for identifying the vehicle. The computing device 12 identifies vehicles from the video frames through the RP algorithm, such as identifying the vehicle closest to the reference line, or identifying all vehicles.
In step S33, the computing device 12 calculates the traffic volume monitored by the video stream according to the time sequence and the traffic direction, based on the vehicles in each of the video frames identified from the video stream.
Since the video stream is obtained by the photographing device 11 monitoring the preset road segment, and the vehicle in each video frame is already identified in the video stream, the computing device 12 may count the traffic flow of the preset road segment according to the time sequence and the traffic flow direction. The following examples provide several possible statistical approaches.
In a first optional statistical manner, the computing device 12 may count the number of vehicles entering the preset road segment according to the time sequence and the traffic flow direction. The calculating device 12 may calculate the traffic flow of the preset road segment monitored by the video stream according to the counted number and the time period monitored by the video stream.
For example, the range of scenes (i.e., the preset road segments) that the video stream can monitor is limited. When the vehicle direction in each video frame in the video stream is determined, whether a new vehicle enters the preset road section or not can be identified from two adjacent video frames of the video stream; and if a new vehicle enters, identifying the number of the newly-entered vehicles. By analogy, newly-entered vehicles at each time can be identified from the video stream, and the sum of the number of newly-entered vehicles at each time is counted. Therefore, the traffic flow of the preset road section monitored by the video stream can be calculated according to the statistical sum and the video stream monitoring time period.
In a second alternative statistical manner, the computing device 12 may count the number of vehicles exiting the preset road segment according to the time sequence and the traffic flow direction. The calculating device 12 may calculate the traffic flow of the preset road segment monitored by the video stream according to the counted number and the time period monitored by the video stream.
For example, the range of scenes (i.e., the preset road segments) that the video stream can monitor is limited. When the vehicle direction in each video frame in the video stream is determined, whether a new vehicle drives out of the preset road section can be identified from two adjacent video frames of the video stream; and if a new vehicle drives out, identifying the number of the newly driven vehicles. By analogy, newly-exited vehicles at each time can be identified from the video stream, and the sum of the number of newly-exited vehicles at each time is counted. Therefore, the traffic flow of the preset road section monitored by the video stream can be calculated according to the statistical sum and the video stream monitoring time period.
Third, the computing device 12 may set a reference line for each video frame in the video stream at the same position in each video frame, as shown in fig. 1, where the reference line is perpendicular to the traffic direction. However, the present embodiment is not limited to the specific position of the reference line in the video frame, and may be set to, for example, an entry point or an exit point in the traffic direction in the video frame, or any other position in the video frame.
After setting the reference line, the computing device 12 identifies vehicles from the video stream that pass through the reference line in chronological order and traffic direction. The calculating device 12 counts the number of vehicles passing through the reference line, and may calculate the traffic flow of the preset road segment monitored by the video stream according to the counted number and the time period monitored by the video stream.
An example is optionally provided to enable identifying vehicles from the video stream that pass through the reference line.
Specifically, the computing device 12 determines a target vehicle in each video frame in the video stream, the target vehicle being the vehicle closest to the reference line in the video frame in the traffic direction. In the video frame, the distance between the target vehicle of the video frame and the reference line is calculated, and the calculated distance is used as the target distance in the video frame.
Computing device 12 then identifies each vehicle that passes through the reference line in chronological order based on the policy and the target distance in each of the video frames in the video stream. The strategy is as follows: the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream according to the time sequence; and identifying the current passing vehicles when the target distance in the first video frame is less than that in the second video frame, wherein the number of passing vehicles can be one or more, if a plurality of vehicles pass through the video frame at the same time, the number of passing vehicles is identified, and if only one vehicle passes through the video frame, the number of passing vehicles is one. Since the step S32 has already identified the vehicles in each video frame, i.e. identified the positions of the vehicles in the video frames, it is possible to further identify the vehicles currently passing through and identify the number of vehicles currently passing through when it is identified that there are vehicles passing through the reference line according to the strategy.
An example is optionally provided to enable identifying vehicles from the video stream that pass through the reference line.
Specifically, the computing device 12 calculates the distance between each vehicle in the video frame and the reference line in each video frame in the video stream, selects the shortest distance from the calculated distances between each vehicle and the reference line, takes the selected shortest distance as the target distance in the video frame, and takes the vehicle corresponding to the shortest distance as the target vehicle in the video frame. In the same video frame, if a plurality of vehicles all have the target distance from the reference line, the plurality of vehicles simultaneously serve as a plurality of target vehicles, namely each vehicle in the plurality of vehicles is a target vehicle; if only one vehicle has the target distance from the reference line, the one vehicle is regarded as a target vehicle.
Computing device 12 then identifies each vehicle that passes through the reference line in chronological order based on the policy and the target distance in each of the video frames in the video stream.
By analogy, computing device 12, through the policy, may identify all vehicles in the video stream that pass through the reference line. And calculating the traffic flow of the preset road section monitored by the video stream according to the number of all vehicles passing through the reference line.
In an alternative embodiment, the policy further comprises: the method comprises the steps of identifying that no vehicle passes through when the target distance in a first video frame is larger than or equal to the target distance in a second video frame, wherein the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream in a time sequence. In this way, the computing device 12 can accurately identify whether any vehicle passes through the reference line based on the target distance in each of the video frames in the video stream in chronological order through the policy.
By analogy, the number of all vehicles passing through the reference line in the video stream can be identified more accurately through the strategy.
For example, as shown in fig. 4A, the I-th frame, the J-th frame, and the K-th frame are three video frames sequentially arranged in time order in the video stream. In the I-th frame, according to the traffic flow direction, the vehicle head of the vehicle C is closest to the reference line compared to the vehicles a and B, and the distance between the vehicle head of the vehicle C and the reference line is 10 meters (m). In the J-th frame, according to the traffic flow direction, the vehicle head of the vehicle C is closest to the reference line compared with the vehicles a and B, and the distance between the vehicle head of the vehicle C and the reference line is 5 meters. In the K frame, according to the traffic flow direction, the head of the vehicle C already passes through the reference line, so that the distance between the vehicle C and the reference line is not considered any more, and only the vehicle A and the vehicle B are compared; at this time, the vehicle B has the closest nose to the reference line compared to the vehicle a, and the distance between the nose of the vehicle B and the reference line is 15 meters. Since the distance (15 m) between the vehicle B and the reference line in the K-th frame is greater than the distance (5 m) between the vehicle C and the reference line in the J-th frame, it is recognized that there is a vehicle passing through, and the passing vehicle is recognized as the vehicle C, that is, the number of passing vehicles is one.
For example, as shown in fig. 4B, the I-th frame, the J-th frame, and the K-th frame are three video frames sequentially arranged in time order in the video stream. In the frame I, according to the traffic flow direction, compared with the vehicle a, the vehicle heads of the vehicle B and the vehicle C are closest to the reference line, the distance between the vehicle head of the vehicle B and the reference line is 10 meters, and the distance between the vehicle head of the vehicle C and the reference line is 10 meters. In the J-th frame, according to the traffic flow direction, compared with the vehicle a, the vehicle heads of the vehicle B and the vehicle C are closest to the reference line, the distance between the vehicle head of the vehicle B and the reference line is 5 meters, and the distance between the vehicle head of the vehicle C and the reference line is 5 meters. In the K frame, according to the traffic flow direction, the head of the vehicle B and the head of the vehicle C simultaneously pass through the reference line, so that the distances between the vehicle B and the vehicle C and the reference line are not considered; at this time, the head of the vehicle a is closest to the reference line, and the distance between the head of the vehicle a and the reference line is 10 meters. Since the distance (10 m) between the vehicle a and the reference line in the K-th frame is greater than the distance (5 m) between the vehicle C and the reference line in the J-th frame, it is recognized that there are vehicles passing through, and the passing vehicles are recognized as the vehicle B and the vehicle C, i.e., the number of passing vehicles is two.
Optionally, in each video frame in the video stream, the computing device 12 calculates a distance between the head of the vehicle and the reference line, and takes the calculated distance as the distance between the vehicle and the reference line. For example, in each video frame, the distance from the head of the target vehicle to the reference line is calculated, and the calculated distance is the target distance in the video frame.
Alternatively, in each video frame in the video stream, the computing device 12 calculates the distance between the vehicle tail and the reference line, and takes the calculated distance as the distance between the vehicle and the reference line.
Alternatively, in each video frame in the video stream, a reference point (which may be located at the middle position of the vehicle or at any other position) is selected from each vehicle, the computing device 12 calculates the distance between the reference point of the vehicle and the reference line, and uses the calculated distance as the distance between the vehicle and the reference line.
The present application provides a device for traffic flow statistics, which is deployed on the computing device 12 in the embodiment shown in fig. 2, and includes functional units for implementing the steps in the method for traffic flow statistics; the embodiment of the present application does not limit how the functional units are divided in the apparatus, and an example of the division of the functional units is provided below, as shown in fig. 5.
The apparatus 50 for counting the traffic flow shown in fig. 5 includes:
an obtaining unit 51, configured to obtain a video stream of a monitored traffic flow, where the video stream includes a plurality of video frames; (ii) a
An identifying unit 52 for identifying vehicles in each of the video frames from the video stream;
and the calculating unit 53 is configured to calculate, according to the time sequence and the traffic flow direction, the traffic flow monitored by the video stream according to the vehicles in each of the video frames identified from the video stream.
Optionally, the calculating unit 53 is configured to:
setting a reference line at the same position in each video frame, wherein the reference line is vertical to the traffic flow direction;
and identifying the number of vehicles passing through the reference line from the video stream according to the time sequence and the traffic flow direction.
Optionally, the calculating unit 53 is configured to:
calculating a target distance in each video frame in the video stream, wherein the target distance is the distance between a target vehicle in the video frame and the reference line, and the target vehicle is the vehicle closest to the reference line in the video frame according to the traffic flow direction;
identifying, in chronological order, each vehicle passing through the reference line based on a policy and a target distance in each of the video frames in the video stream, the policy being: and identifying a vehicle passing through at present when the target distance in a first video frame is smaller than the target distance in a second video frame, wherein the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream in a time sequence.
Optionally, the calculating unit 53 is configured to calculate, in each of the video frames, a distance from a head of the target vehicle to the reference line, where the calculated distance is a target distance in the video frame.
The functions of the acquisition unit 51, the recognition unit 52 and the calculation unit 53 have corresponding steps in the above method. Therefore, the details of the implementation of each function in the acquiring unit 51, the identifying unit 52 and the calculating unit 53 can be referred to the description of the corresponding steps in the above method.
One possible basic hardware architecture for the computing device 12 is provided below by way of example, as shown in FIG. 6.
Referring to fig. 6, computing device 12 includes a processor 121, a memory 122, a communication interface 123, and a bus 124.
The number of processors 121 in computing device 12 may be one or more, and only one of processors 121 is illustrated in fig. 1. Alternatively, the processor 121 may be a Central Processing Unit (CPU) or an ARM processor. If computing device 12 has multiple processors 121, the types of the multiple processors 121 may be different, or may be the same. Optionally, the plurality of processors 121 of the computing device 12 may also be integrated as a multi-core processor.
The memory 122 stores computer instructions; for example, the computer instructions include chain code; for example, the computer instructions are for implementing the steps in the methods provided herein; for example, the computer instructions are for implementing the functional units comprised by the apparatus 50 provided by the present application, or for implementing the steps in the method provided by the present application.
The memory 122 may be any one or any combination of the following storage media: non-volatile memory (NVM) (e.g., Read Only Memory (ROM), Solid State Drive (SSD), mechanical hard disk, magnetic disk, disk array), volatile memory (NVM).
The communication interface 123 may be any one or any combination of the following devices: a network interface (e.g., an ethernet interface), a wireless network card, etc. having a network access function.
Communication interface 123 is used for data communication by computing device 12 with other devices, such as a computing device.
Fig. 6 shows the bus 124 by a thick line. Processor 121, memory 122 and communication interface 123 are connected by a bus 124. In this manner, processor 121 may access memory 122 via bus 124 and interact with other devices (e.g., computing devices) via bus 124 using communication interface 123.
Alternatively, computing device 12 executes computer instructions in memory 122 to implement the method for traffic flow statistics provided herein on computing device 12 or to implement apparatus 50 provided herein on computing device 12.
Optionally, the computing device 12 is a server in a public cloud or a private cloud or a hybrid cloud. After the resources of computing device 12 are virtualized, the appliance is deployed on the virtualized resources. The device is used for realizing the method for counting the traffic flow provided by the application, or the device is the device 50 provided by the application.
The present application provides a computer readable storage medium, having stored therein computer instructions, which when executed by the processor 121 of the computing device 12, the computing device 12 performs the steps in the method for counting traffic flow provided herein.
The present application provides a computer-readable storage medium having stored therein computer instructions for implementing the apparatus 50.
A computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computing device may read and execute the computer instructions from the computer-readable storage medium, so that the computing device performs the steps of the method for counting traffic flow provided herein.
The present application provides a computer program product comprising computer instructions for implementing the apparatus 50.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of traffic flow statistics, the method comprising:
acquiring a video stream of monitoring vehicle flow, wherein the video stream comprises a plurality of video frames;
identifying vehicles in each of the video frames from the video stream;
calculating the traffic flow monitored through the video stream according to the time sequence and the traffic flow direction and according to the vehicles in each video frame identified from the video stream, wherein the method comprises the following steps:
according to a time sequence, identifying each vehicle passing through a reference line according to a strategy and a target distance in each video frame in the video stream, wherein the target distance is the distance between a target vehicle in the video frame and the reference line, the target vehicle is the vehicle closest to the reference line in the video frame according to the traffic flow direction, and the strategy is as follows: and identifying a vehicle passing through at present when the target distance in a first video frame is smaller than the target distance in a second video frame, wherein the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream in a time sequence.
2. The method of claim 1, wherein said calculating the monitored traffic flow through said video stream comprises:
and setting the reference line at the same position in each video frame, wherein the reference line is vertical to the traffic flow direction.
3. The method of claim 2, wherein said calculating the monitored traffic flow through said video stream comprises:
a target distance in each of the video frames in the video stream is calculated.
4. The method of claim 3, wherein said calculating a target distance in each of said video frames in said video stream comprises:
and in each video frame, calculating the distance from the head of the target vehicle to the reference line, wherein the calculated distance is the target distance in the video frame.
5. An apparatus for counting traffic flow, the apparatus comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a video stream of monitoring vehicle flow, and the video stream comprises a plurality of video frames;
an identification unit for identifying vehicles in each of the video frames from the video stream;
a calculating unit, configured to calculate, according to a time sequence and a traffic flow direction, a traffic flow monitored through the video stream according to a vehicle in each video frame identified from the video stream, including:
according to a time sequence, identifying each vehicle passing through a reference line according to a strategy and a target distance in each video frame in the video stream, wherein the target distance is the distance between a target vehicle in the video frame and the reference line, the target vehicle is the vehicle closest to the reference line in the video frame according to the traffic flow direction, and the strategy is as follows: and identifying a vehicle passing through at present when the target distance in a first video frame is smaller than the target distance in a second video frame, wherein the first video frame and the second video frame are two video frames which are adjacent to each other in the video stream in a time sequence.
6. The apparatus of claim 5, wherein the computing unit is configured to:
and setting the reference line at the same position in each video frame, wherein the reference line is vertical to the traffic flow direction.
7. The apparatus of claim 6, wherein the computing unit is configured to:
a target distance in each of the video frames in the video stream is calculated.
8. The apparatus of claim 7,
the calculating unit is used for calculating the distance from the head of the target vehicle to the reference line in each video frame, and the calculated distance is the target distance in the video frame.
9. A computing device comprising a processor and a memory;
the memory to store computer instructions;
the processor is configured to execute the computer instructions stored in the memory to cause the computing device to perform the method for traffic flow statistics according to any one of claims 1 to 4.
10. A computer readable storage medium storing computer instructions that instruct a computing device to perform the method of accounting for traffic flow of any of claims 1 to 4.
CN201811031635.2A 2018-09-05 2018-09-05 Method and device for counting traffic flow, computing equipment and storage medium Active CN109377770B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811031635.2A CN109377770B (en) 2018-09-05 2018-09-05 Method and device for counting traffic flow, computing equipment and storage medium
PCT/CN2019/087229 WO2020048156A1 (en) 2018-09-05 2019-05-16 Method and apparatus for counting vehicle flow, computing device, and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811031635.2A CN109377770B (en) 2018-09-05 2018-09-05 Method and device for counting traffic flow, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109377770A CN109377770A (en) 2019-02-22
CN109377770B true CN109377770B (en) 2021-06-22

Family

ID=65404581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811031635.2A Active CN109377770B (en) 2018-09-05 2018-09-05 Method and device for counting traffic flow, computing equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109377770B (en)
WO (1) WO2020048156A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109377770B (en) * 2018-09-05 2021-06-22 华为技术有限公司 Method and device for counting traffic flow, computing equipment and storage medium
CN111046820A (en) * 2019-12-17 2020-04-21 上海船舶研究设计院(中国船舶工业集团公司第六0四研究院) Statistical method and device for vehicles in automobile roll-on-roll-off ship and intelligent terminal
CN111369795B (en) * 2020-03-09 2022-11-08 深圳大学 Traffic flow statistical method, device, equipment and storage medium
CN112950961B (en) * 2021-01-27 2022-07-08 苏州智芯控联信息科技有限公司 Traffic flow statistical method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102708690A (en) * 2012-06-20 2012-10-03 中国计量学院 Method for measuring road noise on basis of road monitoring video
JP5583067B2 (en) * 2011-03-31 2014-09-03 中日本高速道路株式会社 Vehicle detector
CN104021679A (en) * 2014-05-30 2014-09-03 宁波海视智能系统有限公司 Traffic flow statistic method based on video
CN104599502A (en) * 2015-02-13 2015-05-06 重庆邮电大学 Method for traffic flow statistics based on video monitoring
CN106710228A (en) * 2016-12-21 2017-05-24 南京大学镇江高新技术研究院 Implementation method of passenger and freight separated traffic parameter monitoring system
CN108351219A (en) * 2016-02-26 2018-07-31 华为技术有限公司 Traffic control method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001283373A (en) * 2000-03-30 2001-10-12 Toshiba Corp Traffic flow measuring system
CN101510358B (en) * 2009-03-20 2010-08-25 吉林大学 Method and apparatus for processing real time statistical vehicle flowrate using video image
JP5297407B2 (en) * 2010-03-19 2013-09-25 三菱電機株式会社 Traffic flow measuring device
WO2013187748A1 (en) * 2012-06-12 2013-12-19 Institute Of Electronics And Computer Science System and method for video-based vehicle detection
CN106097726A (en) * 2016-08-23 2016-11-09 苏州科达科技股份有限公司 The detection determination in region, traffic information detection method and device
CN109377770B (en) * 2018-09-05 2021-06-22 华为技术有限公司 Method and device for counting traffic flow, computing equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5583067B2 (en) * 2011-03-31 2014-09-03 中日本高速道路株式会社 Vehicle detector
CN102708690A (en) * 2012-06-20 2012-10-03 中国计量学院 Method for measuring road noise on basis of road monitoring video
CN104021679A (en) * 2014-05-30 2014-09-03 宁波海视智能系统有限公司 Traffic flow statistic method based on video
CN104599502A (en) * 2015-02-13 2015-05-06 重庆邮电大学 Method for traffic flow statistics based on video monitoring
CN108351219A (en) * 2016-02-26 2018-07-31 华为技术有限公司 Traffic control method and device
CN106710228A (en) * 2016-12-21 2017-05-24 南京大学镇江高新技术研究院 Implementation method of passenger and freight separated traffic parameter monitoring system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于车辆识别的流量监测方法研究与实现;毛欣;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180215;全文 *

Also Published As

Publication number Publication date
WO2020048156A1 (en) 2020-03-12
CN109377770A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN109377770B (en) Method and device for counting traffic flow, computing equipment and storage medium
CN105493502B (en) Video monitoring method, video monitoring system and computer readable storage medium
JP7036863B2 (en) Systems and methods for activity monitoring using video data
US9336450B2 (en) Methods and systems for selecting target vehicles for occupancy detection
US10043078B2 (en) Virtual turnstile system and method
US20180089515A1 (en) Identification and classification of traffic conflicts using live video images
CN109584567A (en) Traffic management method based on bus or train route collaboration
US9760783B2 (en) Vehicle occupancy detection using passenger to driver feature distance
CN109979197B (en) Method and system for constructing highway traffic time map based on fusion data
CN109492571B (en) Method and device for identifying human age and electronic equipment
CN113326719A (en) Method, equipment and system for target tracking
US20220237919A1 (en) Method, Apparatus, and Computing Device for Lane Recognition
CN108847024A (en) Traffic congestion recognition methods and system based on video
WO2023019936A1 (en) Vehicle driving behavior detection method and apparatus, and device and storage medium
Odeh Management of an intelligent traffic light system by using genetic algorithm
CN111402615B (en) Variable lane control method based on navigation information
CN111898485A (en) Parking space vehicle detection processing method and device
CN113380027A (en) Intersection traffic state parameter estimation method and system based on multi-source data
CN113380021B (en) Vehicle state detection method, device, server and computer readable storage medium
CN104766494B (en) Distributed type time-staggered parking system
Prommool et al. Vision-based automatic vehicle counting system using motion estimation with Taylor series approximation
CN110046535B (en) Intelligent travel time prediction system, method and storage medium based on machine learning
CN105719313B (en) A kind of motion target tracking method based on intelligent real-time video cloud
CN114078319A (en) Method and device for detecting potential hazard site of traffic accident
CN115762153A (en) Method and device for detecting backing up

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
GR01 Patent grant
GR01 Patent grant