CN110838233A - Vehicle behavior analysis method and device and computer readable storage medium - Google Patents

Vehicle behavior analysis method and device and computer readable storage medium Download PDF

Info

Publication number
CN110838233A
CN110838233A CN201910975815.4A CN201910975815A CN110838233A CN 110838233 A CN110838233 A CN 110838233A CN 201910975815 A CN201910975815 A CN 201910975815A CN 110838233 A CN110838233 A CN 110838233A
Authority
CN
China
Prior art keywords
vehicle
area
lane
lane line
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910975815.4A
Other languages
Chinese (zh)
Other versions
CN110838233B (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201910975815.4A priority Critical patent/CN110838233B/en
Publication of CN110838233A publication Critical patent/CN110838233A/en
Application granted granted Critical
Publication of CN110838233B publication Critical patent/CN110838233B/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
    • G08G1/0125Traffic data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road

Abstract

The invention relates to an image detection technology, and discloses a vehicle behavior analysis method, a device and a computer readable storage medium, wherein the method comprises the following steps: acquiring a running track of a vehicle in a monitoring picture road of a monitoring video; counting the frequency of the running track of the vehicle in the first time period at each point of the monitoring picture road; screening out vehicle track points meeting the driving requirements in a specified lane line; calculating a boundary area where the vehicle runs, and acquiring a road area where the vehicle runs; acquiring an initial lane line; analyzing vehicle track points of an initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas; keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area; and determining the abnormal driving behavior of the vehicle according to the traveling track of the vehicle on the basis of all the lane lines in the initial lane line area.

Description

Vehicle behavior analysis method and device and computer readable storage medium
Technical Field
The present invention relates to the field of vehicle driving, and in particular, to a method and an apparatus for analyzing vehicle behavior, and a computer-readable storage medium.
Background
Traffic congestion and frequent accidents currently afflict China and even people all over the world, and are just a big social public nuisance, in recent years, the number of vehicles in China is increased sharply, but road traffic management is relatively lagged, and the traffic accidents therewith are increased rapidly, so that powerful traffic monitoring means are urgently needed, and although video monitoring is used in many cities at present, an effective automatic event detection method is lacked.
The existing analysis of abnormal behaviors of vehicles is mainly concentrated on traffic lights, and traffic violation shooting and evidence collection are mainly carried out by a gunlock which is over against a road, so that extensive roadside cameras cannot be called for evidence collection; in addition, for some roads, the vehicle behavior judgment after the lane line is blocked may be abnormal.
Disclosure of Invention
The invention provides a vehicle behavior analysis method, a vehicle behavior analysis device and a computer readable storage medium, and mainly aims to enlarge the monitoring range of abnormal behaviors of a vehicle and more standardize the driving behavior of a vehicle owner.
In order to achieve the above object, the present invention provides a vehicle behavior analysis method including:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
Optionally, the step of acquiring an initial lane line based on the road region where the vehicle is traveling, the initial lane line being acquired by detecting and screening out straight line segments of the road region where the vehicle is traveling, the straight line segments being greater than a reference length includes:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
Optionally, the step of retaining the straight line segments of the initial lane line in the initial lane line region, and obtaining all lane lines in the initial lane line region by performing statistics on the straight line segments in each direction includes:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
Optionally, the abnormal driving behavior of the vehicle includes a reverse driving, lane change, and violation of parking of the vehicle.
Optionally, the vehicle behavior analysis method further includes:
and repeating the steps after a certain time to obtain all lane lines from the beginning to the current, comparing the difference between the lane lines at the current time and the lane lines at the last time, if the difference is larger, continuously acquiring the lane lines, and if the difference is not larger, taking the lane lines at the current time as the lane lines in the monitoring road.
The present invention also provides an electronic device comprising a memory and a processor, the memory having stored thereon a vehicle behavior analysis program operable on the processor, the vehicle behavior analysis program when executed by the processor implementing the steps of:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
Optionally, the step of acquiring an initial lane line based on the road region where the vehicle is traveling, the initial lane line being acquired by detecting and screening out straight line segments of the road region where the vehicle is traveling, the straight line segments being greater than a reference length includes:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
Optionally, the step of retaining the straight line segments of the initial lane line in the initial lane line region, and obtaining all lane lines in the initial lane line region by performing statistics on the straight line segments in each direction includes:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
Optionally, the abnormal driving behavior of the vehicle includes a reverse driving, lane change, and violation of parking of the vehicle.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having a vehicle behavior analysis program stored thereon, the vehicle behavior analysis program being executable by one or more processors to implement the steps of the vehicle behavior analysis method described above.
The vehicle behavior analysis method, the vehicle behavior analysis device and the computer-readable storage medium mainly determine the lane line area by the advancing track of the vehicle, and detect the straight line segment in the road as the auxiliary, so that the problem that the traditional camera only detects the lane line in the straight line road right above the road can be solved, and the problem that the camera detects the lane line on the roadside, such as shooting by various ball machines, can be solved; under the condition that the lane lines in the road are obvious or fuzzy, the lane line detection in the road can be better solved; the invention can simulate the lane lines in the lane area under the condition that the lane lines are basically fuzzy, and can be used as the reference for vehicle behavior analysis, so that a plurality of cameras which are not arranged above the lane area can be incorporated into a vehicle behavior monitoring system, the monitoring range of abnormal behaviors of the vehicle is enlarged, and the driving behavior of a vehicle owner can be more standardized.
Drawings
Fig. 1 is a schematic flow chart of a vehicle behavior analysis method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an internal structure of an electronic device according to an embodiment of the invention;
fig. 3 is a schematic block diagram of a vehicle behavior analysis program in an electronic device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a vehicle behavior analysis method. Fig. 1 is a schematic flow chart of a vehicle behavior analysis method according to an embodiment of the present invention. The method may be performed by a device, which may be implemented by software and/or hardware, and in this embodiment, the device is an intelligent terminal.
In this embodiment, the vehicle behavior analysis method includes:
s101, acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
s102, counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
s103, screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
s104, calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
s105, acquiring an initial lane line based on the road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
s106, analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
s107, keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and S108, determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
The step of acquiring an initial lane line based on a road region where the vehicle is traveling, the step of acquiring the initial lane line by detecting straight line segments of the road region where the vehicle is traveling and screening out straight line segments larger than a reference length, includes:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
Wherein the step of screening straight line segments comprises:
detecting a straight line segment in a straight line segment of a road area where the vehicle runs, acquiring a straight line segment parameter set L1, and drawing all parameter representation line segments in the straight line segment parameter set L1 in a sampling image, wherein the steps are as follows:
collecting a pair of row coordinates and column coordinates of all white points, storing the row coordinates and the column coordinates of each white point in a pair to obtain a coordinate set C1, creating a parameter space matrix D with the total row number of 181, the total column number of 2 x (M5+ M6), and the initial values of all elements of 0;
if the coordinate set C1 is an empty set, a straight-line segment parameter set L1 is obtained, each line segment in the straight-line segment parameter set L1 is represented by 4 parameters of two endpoint coordinates (xstart, i, ystart, i), (xend, i, yend, i), the parameters of each line segment are taken as a group of parameters, N1 groups are shared, and the screening of the straight-line segment is ended, otherwise, a pair of row coordinates xp and column coordinates yp in C1 are randomly extracted, and the currently extracted row coordinates xp and column coordinates yp are removed from the coordinate set C1;
the pair of line coordinates xp and column coordinates yp extracted currently are transformed according to the following formula:
ρ=xp·cos(θ)+yp·sin(θ),θ=0°,1°,2°,…,180°
obtaining 181 groups of rho and theta in total, adding 1 to the elements of the theta +1 th row and the [ rho ] + M5+ M6 column in the parameter space matrix D, wherein [ rho ] represents that rho is taken as an integer, then finding out the row coordinate theta M +1 and the column coordinate rho M + M5+ M6 where the maximum value max and the maximum value max of all elements in the parameter space matrix D are located, judging whether the maximum value max is greater than a given threshold value 50, and if so, entering the next step;
substituting the row coordinate θ m and the column coordinate ρ m in which the maximum value max of all elements in the parameter space matrix D is located into the following formula: obtaining a straight line equation ρ m in the lane line as x5 · cos (θ m) + y5 · sin (θ m), then searching for a white point along the straight line of ρ m as x5 · cos (θ m) + y5 · sin (θ m) with the pixel point corresponding to the pair of line coordinates xp and column coordinates yp extracted currently as a starting point in the lane line, ending the search when an image boundary or the number of continuous black points exceeds 50, obtaining two end point coordinates of a white straight line segment and the line coordinates and column coordinates of N white points on the white straight line segment, recording the two end point coordinates (xstart, i, ystart, i), (xend, i, yend, i), then removing the line coordinates and column coordinates of the N white point in the white line set C1 which have been determined, and each pair of row coordinates xi and column coordinates yi of the N white points that have been determined to belong to this line segment, i being a positive integer, i being 1,2, …, N, is transformed according to the formula ρ ═ xi · cos (θ) + yi · sin (θ), θ being 0 °,1 °,2 °, …,180 °, then the elements of the θ +1 th row and the [ ρ ] + M5+ M6 column in the parameter space matrix D are subtracted by 1, and if the distance between the two end points on the current straight-line segment is less than 100 pixels, the row coordinates and column coordinates of the N white points that have been determined to belong to the current straight-line segment in the coordinate set C1 are directly removed.
The step of reserving the straight line segments of the initial lane line in the initial lane line area and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area comprises the following steps:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
The abnormal driving behaviors of the vehicle comprise the vehicle running backwards, lane changing and stopping.
The vehicle behavior analysis method comprises the steps of detecting vehicles in a monitoring video through a deep learning vehicle model; through experimental result analysis, the detection rate of the model for the vehicle can reach more than 98%, and based on the credible result, the driving behavior is judged by using the steps.
The road area may be identified as la (lane area), the initial lane Line may be identified as oll (originalalane Line), the initial lane Line area may be identified as lla (lane Line area), all lane lines may be identified as lls (lane lines), and the lane Line between lanes may be identified as ll (lane Line).
The vehicle behavior analysis method further includes:
and repeating the steps after a certain time to obtain all lane lines from the beginning to the current, comparing the difference between the lane lines at the current time and the lane lines at the last time, if the difference is larger, continuously acquiring the lane lines, and if the difference is not larger, taking the lane lines at the current time as the lane lines in the monitoring road.
The abnormal driving behavior of the vehicle comprises a line pressing driving behavior of the vehicle, the line pressing driving behavior of the vehicle is determined according to whether intersection points exist between the traveling track of the vehicle and all lane lines in the initial lane line area, if yes, the current line pressing behavior of the vehicle is judged, and if not, the current line pressing behavior of the vehicle is judged.
The vehicle behavior analysis method provided by the embodiment determines the lane line area by the advancing track of the vehicle as the main part, and detects the straight line segment in the road as the auxiliary part, so that the problem that the traditional camera only detects the lane line in the straight line road right above the road can be solved, and the problem that the camera detects the lane line on the roadside can be solved, for example, the shooting of various ball machines can be solved; under the condition that the lane lines in the road are obvious or fuzzy, the lane line detection in the road can be better solved; the invention can simulate the lane lines in the lane area under the condition that the lane lines are basically fuzzy, and can be used as the reference for vehicle behavior analysis, so that a plurality of cameras which are not arranged above the lane area can be incorporated into a vehicle behavior monitoring system, the monitoring range of abnormal behaviors of the vehicle is enlarged, and the driving behavior of a vehicle owner can be more standardized.
The invention also provides an electronic device 1. Fig. 2 is a schematic view of an internal structure of an electronic device according to an embodiment of the invention.
In this embodiment, the electronic device 1 may be a computer, an intelligent terminal or a server. The electronic device 1 comprises at least a memory 11, a processor 13, a communication bus 15, and a network interface 17. In this embodiment, the electronic device 1 is an intelligent terminal.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a hard disk of the electronic device. The memory 11 may be an external storage device of the electronic apparatus in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash Card (FlashCard), and the like, which are provided on the electronic apparatus. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic apparatus. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the vehicle behavior analysis program 111, but also to temporarily store data that has been output or is to be output.
The processor 13 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data.
The communication bus 15 is used to realize connection communication between these components.
The network interface 17 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the electronic apparatus 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device and for displaying a visualized user interface.
While FIG. 2 shows only the electronic device 1 with the components 11-17, those skilled in the art will appreciate that the configuration shown in FIG. 2 does not constitute a limitation of the electronic device, and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
In the embodiment of the electronic device 1 shown in fig. 2, a vehicle behavior analysis program 111 is stored in the memory 11; the processor 13 implements the following steps when executing the vehicle behavior analysis program 111 stored in the memory 11:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
The step of acquiring an initial lane line based on a road region where the vehicle is traveling, the step of acquiring the initial lane line by detecting straight line segments of the road region where the vehicle is traveling and screening out straight line segments larger than a reference length, includes:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
Wherein the step of screening straight line segments comprises:
detecting a straight line segment in a straight line segment of a road area where the vehicle runs, acquiring a straight line segment parameter set L1, and drawing all parameter representation line segments in the straight line segment parameter set L1 in a sampling image, wherein the steps are as follows:
collecting a pair of row coordinates and column coordinates of all white points, storing the row coordinates and the column coordinates of each white point in a pair to obtain a coordinate set C1, creating a parameter space matrix D with the total row number of 181, the total column number of 2 x (M5+ M6), and the initial values of all elements of 0;
if the coordinate set C1 is an empty set, a straight-line segment parameter set L1 is obtained, each line segment in the straight-line segment parameter set L1 is represented by 4 parameters of two endpoint coordinates (xstart, i, ystart, i), (xend, i, yend, i), the parameters of each line segment are taken as a group of parameters, N1 groups are shared, and the screening of the straight-line segment is ended, otherwise, a pair of row coordinates xp and column coordinates yp in C1 are randomly extracted, and the currently extracted row coordinates xp and column coordinates yp are removed from the coordinate set C1;
the pair of line coordinates xp and column coordinates yp extracted currently are transformed according to the following formula:
ρ=xp·cos(θ)+yp·sin(θ),θ=0°,1°,2°,…,180°
obtaining 181 groups of rho and theta in total, adding 1 to the elements of the theta +1 th row and the [ rho ] + M5+ M6 column in the parameter space matrix D, wherein [ rho ] represents that rho is taken as an integer, then finding out the row coordinate theta M +1 and the column coordinate rho M + M5+ M6 where the maximum value max and the maximum value max of all elements in the parameter space matrix D are located, judging whether the maximum value max is greater than a given threshold value 50, and if so, entering the next step;
substituting the row coordinate θ m and the column coordinate ρ m in which the maximum value max of all elements in the parameter space matrix D is located into the following formula: obtaining a straight line equation ρ m in the lane line as x5 · cos (θ m) + y5 · sin (θ m), then searching for a white point along the straight line of ρ m as x5 · cos (θ m) + y5 · sin (θ m) with the pixel point corresponding to the pair of line coordinates xp and column coordinates yp extracted currently as a starting point in the lane line, ending the search when an image boundary or the number of continuous black points exceeds 50, obtaining two end point coordinates of a white straight line segment and the line coordinates and column coordinates of N white points on the white straight line segment, recording the two end point coordinates (xstart, i, ystart, i), (xend, i, yend, i), then removing the line coordinates and column coordinates of the N white point in the white line set C1 which have been determined, and each pair of row coordinates xi and column coordinates yi of the N white points that have been determined to belong to this line segment, i being a positive integer, i being 1,2, …, N, is transformed according to the formula ρ ═ xi · cos (θ) + yi · sin (θ), θ being 0 °,1 °,2 °, …,180 °, then the elements of the θ +1 th row and the [ ρ ] + M5+ M6 column in the parameter space matrix D are subtracted by 1, and if the distance between the two end points on the current straight-line segment is less than 100 pixels, the row coordinates and column coordinates of the N white points that have been determined to belong to the current straight-line segment in the coordinate set C1 are directly removed.
The step of reserving the straight line segments of the initial lane line in the initial lane line area and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area comprises the following steps:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
The abnormal driving behaviors of the vehicle comprise the vehicle running backwards, lane changing and stopping.
The vehicle behavior analysis method comprises the steps of detecting vehicles in a monitoring video through a deep learning vehicle model; through experimental result analysis, the detection rate of the model for the vehicle can reach more than 98%, and based on the credible result, the driving behavior is judged by using the steps.
The road area may be identified as la (lane area), the initial lane Line may be identified as oll (originalalane Line), the initial lane Line area may be identified as lla (lane Line area), all lane lines may be identified as lls (lane lines), and the lane Line between lanes may be identified as ll (lane Line).
The processor 13, when executing the vehicle behavior analysis program 111 stored in the memory 11, further implements the steps of:
and repeating the steps after a certain time to obtain all lane lines from the beginning to the current, comparing the difference between the lane lines at the current time and the lane lines at the last time, if the difference is larger, continuously acquiring the lane lines, and if the difference is not larger, taking the lane lines at the current time as the lane lines in the monitoring road.
The abnormal driving behavior of the vehicle comprises a line pressing driving behavior of the vehicle, the line pressing driving behavior of the vehicle is determined according to whether intersection points exist between the traveling track of the vehicle and all lane lines in the initial lane line area, if yes, the current line pressing behavior of the vehicle is judged, and if not, the current line pressing behavior of the vehicle is judged.
The electronic device provided by the embodiment determines the lane line area by the advancing track of the vehicle as the main part, and detects the straight line segment in the road as the auxiliary part, so that the problem that the traditional camera only detects the lane line in the straight line road directly above the road can be solved, and the problem that the camera detects the lane line on the roadside, such as shooting by various ball machines, can be solved; under the condition that the lane lines in the road are obvious or fuzzy, the lane line detection in the road can be better solved; the invention can simulate the lane lines in the lane area under the condition that the lane lines are basically fuzzy, and can be used as the reference for vehicle behavior analysis, so that a plurality of cameras which are not arranged above the lane area can be incorporated into a vehicle behavior monitoring system, the monitoring range of abnormal behaviors of the vehicle is enlarged, and the driving behavior of a vehicle owner can be more standardized.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, where a vehicle behavior analysis program 111 is stored on the computer-readable storage medium, where the vehicle behavior analysis program 111 is executable by one or more processors to implement the following operations:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
The embodiment of the computer readable storage medium of the present invention is substantially the same as the embodiments of the electronic device and the method, and will not be described herein in a repeated manner.
Alternatively, in other embodiments, the vehicle behavior analysis program 111 may be divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 13) to implement the present invention, where the module referred to in the present invention refers to a series of instruction segments of a computer program capable of performing a specific function for describing the execution process of the vehicle behavior analysis program in an electronic device.
For example, referring to fig. 3, a schematic diagram of program modules of a vehicle behavior analysis program 111 for centrally purchasing evaluation indexes of medical instruments in an embodiment of the electronic device according to the present invention is shown, in this embodiment, the vehicle behavior analysis program 111 may be divided into a first obtaining module 10, a statistical module 20, a screening module 30, a calculating module 40, a second obtaining module 50, an analyzing module 60, a retaining module 70, and a determining module 80, for example:
the first obtaining module 10 is configured to obtain a running track of a vehicle on a monitoring image road of a monitoring video;
the statistical module 20 is configured to count the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, where the first time period is a time period in which the number of vehicles running in the monitoring video is greater than that in other time periods;
the screening module 30 is configured to screen out vehicle track points meeting a driving requirement in a specified lane line based on a preset frequency threshold, where the frequency threshold is set based on a driving track of most vehicles in the surveillance video, where the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
the calculating module 40 is configured to calculate a boundary area where the vehicle runs based on the area of the vehicle track point, and acquire a road area where the vehicle runs;
the second obtaining module 50 is configured to obtain an initial lane line based on a road area where the vehicle is traveling, where the initial lane line is obtained by detecting a straight line segment of the road area where the vehicle is traveling and screening out a straight line segment with a length greater than a reference length;
the analysis module 60 is configured to analyze the vehicle track points in the initial lane line region to obtain an initial lane line region, where the initial lane line region is located between two lane track point regions;
the reserving module 70 is configured to reserve straight line segments of the initial lane line in the initial lane line region, and count the straight line segments in each direction to obtain all lane lines in the initial lane line region;
the determining module 80 is configured to determine the abnormal driving behavior of the vehicle according to the traveling track of the vehicle based on all lane lines in the initial lane line region.
The functions or operation steps of the first obtaining module 10, the counting module 20, the screening module 30, the calculating module 40, the second obtaining module 50, the analyzing module 60, the reserving module 70, and the determining module 80, which are implemented when the program modules are executed, are substantially the same as those of the above embodiments, and are not described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A vehicle behavior analysis method, comprising:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
2. The vehicle behavior analysis method according to claim 1, wherein the step of acquiring an initial lane line based on a road region on which the vehicle travels, the initial lane line being acquired by detecting straight line segments of the road region on which the vehicle travels and screening out straight line segments larger than a reference length, further comprises:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
3. The vehicle behavior analysis method according to claim 2, wherein the step of retaining straight line segments of the initial lane line in the initial lane line region and counting the straight line segments in each direction to obtain all lane lines in the initial lane line region comprises:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
4. The vehicle behavior analysis method according to claim 1, wherein the abnormal traveling behavior of the vehicle includes a reverse traveling, a lane change, and an violation of a stop of the vehicle.
5. The vehicle behavior analysis method according to claim 1, characterized by further comprising:
and repeating the steps after a certain time to obtain all lane lines from the beginning to the current, comparing the difference between the lane lines at the current time and the lane lines at the last time, if the difference is larger, continuously acquiring the lane lines, and if the difference is not larger, taking the lane lines at the current time as the lane lines in the monitoring road.
6. An electronic device comprising a memory and a processor, the memory having stored thereon a vehicle behavior analysis program operable on the processor, the vehicle behavior analysis program when executed by the processor implementing the steps of:
acquiring a running track of a vehicle in a monitoring picture road of a monitoring video;
counting the frequency of the running track of the vehicle appearing at each point in the monitoring picture road in a first time period, wherein the first time period is a time period in which the number of the running vehicles in the monitoring video is larger than that in other time periods;
screening out vehicle track points meeting the driving requirement in a specified lane line based on a preset frequency threshold value, wherein the frequency threshold value is set based on the driving track of most vehicles in the surveillance video in the specified lane line, and the number of the most vehicles is more than half of the total number of the vehicles in the surveillance video;
calculating a boundary area where the vehicle runs based on the area of the vehicle track point, and acquiring a road area where the vehicle runs;
acquiring an initial lane line based on a road area where the vehicle runs, wherein the initial lane line is acquired by detecting straight line sections of the road area where the vehicle runs and screening out straight line sections with length larger than a reference length;
analyzing the vehicle track points of the initial lane line area to obtain an initial lane line area, wherein the initial lane line area is positioned between two lane track point areas;
keeping straight line segments of the initial lane line in the initial lane line area, and counting the straight line segments in all directions to obtain all lane lines in the initial lane line area;
and determining abnormal driving behaviors of the vehicle according to the traveling track of the vehicle on the basis of all lane lines in the initial lane line area.
7. The electronic device according to claim 6, wherein the step of acquiring an initial lane line based on a road region on which the vehicle travels, the initial lane line being acquired by detecting a straight line segment of the road region on which the vehicle travels and screening out a straight line segment larger than a reference length, further comprises:
and fitting two parallel line segments in the middle of the interval area of two adjacent road areas based on the intersection area of the lane line in the lane to be used as the lane line between the lanes, and calculating the lane lines of all the two adjacent road areas to obtain all the lane lines in the road.
8. The electronic device according to claim 7, wherein the step of keeping the straight line segments of the initial lane line in the primary lane line area and counting the straight line segments in each direction to obtain all lane lines in the primary lane line area comprises:
and screening the initial lane lines according to the initial lane line area, reserving straight line segments in the initial lane line area, then counting the lengths of the straight line segments in all directions in each initial lane line area, selecting two straight line segment directions which are longer in extension length, basically consistent in direction and not intersected with the lane area in the lane line area, and extending the straight line segments to obtain all lane lines in the initial lane line area.
9. The electronic device according to claim 6, wherein the abnormal driving behavior of the vehicle includes a retrograde motion, a lane change, and a violation of a stop of the vehicle.
10. A computer-readable storage medium having stored thereon a vehicle behavior analysis program executable by one or more processors to implement the steps of the vehicle behavior analysis method according to any one of claims 1 to 5.
CN201910975815.4A 2019-10-12 2019-10-12 Vehicle behavior analysis method and device and computer readable storage medium Active CN110838233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910975815.4A CN110838233B (en) 2019-10-12 2019-10-12 Vehicle behavior analysis method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910975815.4A CN110838233B (en) 2019-10-12 2019-10-12 Vehicle behavior analysis method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110838233A true CN110838233A (en) 2020-02-25
CN110838233B CN110838233B (en) 2022-09-27

