[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112562315B - Method, terminal and storage medium for acquiring traffic flow information - Google Patents

Method, terminal and storage medium for acquiring traffic flow information Download PDF

Info

Publication number
CN112562315B
CN112562315B CN202011205030.8A CN202011205030A CN112562315B CN 112562315 B CN112562315 B CN 112562315B CN 202011205030 A CN202011205030 A CN 202011205030A CN 112562315 B CN112562315 B CN 112562315B
Authority
CN
China
Prior art keywords
vehicle
sequence
simplified
track
historical
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
CN202011205030.8A
Other languages
Chinese (zh)
Other versions
CN112562315A (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.)
Peng Cheng Laboratory
Original Assignee
Peng Cheng Laboratory
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 Peng Cheng Laboratory filed Critical Peng Cheng Laboratory
Priority to CN202011205030.8A priority Critical patent/CN112562315B/en
Publication of CN112562315A publication Critical patent/CN112562315A/en
Application granted granted Critical
Publication of CN112562315B publication Critical patent/CN112562315B/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/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/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules

Landscapes

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

Abstract

The invention discloses a method, a terminal and a storage medium for acquiring traffic flow information, wherein the method comprises the following steps: acquiring a historical electronic police monitoring video, and determining a simplified track sequence of a historical vehicle in the historical electronic police monitoring video through a multi-target tracking model; clustering and classifying the simplified track sequences of the historical vehicles to obtain a path classification set; and acquiring a simplified track sequence of the vehicle in the electronic police monitoring video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information. And reliable reference information is provided for the flow monitoring and road planning of the urban road.

Description

Method, terminal and storage medium for acquiring traffic flow information
Technical Field
The present invention relates to the field of transportation, and in particular, to a method, a terminal, and a storage medium for acquiring traffic information.
Background
The traffic flow state is an important index of city management, the traffic flow states of different road sections and different road intersections in a city are obtained in time, and references can be provided for urban road planning, temporary traffic control, special vehicle restriction, citizen travel guidance and the like. Accurate traffic flow statistics and type identification can provide important traffic information. The intersection is a key point of an urban road network, and the number, types and the like of traffic flows which enter and exit from various directions in different time periods can be seen from the intersection. However, in the prior art, the method for acquiring the traffic information can only estimate the traffic information of the intersection, and cannot acquire the traffic information with the vehicle attribute information.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, a terminal and a storage medium for acquiring traffic information, aiming at solving the problem that a system in the prior art cannot acquire traffic information with vehicle attribute information.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a method for acquiring traffic information, where the method includes:
acquiring a historical electronic police monitoring video, and determining a simplified track sequence of a historical vehicle in the historical electronic police monitoring video through a multi-target tracking model;
clustering and classifying the simplified track sequences of the historical vehicles to obtain a path classification set;
and acquiring a simplified track sequence of the vehicle in the electronic police monitoring video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information.
In one embodiment, the obtaining of the historical electronic police surveillance video, and the determining of the simplified track sequence of the historical vehicles in the historical electronic police surveillance video through the multi-target tracking model includes:
acquiring a historical electronic police monitoring video, and processing the historical electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set and a tracking identification number of a historical vehicle;
taking a point on a preset position of a detection frame of the historical vehicle as a symbolic point of the historical vehicle, and acquiring coordinate data of the symbolic point in a detection frame coordinate set of the historical vehicle;
and determining an original track sequence of the historical vehicle according to the coordinate data of the symbolic points of the historical vehicle and the tracking identification number, and simplifying the original track sequence to obtain a simplified track sequence.
In one embodiment, the determining an original trajectory sequence of the historical vehicle according to the coordinate data of the symbolic points of the historical vehicle and the tracking identification number, and performing a simplification process on the original trajectory sequence to obtain a simplified trajectory sequence includes:
acquiring coordinate data of all symbolic points of the historical vehicle within preset time through the tracking identification number, sequencing the coordinate data of all symbolic points of the historical vehicle according to the acquired time sequence to obtain a symbolic point sequence, and taking the symbolic point sequence as an original track sequence of the historical vehicle;
acquiring the line segment distance between two adjacent symbolic points in the original track sequence, adding the line segment distances between two adjacent symbolic points in the original sequence, and calculating the total length of the original track sequence;
and resampling the points on the original track sequence according to the number of preset resampling points, taking the points obtained by resampling as simplified points, sequencing the simplified points according to the sequence of resampling to obtain a simplified point sequence, and taking the simplified point sequence as the simplified track sequence of the historical vehicle.
In one embodiment, the clustering and classifying the simplified track sequences of the historical vehicles to obtain the path classification set includes:
when the simplified track sequences are stored to a preset number, acquiring the simplified track sequences of the preset number and carrying out track clustering processing to obtain a cluster; the clustering cluster is composed of a plurality of similar simplified track sequences;
acquiring coordinate data of simplified points on the same sequence position in each simplified track sequence in the cluster, averaging to obtain representative points and coordinate data of the representative points, sequencing all the representative points according to the acquired time sequence to obtain a representative point sequence, and taking the representative point sequence as path information;
and performing feature extraction and classification processing on the path information to obtain a path classification set.
In an embodiment, the performing feature extraction and classification processing on the path information to obtain a path classification set includes:
extracting the characteristics of the path information to obtain path characteristic data;
and classifying the path information according to the driving direction through a trajectory classifier and the path characteristic data to obtain a path classification set.
In one embodiment, the obtaining a simplified track sequence of a vehicle in an electronic police surveillance video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information includes:
acquiring an electronic police monitoring video, processing the electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set of a vehicle, a tracking identification number of the vehicle and output a video frame set;
acquiring a picture and vehicle attribute information of the vehicle according to the detection frame coordinate set, the video frame set and the attribute analysis network model of the vehicle;
identifying the picture of the vehicle according to a license plate detection and identification algorithm to obtain the license plate number of the vehicle;
storing the tracking identification number, the picture of the vehicle, the license plate number of the vehicle and the vehicle attribute information in a first record table in an associated manner;
obtaining a simplified track sequence of the vehicle, matching the simplified track sequence of the vehicle with the path classification set to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle;
and counting the passing vehicles in the electronic monitoring video through the first recording list and the path types of the vehicles to obtain the traffic flow information with the vehicle attribute information.
In one embodiment, the obtaining the picture of the vehicle and the vehicle attribute information according to the detection frame coordinate set of the vehicle, the video frame set, and the attribute analysis network model includes:
according to the coordinate set of the detection frame of the vehicle, capturing a picture of the vehicle from the video frame set;
and performing attribute analysis on the picture of the vehicle according to an attribute analysis network model, and taking the result of the attribute analysis as the extracted vehicle attribute information.
In one embodiment, the obtaining the simplified track sequence of the vehicle, matching the simplified track sequence of the vehicle with the path classification set to obtain a vehicle track classification result, and using the vehicle track classification result as the path type of the vehicle includes:
when the vehicle disappears in any video frame in the video frame set, acquiring a simplified track sequence of the vehicle;
and matching the simplified track sequence of the vehicle with the paths in the path classification set by a track similarity measurement method to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle.
In a second aspect, an embodiment of the present invention further provides a storage medium having a plurality of instructions stored thereon, where the instructions are adapted to be loaded and executed by a processor to implement any one of the steps of the method for acquiring traffic information.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes: a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to call instructions in the storage medium to implement the steps of any one of the above-mentioned methods for obtaining traffic information.
The invention has the beneficial effects that: the invention utilizes the video shot by the electronic police to monitor, obtains the path information by analyzing the track of the historical vehicle, matches the obtained track of the vehicle with the path information, and extracts the vehicle attribute information, thereby obtaining the traffic flow information with the vehicle attribute information. And reliable reference information is provided for the flow monitoring and road planning of the urban road.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for acquiring traffic information according to an embodiment of the present invention.
FIG. 2 is a schematic flow chart diagram for obtaining a simplified track sequence of a historical vehicle according to an embodiment of the invention.
Fig. 3 is a schematic flowchart of obtaining a path classification set according to an embodiment of the present invention.
Fig. 4 is a schematic flow chart of acquiring traffic information with vehicle attribute information according to an embodiment of the present invention.
Fig. 5 is a bird's eye view of an intersection under the monitoring of an electronic police officer according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of extracting path information from a historical track according to an embodiment of the present invention.
Fig. 7 is a functional block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
The traffic flow state is an important index of city management, the traffic flow states of different road sections and different road intersections in a city are obtained in time, and references can be provided for urban road planning, temporary traffic control, special vehicle restriction, citizen travel guidance and the like. Accurate traffic flow statistics and type identification can provide important traffic information. The intersection is a key point of an urban road network, and the number, types and the like of traffic flows which enter and exit from various directions in different time periods can be seen from the intersection.
The existing counting methods are mainly divided into two types: and acquiring flow information by depending on the placed hardware sensing device, and understanding the monitoring video by using a vision-related algorithm. With the first method, although some sensors may be more accurate, there are high installation and maintenance costs, the information that can be obtained is relatively single, and deployment requires a certain amount of manpower. For the second method, the existing monitoring video material can be directly utilized, and richer traffic information can be obtained. However, the common counting route for the second method is: for a current electric alarm scene, a virtual tripwire corresponding to the scene is drawn on an image (generally near an intersection sidewalk), and a tracked track is crossed with the virtual tripwire so as to count. But such routes also present deployment and maintenance problems. Therefore, the second method needs to manually set a corresponding trip wire when the camera is deployed for the first time, and the trip wire is inaccurate if the camera moves. Namely, both methods require certain personnel to participate, and certain human resources are consumed. In addition, the mode of acquiring the traffic information in the prior art can only estimate the traffic information of the intersection, and cannot acquire the traffic information with the vehicle attribute information.
In view of the above problems in the prior art, the present invention provides a method for acquiring traffic information. The technical scheme of the invention is mainly used for acquiring the traffic flow information of the intersection under the monitoring of an electronic police. The installation of electronic police monitoring at the intersection has strict regulations, most of traffic flow information of the intersection can be acquired, and the installation of the electronic police guarantees the recognition degree of vehicles, pedestrians and intersection structures, so that the electronic police is an ideal analysis data source. By utilizing a multi-target detection and tracking algorithm, the track of the traffic flow is extracted, and after a period of time, a large number of historical tracks can draw the form of the road intersection, so that the path information under the visual angle of the electric police is obtained. In addition, the extracted path information can be refined to a lane level, the driving track of the vehicle is matched with the extracted path information, and the traffic flow information of different intersections of the crossroad is obtained, so that reliable reference information is provided for the traffic monitoring and road planning of urban roads.
As shown in fig. 1, the present embodiment provides a method for acquiring traffic information, where the method includes the following steps:
s100, obtaining a historical electronic police monitoring video, and determining a simplified track sequence of a historical vehicle in the historical electronic police monitoring video through a multi-target tracking model.
In the embodiment, the road intersection form under the electronic police monitoring scene needs to be described through the historical track, so that a simplified track sequence of the historical vehicles in the historical electronic police monitoring video needs to be obtained at first. Specifically, in the embodiment, an electronic police surveillance video is processed by using a multi-target Tracking model (for example, deep sort + Yolov3 model) for a traffic body, and the multi-target Tracking, that is, Multiple Object Tracking (MOT), is mainly performed by giving an image sequence, finding a moving Object in the image sequence, identifying moving objects in different frames, and then assigning the same Tracking identification number to the same moving Object. And further calculating the track information of different traffic bodies at the intersection, namely simplifying the track sequence. And then, the simplified track sequences are used as the basis for subsequently describing the road intersection form in the electronic police monitoring scene.
As shown in fig. 2, in an implementation manner, the step S100 specifically includes the following steps:
step S110, obtaining a historical electronic police monitoring video, and processing the historical electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set and a tracking identification number of a historical vehicle;
step S120, taking a point on a preset position of a detection frame of the historical vehicle as a symbolic point of the historical vehicle, and acquiring coordinate data of the symbolic point in a detection frame coordinate set of the historical vehicle;
step S130, determining an original track sequence of the historical vehicle according to the coordinate data of the symbolic points of the historical vehicle and the tracking identification number, and simplifying the original track sequence to obtain a simplified track sequence.
In this embodiment, after the historical electronic police surveillance video is acquired, the historical electronic police surveillance video is input into the multi-target tracking model, and the multi-target tracking model outputs the detection frame of each vehicle detected in the historical electronic police surveillance video, the coordinate data of the detection frame, and the tracking identification number corresponding to the vehicle. And then, taking a point on a preset position on the detection frame as a symbolic point of the vehicle, determining an original track sequence of the historical vehicle according to the coordinate data of the symbolic point of the historical vehicle and the tracking identification number, and simplifying the original track sequence to obtain a simplified track sequence.
In an implementation manner, in order to obtain the simplified track sequence of the historical vehicle, in this embodiment, first, coordinate data of all the symbolic points of the historical vehicle within a preset time are obtained through the tracking identification number, then, the coordinate data of all the symbolic points of the historical vehicle are sorted according to the obtained time sequence to obtain a symbolic point sequence, and the symbolic point sequence is used as the original track sequence of the historical vehicle. In addition, the line segment distance between two adjacent symbolic points in the original track sequence needs to be obtained, and the line segment distances between two adjacent symbolic points in the original sequence are added to calculate the total length of the original track sequence. And finally, resampling the points on the original track sequence according to the number of preset resampling points, taking the resampled points as simplified points, sequencing the simplified points according to the sequence of resampling to obtain a simplified point sequence, and taking the simplified point sequence as the simplified track sequence of the historical vehicle.
For example, if the historical electronic surveillance video is input into the multi-target tracking model YOLOv4+ deep sort model, the model will output the detection box b of each vehicleiAnd the tracking identification number t _ id corresponding to the traffic bodyi(ii) a Detection frame b for each vehicleiThe midpoint of the lower edge of the detection frame may be set as a symbol point p of the vehicle at that timeiAccording to the same tracking identification number t _ idiAcquiring a chronological sequence of symbolic points { P) of the same vehicle in a period of time0 i,P1 i,P2 i,...,Pn iI.e. the original trajectory sequence traj _ org of the vehiclei. Then to the original track sequence traj _ orgiThe simplification is carried out: firstly, two adjacent symbolic points P are calculatedk i,Pk+1 i(where k belongs to {0, 1.,. n-1}) the distance of the line segments between them is set to tskThen the total length of an original track sequence is the sum of the line segment distances between all two adjacent symbolic points
Figure BDA0002756759450000091
Then, resampling is performed on the original trajectory sequence, for example, if a user sets a preset number of resampling points to 20, the total length traj _ len of the original trajectory sequence is divided by 20, so as to obtain a length sec _ len for equally dividing the original trajectory sequence. Then, resampling is carried out in sequence from the first symbolic point of the original track sequence according to the calculated length of equally dividing the original track sequence, the points obtained through resampling are simplified points, the simplified points are sequenced according to the sequence of resampling to obtain a simplified point sequence, and the simplified point sequence is used as the simplified track sequence traj of the historical vehiclei
After the simplified track sequence of the historical vehicle is acquired, the simplified track sequence needs to be analyzed to obtain the path information of the intersection under the monitoring of the electronic police, so as shown in fig. 1, the method further comprises the following steps:
and S200, clustering and classifying the simplified track sequences of the historical vehicles to obtain a path classification set.
Specifically, for the collected simplified track sequence of the historical vehicles in a period of time, by using a track clustering algorithm, some representative tracks can be extracted from the tracks through a clustering and classifying method, and the representative tracks are main paths of the historical vehicles passing through the intersection and can describe the form of the intersection.
As shown in fig. 3, in an implementation manner, the step S200 specifically includes the following steps:
step S210, when the simplified track sequences are stored to a preset number, acquiring the simplified track sequences of the preset number and carrying out track clustering processing to obtain a cluster; the clustering cluster is composed of a plurality of similar simplified track sequences;
step S220, obtaining coordinate data of simplified points on the same sequence position in each simplified track sequence in the cluster and averaging to obtain representative points and coordinate data of the representative points, sequencing all the representative points according to the obtained time sequence to obtain a representative point sequence, and taking the representative point sequence as path information;
and step S230, performing feature extraction and classification processing on the path information to obtain a path classification set.
Specifically, the user may set a storage upper limit of the simplified track sequence by himself, and the more the number of the stored simplified track sequences is, the more accurate the subsequent path morphological analysis will be. In an implementation manner, when the simplified track sequences are stored in 2000, the simplified track sequences of the preset number are obtained and track clustering processing is performed. After the clustering process, a clustering result TC ═ { TC ═ TC can be obtained0,tc1,tc2,...,tcn},tckAnd representing the kth cluster, wherein each cluster consists of a plurality of similar simplified track sequences. Then, a representative track sequence needs to be extracted from all similar simplified track sequences in the same cluster, and the embodiment adopts the same sequence in all the simplified track sequences in the same clusterAnd obtaining the representative points and the coordinate data of the representative points by a method for averaging the coordinate data of the simplified points on the positions, sequencing all the representative points according to the obtained time sequence to obtain a representative point sequence, and taking the representative point sequence as path information. For example, for a cluster tckAnd the simplified track sequence comprises T similar simplified track sequences, and each simplified track sequence is represented by N simplified points (N is the number of the resampling points). Obtaining clustering cluster tckCoordinate data of the 1 st simplified point of the T simplified track sequences are obtained, the obtained coordinate data are averaged, and the obtained clustering tc is obtainedkThe 1 st representative point of the representative trajectory of (1); then, a cluster tc is obtainedkCoordinate data of the 2 nd simplified point of the T simplified track sequences are obtained, the obtained coordinate data are averaged, and the obtained cluster tc is obtainedkThe 2 nd representative point of the representative trajectory of (1); and so on until obtaining the clustering cluster tckCoordinate data of the Nth simplified point of the T simplified track sequences are obtained, the obtained coordinate data are averaged, and the obtained clustering tc is obtainedkRepresents the nth representative point of the trajectory. Arranging the obtained representative points according to the obtained time sequence to obtain a cluster tckIs represented as path, i.e. a sequence of representative pointsk={pck 0,pck 2,...,pck N—1Therein, pck jAnd j representing points obtained by averaging the coordinate data of j simplified points of the T simplified track sequences. And taking the representative point sequence as one piece of path data in path information.
After the path information is obtained, the path information needs to be classified to obtain a path classification set. In one implementation, the classification process is: extracting the characteristics of the path information to obtain path characteristic data; and classifying the path information according to the driving direction through a trajectory classifier and the path characteristic data to obtain a path classification set.
Specifically, the path information needs to be feature extracted first to extract featuresAnd carrying out classification processing to obtain a path classification set. In one implementation, feature extraction is performed on the path information to obtain path feature data. And then classifying the path information according to the driving direction through a trajectory classifier and the path characteristic data to obtain a path classification set. Specifically, each path in the path information is subjected to feature extraction, and each path is composed of a sequence of representative points, and each representative point can extract features of one quadruple
Figure BDA0002756759450000121
Wherein xi and yi are coordinate values of the point i on the x axis and the y axis respectively, and delta xi=xi+1-xi,Δyi=yi+1-yi. The last point N-1 does not mention the feature. A path is characterized as
Figure BDA0002756759450000122
Then, the trajectory features are input into the trajectory classifier SVN, which may classify the trajectory according to the features of the input point sequence of one trajectory and output a path classification M of the trajectory { DU, UD, RL, LR, DR, UL, RU, LD, DL, UL, RD, LU }. As shown in fig. 5, U, D, L, R respectively indicate four intersections of the intersection, i.e., upper, lower, left, and right intersections, in the view angle monitored by the electric police, DU indicates that the track path of the vehicle is driven from the side monitored by the electric police to the opposite intersection, and RL indicates that the track path of the vehicle is driven from the right intersection to the left intersection.
In order to obtain the traffic information with the vehicle attribute information, as shown in fig. 1, the method further includes the steps of:
and S300, acquiring a simplified track sequence of the vehicle in the electronic police monitoring video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information.
After a path classification set is obtained according to a historical electronic police surveillance video, analysis and counting operation can be performed on vehicles of the subsequent electronic surveillance video, a simplified track sequence of the vehicles is matched with the path classification set, vehicle attribute information is extracted, and traffic flow information with the vehicle attribute information is obtained.
As shown in fig. 4, in an implementation manner, the step S300 specifically includes the following steps:
step S310, obtaining an electronic police monitoring video, processing the electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set of a vehicle and a tracking identification number of the vehicle, and outputting a video frame set;
step S320, obtaining a picture of the vehicle and vehicle attribute information according to the detection frame coordinate set of the vehicle, the video frame set and the attribute analysis network model;
s330, identifying the picture of the vehicle according to a license plate detection and identification algorithm to obtain the license plate number of the vehicle;
step S340, storing the tracking identification number, the picture of the vehicle, the license plate number of the vehicle and the vehicle attribute information in a first record table in an associated manner;
step S350, acquiring a simplified track sequence of the vehicle, matching the simplified track sequence of the vehicle with the path classification set to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle;
and S360, counting the passing vehicles in the electronic monitoring video through the first recording table and the path types of the vehicles to obtain the traffic flow information with the vehicle attribute information.
Specifically, after the system acquires a new electronic police surveillance video, as with the processing of the historical electronic surveillance video, the new electronic police surveillance video is input into the multi-target tracking model, an inspection box coordinate set of each vehicle and a tracking identification number of each vehicle in the video are acquired, and meanwhile, the electronic police surveillance video stream is divided into video frames and a video frame set is output. And intercepting and identifying the vehicle appearing in the video frame set according to the detection frame coordinate set of the vehicle to obtain the picture of the vehicle and the vehicle attribute information.
In an implementation manner, in order to obtain a picture of a vehicle and vehicle attribute information, in this embodiment, the picture of the vehicle needs to be captured from the video frame set according to the detection frame coordinate set of the vehicle, and then the picture of the vehicle is input to an attribute analysis network model for attribute analysis, for example, a multi-tag classification model may be selected. And then taking the attribute analysis result output by the attribute analysis network model as the predicted vehicle attribute information of the vehicle, such as type, color, size, social property and carrying property. In addition, the image of the vehicle needs to be input into a license plate detection algorithm module, for example, YOLOv3+ morphological license plate segmentation + MLP classifier license plate recognition algorithm module, to obtain the license plate number of the vehicle. And then storing the tracking identification number, the picture of the vehicle, the license plate number of the vehicle and the vehicle attribute information in a first record table in an associated manner.
In one implementation mode, according to a coordinate set of a detection frame of a vehicle, a picture of the vehicle is intercepted, a first record table of a tracking identification number of the vehicle and a corresponding picture of the tracking identification number of the vehicle is established, the tracking identification number of the vehicle, the picture of the vehicle, vehicle attribute information and a binary marking variable are stored in the first record table, and when the binary marking variable is 1, the vehicle needs to be identified again.
In order to detect the situation that the vehicle enters and exits the intersection under the monitoring of the electronic police in time, in one implementation mode, for each frame of the video, according to a detection frame coordinate set of the vehicle, the method in step S120 obtains a symbolic point of the vehicle at the moment, and maintains a track recording table, the track recording table is divided into three queues, respectively records a disappearing vehicle, a new appearing vehicle, and a vehicle existing all the time, namely a state maintaining vehicle, and records a tracking identification number of the vehicle and a track point sequence of the vehicle from the appearance moment to the disappearance moment. Specifically, a t-1 frame exists, and the tracking identification number of the vehicle which does not exist in the t frame is recorded in a queue of the disappeared vehicle; the t-1 frame does not exist, and the tracking identification number of the vehicle existing in the t frame is recorded in a queue of the newly-appeared vehicle; and recording the tracking identification number of the vehicle with both the t-1 frame and the t frame into a queue of the state maintaining vehicle. So that the recording of the entry and exit of vehicles is refined to each vehicle.
For a vehicle in a queue of newly-appeared vehicles, recording the tracking identification number of the vehicle and the picture of the vehicle intercepted in the video frame in the first recording table, and setting the corresponding binary mark variable of the vehicle to be 1, so that the system can re-identify the vehicle.
For the vehicles in the queue of the state keeping vehicles, if the size of the picture of the vehicle intercepted by the current frame is larger than the size of the recorded picture of the vehicle, the recorded picture of the vehicle is changed into the picture of the vehicle to be handed over of the current frame, and a binary marking variable is set to be 1; if the size of the picture of the vehicle intercepted by the current frame is smaller than or equal to the size of the recorded picture of the vehicle, the current state is kept, and the system does not operate;
in view of the fact that the traffic information has a certain real-time property, in one implementation, the first record table needs to be updated. Specifically, in this embodiment, every preset number of video frames (the preset number is a user set variable and may be set to 5) are set, the pictures in the first record table are read, the pictures of the vehicle with the binary flag variable of 1 in the first record table are respectively input into the attribute analysis network model and the license plate detection and identification algorithm module, and then the output vehicle attribute information and the license plate number of the vehicle are recorded in the first record table.
For a vehicle in the queue of a disappearing vehicle, considering that the vehicle has exited an intersection under the monitoring of the electronic police, the tracking identification number of the vehicle and all records corresponding to the tracking identification number can be deleted in the first record table, meanwhile, the simplified track sequence of the vehicle is sent to a track matching classification module in the first record table, the simplified track sequence of the vehicle is classified by the track matching classification module according to the path information to obtain a vehicle track classification result, and the vehicle track classification result is taken as the path type of the vehicle, namely, the step S350 is implemented. In other words, in this embodiment, the whole process of monitoring the vehicles from entering to leaving by the electronic police is continuously tracked, when a certain vehicle is in the queue of the disappeared vehicles, it indicates that the vehicle has disappeared within the monitoring range monitored by the electronic police, that is, the vehicle has passed through the intersection, and the system has completed tracking the vehicle, so that it is necessary to obtain the simplified track sequence of the vehicle, classify the simplified track sequence of the vehicle according to the path information, obtain the vehicle track classification result, and generate a passing record { tracking identification number of the vehicle, license plate number of the vehicle, vehicle attribute information of the vehicle, path type of the vehicle }.
When the vehicle disappears in any one of the video frames in the video frame set, a simplified track sequence of the vehicle is obtained. And matching the simplified track sequence of the vehicle with the paths in the path classification set by a track similarity measurement method to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle. Specifically, the method of acquiring the simplified trajectory sequence of the vehicle is the same as the method of acquiring the simplified trajectory sequence of the history vehicle in the aforementioned step S100. Then, a track similarity measurement method, such as a longest common subsequence (LCSS) algorithm, is used for obtaining the similarity between the simplified track sequence of the vehicle and all the paths in the path classification set, taking the path with the highest similarity as the vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle.
And finally, the system can count the vehicle passing records in the electronic monitoring video through the first record table and the vehicle track classification result to obtain the traffic flow information. Specifically, there are two main types of statistics, the first is according to the path type: counting the number of vehicles with the track type of m and the number of vehicles with the track type of m belonging to { DU, UD, RL, LR, DR, UL, RU, LD, DL, UL, RD, LU }, obtaining how many vehicles pass through the intersection under the monitoring of the police officer in the form of the track m, and meanwhile, refining the information to the license plate number of the vehicles through the data on the first recording list and the proportion of the vehicles with different attribute types to the total number of the vehicles. The second type of statistics is performed according to intersections, as shown in fig. 5, for example, statistics is performed on the passing records of all the passing vehicles that enter the intersection under the monitoring of the electric police, namely the passing records under the { DU, DL, DR } path, statistics is performed on the passing records of all the passing vehicles that exit the intersection from the D intersection, namely the passing records under the { UD, LD, RD } path, and the same is true for other paths. And finally, after counting the vehicles of each frame of video frame of the electronic police monitoring video stream according to the first recording table, obtaining the traffic stream information with the vehicle attribute information in each video frame and outputting the traffic stream information.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 7. The intelligent terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement a method of acquiring traffic information. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram of fig. 7 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one implementation, one or more programs are stored in a memory of the smart terminal and configured to be executed by one or more processors include instructions for performing a method of obtaining traffic information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method, a terminal and a storage medium for acquiring traffic information, wherein the method includes: acquiring a historical electronic police monitoring video, and determining a simplified track sequence of a historical vehicle in the historical electronic police monitoring video through a multi-target tracking model; clustering and classifying the simplified track sequences of the historical vehicles to obtain a path classification set; and acquiring a simplified track sequence of the vehicle in the electronic police monitoring video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information. And reliable reference information is provided for the flow monitoring and road planning of the urban road. .
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (8)

1. A method of obtaining traffic flow information, the method comprising:
acquiring a historical electronic police monitoring video, and determining a simplified track sequence of a historical vehicle in the historical electronic police monitoring video through a multi-target tracking model;
clustering and classifying the simplified track sequences of the historical vehicles to obtain a path classification set;
acquiring a simplified track sequence of a vehicle in an electronic police monitoring video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain traffic flow information with the vehicle attribute information;
the method for obtaining the historical electronic police surveillance video and determining the simplified track sequence of the historical vehicles in the historical electronic police surveillance video through the multi-target tracking model comprises the following steps:
acquiring a historical electronic police monitoring video, and processing the historical electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set and a tracking identification number of a historical vehicle;
taking a point on a preset position of a detection frame of the historical vehicle as a symbolic point of the historical vehicle, and acquiring coordinate data of the symbolic point in a detection frame coordinate set of the historical vehicle;
determining an original track sequence of the historical vehicle according to the coordinate data of the symbolic points of the historical vehicle and the tracking identification number, and simplifying the original track sequence to obtain a simplified track sequence;
determining an original track sequence of the historical vehicle according to the coordinate data of the symbolic points of the historical vehicle and the tracking identification number, and simplifying the original track sequence to obtain a simplified track sequence, wherein the simplified track sequence comprises:
acquiring coordinate data of all symbolic points of the historical vehicle within preset time through the tracking identification number, sequencing the coordinate data of all symbolic points of the historical vehicle according to the acquired time sequence to obtain a symbolic point sequence, and taking the symbolic point sequence as an original track sequence of the historical vehicle;
acquiring the line segment distance between two adjacent symbolic points in the original track sequence, adding the line segment distances between two adjacent symbolic points in the original sequence, and calculating the total length of the original track sequence;
resampling the points on the original track sequence according to the number of preset resampling points, taking the points obtained by resampling as simplified points, sequencing the simplified points according to the sequence of resampling to obtain a simplified point sequence, and taking the simplified point sequence as the simplified track sequence of the historical vehicle;
the resampling the points on the original track sequence according to the number of the preset resampling points includes: dividing the total length by the number of the preset resampling points to obtain the length for equally dividing the original track sequence, and sequentially resampling according to the calculated length for equally dividing the original track sequence from the first symbolic point of the original track sequence.
2. The method of claim 1, wherein the clustering and classifying the simplified track sequences of the historical vehicles to obtain the path classification set comprises:
when the simplified track sequences are stored to a preset number, acquiring the simplified track sequences of the preset number and carrying out track clustering processing to obtain a cluster; the clustering cluster is composed of a plurality of similar simplified track sequences;
acquiring coordinate data of simplified points on the same sequence position in each simplified track sequence in the cluster, averaging to obtain representative points and coordinate data of the representative points, sequencing all the representative points according to the acquired time sequence to obtain a representative point sequence, and taking the representative point sequence as path information;
and performing feature extraction and classification processing on the path information to obtain a path classification set.
3. The method according to claim 2, wherein the performing feature extraction and classification processing on the path information to obtain a path classification set includes:
extracting the characteristics of the path information to obtain path characteristic data;
and classifying the path information according to the driving direction through a trajectory classifier and the path characteristic data to obtain a path classification set.
4. The method for acquiring traffic information according to claim 1, wherein the acquiring a simplified track sequence of a vehicle in an electronic police surveillance video, matching the simplified track sequence of the vehicle with the path classification set, and extracting vehicle attribute information to obtain the traffic information with the vehicle attribute information comprises:
acquiring an electronic police monitoring video, processing the electronic police monitoring video through a multi-target tracking model to obtain a detection frame coordinate set of a vehicle, a tracking identification number of the vehicle and output a video frame set;
acquiring a picture and vehicle attribute information of the vehicle according to the detection frame coordinate set, the video frame set and the attribute analysis network model of the vehicle;
identifying the picture of the vehicle according to a license plate detection and identification algorithm to obtain the license plate number of the vehicle;
storing the tracking identification number, the picture of the vehicle, the license plate number of the vehicle and the vehicle attribute information in a first record table in an associated manner;
obtaining a simplified track sequence of the vehicle, matching the simplified track sequence of the vehicle with the path classification set to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle;
and counting the passing vehicles in the electronic monitoring video through the first recording list and the path types of the vehicles to obtain the traffic flow information with the vehicle attribute information.
5. The method of claim 4, wherein the obtaining the picture of the vehicle and the vehicle attribute information according to the detection frame coordinate set of the vehicle, the video frame set and the attribute analysis network model comprises:
according to the coordinate set of the detection frame of the vehicle, capturing a picture of the vehicle from the video frame set;
and performing attribute analysis on the picture of the vehicle according to an attribute analysis network model, and taking the result of the attribute analysis as the extracted vehicle attribute information.
6. The method of claim 4, wherein the obtaining the simplified track sequence of the vehicle, matching the simplified track sequence of the vehicle with the path classification set to obtain a vehicle track classification result, and using the vehicle track classification result as the path type of the vehicle comprises:
when the vehicle disappears in any video frame in the video frame set, acquiring a simplified track sequence of the vehicle;
and matching the simplified track sequence of the vehicle with the paths in the path classification set by a track similarity measurement method to obtain a vehicle track classification result, and taking the vehicle track classification result as the path type of the vehicle.
7. A storage medium having stored thereon a plurality of instructions adapted to be loaded and executed by a processor to perform the steps of a method of obtaining traffic information according to any of claims 1-6.
8. A terminal, comprising: a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to call instructions in the storage medium to implement the steps of a method of obtaining traffic information according to any of the preceding claims 1-6.
CN202011205030.8A 2020-11-02 2020-11-02 Method, terminal and storage medium for acquiring traffic flow information Active CN112562315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011205030.8A CN112562315B (en) 2020-11-02 2020-11-02 Method, terminal and storage medium for acquiring traffic flow information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011205030.8A CN112562315B (en) 2020-11-02 2020-11-02 Method, terminal and storage medium for acquiring traffic flow information

Publications (2)

Publication Number Publication Date
CN112562315A CN112562315A (en) 2021-03-26
CN112562315B true CN112562315B (en) 2022-04-01

Family

ID=75041534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011205030.8A Active CN112562315B (en) 2020-11-02 2020-11-02 Method, terminal and storage medium for acquiring traffic flow information

Country Status (1)

Country Link
CN (1) CN112562315B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115050161B (en) * 2022-03-30 2023-10-13 兰州乐智教育科技有限责任公司 Position monitoring alarm method and device, electronic equipment and storage medium
CN114495509B (en) * 2022-04-08 2022-07-12 四川九通智路科技有限公司 Method for monitoring tunnel running state based on deep neural network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930668A (en) * 2009-04-29 2010-12-29 上海电器科学研究所(集团)有限公司 Road traffic OD (Optical Density) information collection system for license plate recognition and processing method thereof
CN108133172A (en) * 2017-11-16 2018-06-08 北京华道兴科技有限公司 Method, the analysis method of vehicle flowrate and the device that Moving Objects are classified in video
CN108717790A (en) * 2018-07-06 2018-10-30 广州市交通运输研究所 A kind of vehicle driving analysis method based on bayonet license plate identification data
CN110276973A (en) * 2019-07-22 2019-09-24 福建工程学院 A kind of crossing traffic rule automatic identifying method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7340341B2 (en) * 2003-06-11 2008-03-04 Matsushita Electric Industrial Co., Ltd. Digital map position information compressing method and device
AU2011294891B2 (en) * 2010-08-23 2015-01-29 Mbda Uk Limited Guidance method and apparatus
CN103514233B (en) * 2012-06-29 2018-06-12 北京百度网讯科技有限公司 A kind of track data check method and device
CN103605362B (en) * 2013-09-11 2016-03-02 天津工业大学 Based on motor pattern study and the method for detecting abnormality of track of vehicle multiple features
CN103761739B (en) * 2014-01-23 2016-09-28 武汉大学 A kind of Image registration method optimized based on half global energy
CN103927895B (en) * 2014-04-25 2015-11-11 清华大学 A kind of vehicle bend based on bus or train route/car car communication passes through backup system
CN106370190B (en) * 2015-07-20 2019-05-28 腾讯科技(深圳)有限公司 Automobile navigation, position mark method, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930668A (en) * 2009-04-29 2010-12-29 上海电器科学研究所(集团)有限公司 Road traffic OD (Optical Density) information collection system for license plate recognition and processing method thereof
CN108133172A (en) * 2017-11-16 2018-06-08 北京华道兴科技有限公司 Method, the analysis method of vehicle flowrate and the device that Moving Objects are classified in video
CN108717790A (en) * 2018-07-06 2018-10-30 广州市交通运输研究所 A kind of vehicle driving analysis method based on bayonet license plate identification data
CN110276973A (en) * 2019-07-22 2019-09-24 福建工程学院 A kind of crossing traffic rule automatic identifying method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种新颖的基于轨迹分析和类型识别的车流量统计方法;白天等;《计算机应用与软件》;20161215(第12期);全文 *
基于道路特征的海量GPS监控数据压缩方法;李清泉等;《武汉大学学报(信息科学版)》;20080405(第04期);全文 *
基于集成聚类的交叉口车辆行驶路径提取方法;尹卓等;《计算机应用与软件》;20200712(第07期);全文 *

Also Published As

Publication number Publication date
CN112562315A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US9679203B2 (en) Traffic violation detection
CN109948582B (en) Intelligent vehicle reverse running detection method based on tracking trajectory analysis
CN109977782B (en) Cross-store operation behavior detection method based on target position information reasoning
CN111652912B (en) Vehicle counting method and system, data processing equipment and intelligent shooting equipment
Mallikarjuna et al. Traffic data collection under mixed traffic conditions using video image processing
Atkočiūnas et al. Image processing in road traffic analysis
Chang et al. Video analytics in smart transportation for the AIC'18 challenge
Giannakeris et al. Speed estimation and abnormality detection from surveillance cameras
EP2709066A1 (en) Concept for detecting a motion of a moving object
CN111898491B (en) Identification method and device for reverse driving of vehicle and electronic equipment
Laureshyn et al. Application of automated video analysis for behavioural studies: concept and experience
CN106372619B (en) A kind of detection of vehicle robust and divided lane reach summation curve estimation method
CN112562315B (en) Method, terminal and storage medium for acquiring traffic flow information
Gupta et al. Computer vision based animal collision avoidance framework for autonomous vehicles
CN116311166A (en) Traffic obstacle recognition method and device and electronic equipment
Yuliandoko et al. Automatic vehicle counting using Raspberry pi and background subtractions method in the sidoarjo toll road
CN114241373A (en) End-to-end vehicle behavior detection method, system, equipment and storage medium
Wang et al. A vision-based method for parking space surveillance and parking lot management
Shinde et al. Traffic optimization algorithms in optical networks for real time traffic analysis
Lim et al. On vehicle state tracking for long-term carpark video surveillance
Pandilwar et al. Moving Vehicle Detection with Real Time Speed Estimation Using Deep Learning Techniques
CN113822367A (en) Regional behavior analysis method, system and medium based on human face
Malinovskiy et al. A simple and model-free algorithm for real-time pedestrian detection and tracking
Lashkov et al. Computing‐efficient video analytics for nighttime traffic sensing
Ouseph et al. Machine Learning Based Smart Parking Management for Intelligent Transportation Systems

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210326

Assignee: QINGDAO HISENSE TRANSTECH Co.,Ltd.

Assignor: PENGCHENG LAB

Contract record no.: X2024980000954

Denomination of invention: A method, terminal, and storage medium for obtaining traffic flow information

Granted publication date: 20220401

License type: Common License

Record date: 20240118

EE01 Entry into force of recordation of patent licensing contract