Family

ID=69575373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910975815.4A Active CN110838233B (en) 2019-10-12 2019-10-12 Vehicle behavior analysis method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110838233B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112071058A (en) * 2020-08-14 2020-12-11 深延科技(北京)有限公司 Road traffic monitoring and vehicle abnormity, contraband and fire detection method and system based on deep learning
CN112230663A (en) * 2020-10-28 2021-01-15 腾讯科技(深圳)有限公司 Vehicle positioning data monitoring method and device
CN112528807A (en) * 2020-12-04 2021-03-19 深圳市优必选科技股份有限公司 Method and device for predicting driving track, electronic equipment and storage medium
CN113479191A (en) * 2021-06-30 2021-10-08 重庆长安汽车股份有限公司 Lane-line-free lane boundary detection system and method for parking and vehicle
CN113780386A (en) * 2021-08-30 2021-12-10 浪潮软件科技有限公司 Analysis method and device for vehicle track characteristics and computer readable medium
CN115050190A (en) * 2022-06-13 2022-09-13 天翼数字生活科技有限公司 Road vehicle monitoring method and related device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009140008A (en) * 2007-12-03 2009-06-25 Sumitomo Electric Ind Ltd Dangerous traveling information provision device, dangerous traveling decision program and dangerous traveling decision method
CN105740809A (en) * 2016-01-28 2016-07-06 东南大学 Expressway lane line detection method based on onboard camera
CN107918763A (en) * 2017-11-03 2018-04-17 深圳星行科技有限公司 Method for detecting lane lines and system
CN109760677A (en) * 2019-03-13 2019-05-17 广州小鹏汽车科技有限公司 A kind of lane keeps householder method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009140008A (en) * 2007-12-03 2009-06-25 Sumitomo Electric Ind Ltd Dangerous traveling information provision device, dangerous traveling decision program and dangerous traveling decision method
CN105740809A (en) * 2016-01-28 2016-07-06 东南大学 Expressway lane line detection method based on onboard camera
CN107918763A (en) * 2017-11-03 2018-04-17 深圳星行科技有限公司 Method for detecting lane lines and system
CN109760677A (en) * 2019-03-13 2019-05-17 广州小鹏汽车科技有限公司 A kind of lane keeps householder method and system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112071058A (en) * 2020-08-14 2020-12-11 深延科技(北京)有限公司 Road traffic monitoring and vehicle abnormity, contraband and fire detection method and system based on deep learning
CN112230663A (en) * 2020-10-28 2021-01-15 腾讯科技(深圳)有限公司 Vehicle positioning data monitoring method and device
CN112230663B (en) * 2020-10-28 2023-11-10 腾讯科技(深圳)有限公司 Method and device for monitoring vehicle positioning data
CN112528807A (en) * 2020-12-04 2021-03-19 深圳市优必选科技股份有限公司 Method and device for predicting driving track, electronic equipment and storage medium
CN112528807B (en) * 2020-12-04 2023-12-19 深圳市优必选科技股份有限公司 Method and device for predicting running track, electronic equipment and storage medium
CN113479191A (en) * 2021-06-30 2021-10-08 重庆长安汽车股份有限公司 Lane-line-free lane boundary detection system and method for parking and vehicle
CN113479191B (en) * 2021-06-30 2023-04-07 重庆长安汽车股份有限公司 Lane-line-free lane boundary detection system and method for parking and vehicle
CN113780386A (en) * 2021-08-30 2021-12-10 浪潮软件科技有限公司 Analysis method and device for vehicle track characteristics and computer readable medium
CN113780386B (en) * 2021-08-30 2023-07-18 浪潮软件科技有限公司 Analysis method and device for vehicle track characteristics and computer readable medium
CN115050190A (en) * 2022-06-13 2022-09-13 天翼数字生活科技有限公司 Road vehicle monitoring method and related device thereof
CN115050190B (en) * 2022-06-13 2024-01-23 天翼数字生活科技有限公司 Road vehicle monitoring method and related device thereof

Also Published As

Publication number Publication date
CN110838233B (en) 2022-09-27

Similar Documents

Publication Publication Date Title
CN110838233B (en) Vehicle behavior analysis method and device and computer readable storage medium
CN106373426B (en) Parking stall based on computer vision and violation road occupation for parking monitoring method
EP3806064B1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
KR102197946B1 (en) object recognition and counting method using deep learning artificial intelligence technology
CN109615864A (en) Vehicle congestion analysis method, system, terminal and storage medium based on video structural
WO2021073267A1 (en) Image recognition-based method and device for detecting pedestrian crossing during red light, and related apparatus
JP2023527265A (en) Method and device for detecting traffic abnormality, electronic device, storage medium and computer program
CN111383460B (en) Vehicle state discrimination method and device and computer storage medium
JP2002109547A (en) Moving body detection measurement method, its device and recording medium having moving body detection measurement program recorded therein
CN112651293B (en) Video detection method for road illegal spreading event
CN112509325B (en) Video deep learning-based off-site illegal automatic discrimination method
JP2019185463A (en) Parking management system and parking management method
CN112950907A (en) Early warning method, device, equipment and medium
CN112349087B (en) Visual data input method based on holographic perception of intersection information
CN113903008A (en) Ramp exit vehicle violation identification method based on deep learning and trajectory tracking
CN113450571B (en) Traffic intersection-based driving direction reminding method and device and storage medium
CN112906428B (en) Image detection region acquisition method and space use condition judgment method
CN113192016A (en) Method, device and equipment for detecting abnormal deformation of conveyor belt and storage medium
CN114694370A (en) Method, device, computing equipment and storage medium for displaying intersection traffic flow
CN114743403B (en) Intelligent parking system based on computer vision algorithm
CN110660225A (en) Red light running behavior detection method, device and equipment
CN114882709A (en) Vehicle congestion detection method and device and computer storage medium
CN114494968A (en) Method and device for identifying abnormal intrusion behavior in forbidden area
Arul et al. Modelling and Simulation of Smart Traffic Light System for Emergency Vehicle using Image Processing Techniques
Bachtiar et al. Parking management by means of computer vision

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