The invention comprises the following steps:
Aiming at the defects and shortcomings in the prior art, the invention provides a traffic event multi-dimensional dynamic management and control method based on traffic flow monitoring, which is used for acquiring various characteristics of vehicles and personnel in a detected road section by means of an artificial intelligent algorithm and realizing efficient, rapid and automatic judgment of traffic events based on the characteristics, thereby achieving the purposes of improving detection efficiency and reducing manpower consumption.
The invention is achieved by the following measures:
the traffic event multidimensional dynamic management and control method based on traffic flow monitoring is characterized by comprising the following steps of:
The method comprises the steps of 1, continuously acquiring and storing detection data in a detection area, wherein the speed (including direction), the position and the head direction data of each vehicle at the current moment are obtained, so that a whole vehicle speed sequence V can be obtained, wherein V consists of a plurality of speed sequences V of single vehicles, v= (V1,v2,...,vn), Vn is the current moment speed, V1~vn-1 is the history speed detected and stored before, the value of n depends on the number of history data to be reserved, and similarly, the position sequence X of the whole vehicle and the head direction sequence H of the whole vehicle can also be obtained;
In addition, each license plate of the vehicle in the range is identified, license plate information is obtained, the correspondence between the speed, the position and the direction data of the vehicle head and the license plate number is established, and the data source is an identification algorithm according to the image;
Step 2, acquiring each piece of vehicle information in the detection area:
step 2-1, solving maximum speed change, namely maximum acceleration a, of a specified vehicle in a last period of time, wherein the formula is as follows: Delta is a coefficient depending on the time interval of the continuous speed detection in step 1;
Step 2-2, calculating the current accumulated parking time t of the appointed vehiclen
The formula is that t0 =0,1.Ltoreq.i.ltoreq.n, delta being a coefficient depending on the time interval of the continuous speed detection in step 1;
step 2-3, judging whether the appointed vehicle is waiting in a queue, and solving the position of the appointed vehicle in the current road section queue, namely the queuing number s, specifically comprising the following steps:
Step 2-3-1, for a specified vehicle, enabling the queuing number s=1, and obtaining the head direction hn of the specified vehicle at the current moment;
step 2-3-2, checking whether vehicles exist in a certain distance range in front of the vehicle according to the current all vehicle positions in the position sequence X of all vehicles, if so, increasing the queuing number s by 1, checking the head direction of the front vehicle according to the head direction sequence H of all vehicles, continuously judging whether vehicles exist in a certain range in front of the front vehicle according to the current head direction and the current all vehicle positions, cycling until no vehicle exists in the certain range in front or the front is a stop line or an image boundary is found in the middle, if the cycle termination reason is that no vehicle exists in the certain range in front, considering that the vehicle is not in line with waiting, otherwise, considering that the vehicle is in line with waiting if the cycle termination reason is that the front is a stop line or an image boundary, and the value of s is the queuing number;
Step 2-4, solving the distance dr between the appointed vehicle and the roadside at the current moment, wherein the specific method is that the minimum value of the distance between the appointed vehicle and all the roadsides is solved according to the current position xn of the vehicle and the road boundary information R;
Step 2-5, solving the minimum distance d between the specified vehicle and other vehicles in the last period of time, wherein the formula is as follows: di is the minimum value of the distance between the vehicle and all other vehicles at each detection moment in the last period of time of the specified vehicle;
step 2-6, detecting whether a vehicle is opened or double flashing in a range, wherein the data source is according to an image recognition algorithm;
Step 3, acquiring data related to each pedestrian in the detection area:
Judging the current gesture of each personnel in a detection range through a camera and a position detection and tracking algorithm configured by the camera, continuously detecting and storing the current gesture of each personnel in the detection range, wherein the gesture of the personnel in the range and the current moment position data of the personnel are derived from detection and positioning algorithms based on images and radars, thus, a personnel position sequence Y can be obtained, which consists of a plurality of single person histories to the current moment position sequence Y, y= (Y1,y2,...,ym), wherein Ym is the current moment position, Y1~ym-1 is the history position which is detected and stored before, and the value of m depends on the number of history data to be reserved;
Step 3-2, according to the position sequence y of the appointed person, the current person resting time un can be obtained, and the formula is as follows: distance (yj,yj-1) refers to the distance between a person's position yj at a certain time and a position yj-1 at a previous detection time, and γ is a coefficient, depending on the time interval for continuously detecting the person's position;
step 3-3, solving the minimum distance dx between the specified vehicle and the pedestrian in the last period of time, wherein the formula is as follows: dxi is the minimum value of the distance between the vehicle and all pedestrians at each detection moment in the last period of time of the specified vehicle;
Step 3-4, solving the minimum distance dy between the specified pedestrian and the vehicle in the last period of time, wherein the formula is as follows: dyj is the minimum value of the distance of the pedestrian from all vehicles at that time at each detection moment, which designates the pedestrian for the last period of time;
And 4, establishing a traffic event judgment flow related to the vehicle, carrying out logic judgment according to the information obtained in the step 2, if the traffic event judgment is judged to be an abnormal event, outputting an equipment layout area, namely an event occurrence area, a time stamp, namely event occurrence time, license plate information and an event type logic judgment result.
In the step 4, the abnormal events comprise overspeed, retrograde, reversing, side-by-side parking, queuing waiting, suspected vehicle accidents and vehicle accidents, the judging process in the step 3 is continuously carried out, single vehicles in the range of each wheel pair are sequentially judged, and after the judgment of all the vehicles in the range is completed, the next wheel judgment is carried out according to the latest detection data.
In the step 4 of the invention, whether the vehicle is parked or not and overspeed, reverse running and reversing conditions are judged according to the speed (including the direction) of the vehicle, and the specific conditions are as follows:
step 4-1, obtaining the current speed vn of the vehicle according to step 1:
Step 4-1-1, if the speed direction of the vehicle is the same as the road requirement and the speed vn of the vehicle is more than or equal to the threshold Nv, outputting events including overspeed, speed value, region, time and license plate information aiming at the vehicle;
Step 4-1-2, if the speed direction of the vehicle is opposite to the road requirement, acquiring the direction hn of the head of the vehicle at the current moment according to step 1:
If the direction hn of the head of the vehicle is the same as the road requirement, outputting an event, namely reversing, and area, time and license plate information, aiming at the vehicle;
Step 4-1-2-2, outputting event including reverse running, and area, time and license plate information for the vehicle if the direction hn of the vehicle head is not in the same direction as the road requirement,
Step 4-1-3, if the vehicle speed is equal to 0, executing step 4-2;
Step 4-2, judging whether the vehicle enters the step is parked and stopped, and further confirming the situation according to the position xn of the vehicle in the step 1;
when step 4-2 is entered, that is, when there is a stop, step 2-4 is triggered to acquire the distance dr between the vehicle and the roadside, and the following operations are performed:
Step 4-2-1, if the distance dr from the roadside is smaller than a threshold value Ndr, triggering step 2-2 to obtain accumulated parking time tn of the vehicle, and outputting events aiming at the vehicle, namely roadside parking, parking time tn, region, time and license plate information;
Step 4-2-2, if the distance dr from the roadside is not less than the threshold value Ndr, triggering step 2-3, obtaining the queuing number s of the vehicle and whether the vehicle is waiting in a queue:
Step 4-2-2-1, if the vehicle is waiting in line and the queuing number s is greater than the threshold value Ns, triggering step 2-2, obtaining the accumulated parking time tn of the vehicle, outputting events for the vehicle, namely waiting in line, parking time tn, and area, time and license plate information,
Step 4-2-2-2, if the vehicle is not waiting in line, the possibility of accident is considered to be high, the step 4-3 is carried out, and the continuous confirmation is carried out;
Step 4-3, the vehicle entering the step is a stationary vehicle, the parking position is abnormal, whether the vehicle is a vehicle accident is further confirmed according to the historical state of the vehicle and the current scene, when the step 4-3 is entered, the step 2-1 is triggered, the maximum speed change (maximum acceleration) a of the vehicle in the last period of time is obtained, the step 2-2 is triggered, the accumulated parking time tn of the vehicle is obtained, the step 2-5 is triggered, the minimum distance d between the vehicle and other vehicles in the last period of time is obtained, the step 3-3 is triggered, the minimum distance dx between the vehicle and pedestrians in the last period of time is obtained, and the step 2-6 is triggered to obtain whether double-flash and door opening behaviors exist;
The parking time alarm threshold Nt has a preset value, and the parking time alarm threshold Nt is adjusted according to the following information, namely, when the maximum speed change (maximum acceleration) a is larger than or equal to the threshold Na, the parking time threshold Nt is reduced, when the minimum distance d between the vehicle and other vehicles in the last period of time of the vehicle and the minimum distance dx between the vehicle and pedestrians is smaller than the threshold Nd, the parking time threshold Nt is reduced, and when the double-flashing and door opening conditions exist in the area, the parking time threshold Nt is reduced;
Comparing the accumulated parking time tn of the vehicle with the adjusted (reduced) parking time threshold Nt, outputting events including vehicle accidents, parking time tn, region, time and license plate information if tn is greater than or equal to Nt, and outputting events including suspected accidents, parking time tn, region, time and license plate information if tn is less than Nt.
In step 4 of the present invention, the determination of the parking time threshold Nt is a result of comprehensively considering a plurality of factors, and even if there is no behavior such as severe speed change, too small vehicle distance, double flashing door opening, etc., if the static accumulation time tn of a certain vehicle exceeds the threshold Nt, accident events will be output, but if the vehicle inquires that the historical movement is abnormal (severe speed change, too small vehicle distance) or the triggering image judges that a specific behavior (double flashing door opening) is found, the determination can be made according to the above, which is shown as reducing the value of the threshold Nt, and is shown as outputting the accident events faster (even immediately).
The invention also comprises a step 5 of establishing a traffic event judgment flow related to personnel, carrying out logic judgment according to the information obtained in the step 3 according to a certain sequence, if the traffic event judgment flow is judged to be a personnel accident, arranging an output device arrangement area (event occurrence area), a time stamp (event occurrence time) and an event judgment result (personnel accident or suspected personnel accident), wherein the judgment flow is continuously carried out, and after all pedestrians in the range are judged in each round, carrying out the next round of judgment according to the latest detection data.
The step 5 of the invention specifically comprises the following steps:
Step 5-1, acquiring the posture of the person in the area and the duration of the basic rest of the current moment according to an image algorithm, if the posture of the person does not meet the requirements (such as lying down), further analyzing the person, and if the posture of the person meets the requirements, considering the normal condition;
Step 5-2, the current posture of the person is abnormal, at the moment, the step 3-4 is triggered to obtain the minimum distance dy between the person and the vehicle in the last period of time, if the minimum distance dy between the person and the vehicle in the last period of time is smaller than Nq, an event is output, the person is in an accident, the step 3-2 is triggered to obtain information such as the resting duration un, an accident area (equipment erection area), a timestamp, a vehicle too close to the accident area, a license plate number and the like, and if the minimum distance dy between the person and the vehicle in the last period of time is larger than or equal to Nq, the person is considered to be not close to the vehicle in the last period of time, and the step 5-3 is entered for further judgment;
step 5-3, triggering step 3-2, obtaining the duration un of the person basically resting at the moment, comparing with the threshold Nu, judging whether the person is in a resting state for a long time, if un≥Nu, considering the person as a personnel accident, outputting the event, namely the personnel accident, the duration un of the basically resting, the area and the time stamp, wherein the personnel is in a resting state for too long time, and outputting an alarm even if no car passes nearby. Otherwise, the system considers the system to be a suspected personnel accident, and outputs an event, namely the suspected personnel accident, the basically static duration un, the area and the timestamp. A suspected personnel accident may be considered a low level alarm, i.e. not yet recognized at this time, but later turned into a personnel accident alarm as its rest time increases.
The invention also comprises a step 6 of storing video data, wherein when the vehicle and personnel are judged to be abnormal, the characteristics of the abnormal time period and the video images are stored in a lasting mode according to the time stamp of the judged data. The start-stop time of the specific storage period can be prolonged before and after the abnormal period according to the setting. The image can be used as evidence and also can be used for manual review.
According to the invention, various characteristics of vehicles and personnel in the detected road section are acquired by means of an artificial intelligence algorithm, and then the high-efficiency, rapid and automatic judgment of traffic events is realized based on the characteristics, so that the purposes of improving the detection efficiency and reducing the manpower consumption are achieved.
The specific embodiment is as follows:
The invention will be further described with reference to the drawings and examples.
The invention provides a method for judging an event according to traffic data, which acquires various characteristics of vehicles and personnel in a detected road section by means of an artificial intelligence algorithm, and then realizes high-efficiency, rapid and automatic judgment of the traffic event based on the characteristics, thereby achieving the purposes of improving the detection efficiency and reducing the manpower consumption, and specifically comprises the following contents:
S1, setting a detection area in a recording range or a detection range of equipment such as a camera, a radar and the like according to the recording range of the dimension reduction reconstruction data;
S2, acquiring dimension reduction reconstruction data of the detection area or acquiring data by means of the detection equipment and a related algorithm model. The required various data are as follows, wherein the data characteristics of S2.1 and 2.7,2.12 need to be continuously detected, acquired and stored, and other S data are acquired by triggering calculation under specific conditions;
S2.1, continuously acquiring and storing speed (including direction) and position of each vehicle at the current moment in a detection range, wherein the data sources of the speed (including direction), the position and the direction of the vehicle head can be corresponding data in a road condition matrix and a vehicle condition matrix after dimension reduction reconstruction, or the data acquired by a camera and a radar can be obtained through corresponding speed, position detection and tracking algorithms, for example, the data sources of the speed and the direction can be direct detection of related radars, or the comparison of the current position and the historical position in two images, or the vehicle line-crossing detection algorithm based on the images;
Thus, a total vehicle speed sequence V is obtained, which consists of a plurality of individual vehicle speed sequences V, v= (V1,v2,...,vn), where Vn is the current time speed and V1~vn-1 is the previously detected stored historical speed, the value of n being dependent on the number of historical data pieces to be retained. Similarly, a position sequence X of all vehicles can be obtained, and a head direction sequence H of all vehicles can be obtained;
S2.2, solving a maximum speed change (maximum acceleration) a of a specified vehicle in the last period of time, wherein the formula is as follows: delta is a coefficient, dependent on the time interval of the continuous speed detection in 2.1;
s2.3, for the appointed vehicle, the current accumulated parking time t is obtainedn
The formula is t0 =0.I is more than or equal to 1 and n is more than or equal to n. With S2.2, δ is a coefficient, depending on the time interval of the continuous speed detection in 2.1;
S2.4, judging whether the specified vehicle is waiting in a queue or not, and solving the position of the specified vehicle in the current road section queue, wherein the position is called a queuing number S, and the specific steps are as follows:
1) For a specified vehicle, the queuing number s=1, and the direction hn of the vehicle head at the current moment is obtained;
2) Checking whether vehicles exist in a certain distance range in front of the vehicle according to the current vehicle positions in the position sequence X of all vehicles;
3) If a front vehicle is in front, the queuing number s is increased by 1, and the direction of the front vehicle is checked according to the sequence H of the direction of the front vehicle;
4) Continuously judging whether vehicles exist in a certain range in front of the front vehicle according to the current direction of the front vehicle and the current positions of all vehicles;
5) If the reason for the circulation is that the front is not in a certain range, the vehicle is not in line, otherwise, if the reason for the circulation is that the front is in a certain range, the vehicle is in line, the value of s is the queuing number, wherein the information source of the position of the stop line and the image boundary can be road condition matrix, image recognition algorithm or artificial mark.
S2.5, calculating the distance dr between the specified vehicle and the roadside at the current moment, wherein the method is that the minimum value of the distance between the specified vehicle and all roadsides is calculated according to the current position xn of the vehicle and the road boundary information R, and the data source of the current position xn of the vehicle can be a vehicle condition matrix after dimension reduction reconstruction or a position detection algorithm based on images;
s2.6, the minimum distance d between the specified vehicle and other vehicles in the last period of time is obtained,
The formula is: di is the minimum value of the distance between the vehicle and all other vehicles at each detection moment in the last period of time of the specified vehicle;
S2.7, judging the current gesture of each person in the detection range through the camera and the position detection and tracking algorithm configured by the camera, and continuously detecting and storing the current position of each person. The gesture of the personnel in the range and the current moment position data of the personnel originate from a detection and positioning algorithm based on images and radars;
Thus, a crew position sequence Y can be obtained, wherein the Y consists of a plurality of position sequences Y from single person histories to the current moment, y= (Y1,y2,...,ym), wherein Ym is the current moment position, and Y1~ym-1 is the history position which is detected and stored before;
and S2.8, acquiring the current personnel static time un according to the position sequence y of the appointed personnel, wherein the formula is u0 =0.1≤j≤m。
Distance (yj,yj-1) refers to the distance between a person's position yj at a certain time and a position yj-1 at a previous detection time, and γ is a coefficient, depending on the time interval for continuously detecting the person's position;
s2.9, the minimum distance dx between the specified vehicle and the pedestrian in the last period of time is obtained.
The formula is: dxi is the minimum distance of the vehicle from all pedestrians at that time for each detection moment, which specifies the last time the vehicle was.
S2.10, the minimum distance dy between the specified pedestrian and the vehicle in the last period of time is obtained.
The formula is: dyj is the minimum of the distances of the person from all vehicles at that time, for each detection moment, for the last period of time that the person was designated.
The data sources of the vehicle position X of S2.9 and 2.10 can be a vehicle condition matrix after dimension reduction reconstruction or a detection and positioning algorithm based on images and radars. The personnel position Y data source is based on an image, a radar detection and positioning algorithm.
S2.11, detecting whether the vehicle is open or not in the range. The data source is based on an image recognition algorithm.
And S2.12, identifying license plates of all vehicles within the range, acquiring license plate information, and establishing the correspondence between the speed, position and head direction data in the step 2.1 and license plate numbers. The data source is based on an image recognition algorithm.
And S3, establishing a traffic event judgment flow related to the vehicle, and carrying out logic judgment according to the information acquired in the S2 and a certain sequence.
If the abnormal event (overspeed, retrograde, reversing, side-by-side parking, queuing, suspected vehicle accident and vehicle accident) is judged, the output equipment is arranged in an area (event occurrence area), a time stamp (event occurrence time) and license plate information (such as license plate type and license plate number) and the event type (logic judgment result).
The judging process is continuously carried out, single vehicles in the range of each wheel pair are judged in sequence, and after the judgment of all the vehicles in the range is completed, the next wheel judgment is carried out according to the latest detection data.
S3.1, judging whether to stop, overspeed, retrograde and reversing according to the speed (including direction) of the vehicle.
For a single vehicle current speed vn:
1) If the speed direction of the vehicle is in the same direction as the road requirement and the speed vn of the vehicle is greater than or equal to the threshold Nv, outputting events including overspeed, speed value, region, time and license plate information aiming at the vehicle.
2) If the speed direction of the vehicle is opposite to the road requirement, acquiring the direction hn of the vehicle head at the current moment of the vehicle:
2.1 If the direction hn of the vehicle head is the same as the road requirement, outputting an event, namely reversing, and area, time and license plate information, aiming at the vehicle;
2.2 If the direction hn of the vehicle head is not in the same direction as the road requirement, outputting events such as reverse driving, and region, time and license plate information aiming at the vehicle.
3) If the vehicle speed is equal to 0, S3.2 is performed.
And S3.2, judging whether the vehicle enters the S is parked and stopped, and further confirming whether the vehicle is roadside parking, queuing parking and further confirming according to the position of the vehicle.
When S3.2 is entered, i.e. when parking exists, S2.5 is triggered, and the distance dr between the vehicle and the roadside is obtained
1) If the distance dr from the roadside is smaller than the threshold value Ndr, triggering S2.3, and obtaining accumulated parking time tn of the vehicle, wherein the output event of the vehicle is roadside parking, parking time tn, region, time and license plate information.
2) If the distance dr from the roadside is not less than the threshold Ndr, then trigger S2.4, acquire the ordinal number S of its queuing and whether the vehicle is waiting in line.
2.1 If the vehicle is waiting in line and the queuing number S is greater than the threshold value Ns, triggering S2.3, obtaining the accumulated parking time tn of the vehicle, and outputting events for the vehicle, namely waiting in line, the parking time tn, and the area, time and license plate information.
2.2 If the vehicle is not waiting in line, it is considered that the possibility of accident is high, and the process proceeds to S3.3 to perform continuous confirmation.
And S3.3, the vehicle entering the S is a stationary vehicle, and the parking position is abnormal, and whether the vehicle is a vehicle accident or not is further confirmed according to the historical state of the vehicle and the current scene.
When entering into S3.3, triggering S2.2 to acquire the maximum speed change (maximum acceleration) a of the vehicle in the last period of time, triggering S2.3 to acquire the accumulated parking time tn of the vehicle, triggering S2.6 to acquire the minimum distance d between the vehicle and other vehicles in the last period of time, triggering S2.9 to acquire the minimum distance dx between the vehicle and pedestrians in the last period of time, and triggering S2.11 to acquire whether double-flashing and door opening behaviors exist or not.
The parking time alarm threshold Nt has a preset value, and the parking time alarm threshold Nt is adjusted according to the following information:
When the maximum speed change (maximum acceleration) a is equal to or greater than the threshold value Na, the parking time threshold value Nt is narrowed.
The parking time threshold Nt is reduced when the minimum distance d of the vehicle from other vehicles and the minimum distance dx of the vehicle from pedestrians in the last period of time is smaller than the threshold Nd.
When the double-flashing and door opening conditions exist in the area, the parking time threshold Nt is reduced.
Comparing the accumulated parking time tn of the vehicle with the adjusted (reduced) parking time threshold Nt, and outputting an event, namely a vehicle accident, the parking time tn, the region, the time and license plate information if tn is more than or equal to Nt. If tn is smaller than Nt, outputting the event, namely suspected accident, parking time tn, and area, time and license plate information.
The determination of the parking time threshold Nt is a result of comprehensively considering a plurality of factors, and even if there is no behavior such as a severe speed change, an excessively small vehicle distance, a double flashing door and the like, if the static accumulation time tn of a certain vehicle exceeds the threshold Nt, an accident event is output.
However, if the vehicle inquires that the historical movement is abnormal (severe speed change and too small vehicle distance) or the trigger image judges that the specific behavior (double flashing and door opening) is found, the specific behavior can be clarified according to the specific behavior, and the specific behavior is expressed as a value of a reduction threshold Nt, and is expressed as a faster (even immediate) output accident event.
S3 vehicle event judgment flow chart
The condition that the judgment box is not marked is that the event judgment is not output, and the event judgment is considered to be normal condition
And S4, establishing a traffic event judgment flow related to personnel, and carrying out logic judgment according to the information acquired in the S2 and a certain sequence.
If the accident is determined to be a personnel accident, the output device is provided with an area (event occurrence area), a time stamp (event occurrence time) and an event determination result (personnel accident or suspected personnel accident).
The judging process is continuously carried out, and after all pedestrians in the range are judged in each round, the next round of judgment is carried out according to the latest detection data.
And S4.1, acquiring the personnel posture in the area and the duration of the basic rest of the current moment according to an image algorithm, if the personnel posture is not satisfactory (such as lying down), further analyzing the personnel, and if the personnel posture is satisfactory, considering the normal condition.
S4.2, triggering S2.9 when the current posture of the person is abnormal, and obtaining the minimum distance dy between the person and the vehicle in the last period of time.
If the minimum distance dy from the vehicle in the last period is less than Nq, a personnel accident is output, and the trigger S2.8 is triggered, and information such as the static duration un, the accident area (equipment erection area), the time stamp, the vehicle which is too close to the accident area, the license plate number and the like is obtained.
If the minimum distance dy between the person and the vehicle in the last period of time is not less than Nq, the person is considered to be not too close to the vehicle in the last period of time, and the further judgment is carried out in S4.3.
S4.3 triggers S2.8, acquires the duration un of the person' S substantial rest at the moment, and compares the duration un with the threshold Nu to judge whether the person is in a rest state for a longer time.
If un≥Nu, it is considered a personnel incident, the output event is personnel incident, the duration of the substantial quiescence un and the zone, time stamp.
At this time, the person is stationary for too long, and an alarm should be output even if no car passes nearby.
Otherwise, the system considers the system to be a suspected personnel accident, and outputs an event, namely the suspected personnel accident, the basically static duration un, the area and the timestamp. A suspected personnel accident may be considered a low level alarm, i.e. not yet recognized at this time, but later turned into a personnel accident alarm as its rest time increases.
S5 video data storage
When the vehicle and the personnel are judged to be abnormal, the characteristics of the abnormal time period and the video images are stored in a lasting mode according to the time stamp of the judged data. The start-stop time of the specific storage period can be prolonged before and after the abnormal period according to the setting. The image can be used as evidence and also can be used for manual review.
Example 1:
The present example provides vehicle accident detection based on traffic flow monitoring:
continuously detecting and storing the speed, the position and the head direction of the vehicle in the area to form V, X and H data, storing the data into a table, wherein the formats of the V, X and H data are the same, the table column number depends on the number of vehicles in a detection range, the line number depends on the number n of pieces of reserved history data, and the detection record is taken as an example once per second, delta=1, and the number n=10 of pieces of data (10 pieces of reserved history data).
In this example, data is collected from 11:00:01, and when 10 pieces are collected (from 11:00:10 seconds), judgment is started, and no personnel appear in the whole process.
After the detection zone is determined as per S1,
At 11:00:10 seconds, V, X, H is obtained according to S2.1 as follows:
And (3) judging all vehicles in the area according to the S3 and the design flow, wherein the current time speed of all vehicles is 4 and 30, and no stationary vehicle exists. No abnormal event output.
The schematic diagram is shown in fig. 4;
at the next time 11:00:11 seconds, S2.1 acquires V, X, H as follows:
Each vehicle is judged at S3,
The speed of viewing is performed S3.1, with the speed of vehicle 1 being 0. The process goes to S3.2 for further analysis of the vehicle 1. And S3.2, acquiring the position of the road with the roadside according to S2.5, and knowing that the current distance between the current position 7,184 and the road boundary is 7, wherein the current distance is greater than a preset threshold value Ndr =1, so that the road is not stopped at the roadside. And (2) calculating the queuing state and the queuing coefficient according to S2.4, wherein the vehicle 2 exists a certain distance in front of the vehicle at the current moment, but no other vehicles exist in a certain distance in front of the vehicle 2, and the vehicle is not located at a stop line or boundary. It is considered not to be queued.
S3.3 is performed, and a preset parking accumulated time threshold Nt =10 seconds. Based on acceleration, distance, whether there is a double flash door, each item cuts down on the threshold for 4 seconds (0 seconds minimum threshold)
The acceleration sequence is calculated according to S2.2, the acceleration sequence is calculated differentially from the speed sequence 22,22,22,22,22,20,15,15,4,0 to be 0,0,0,0,2,5,0,11,4, wherein the maximum value of the acceleration is 11, and is larger than a threshold value Na =10, which indicates that a severe speed change exists, and the parking accumulated time threshold value Nt is reduced by 4 seconds.
Calculating the minimum distance sequence between the vehicle 1 and other vehicles, and obtaining the historical minimum distance sequence from the positions of the vehicle 1 and the vehicle 2, wherein the minimum distance of 86,78,68,56,41,26,2 is 2 and is smaller than a threshold value Nd =5, and the parking accumulated time threshold value Nt is reduced by 4 seconds.
And (3) starting double-flashing and vehicle door detection, wherein the double-flashing and vehicle door is not found at the moment, and the parking accumulated time threshold is not further reduced.
The parking accumulated time threshold is thus Nt = 2 seconds.
The current parking time tn =1 second of the vehicle is calculated according to the formula in S2.3, the threshold value Nt is not reached, and the suspected accident information is judged at the moment. (in this example, if there is a double flashing and door opening behavior, the parking accumulated time threshold Nt is reduced to 0 seconds again, the current parking time tn =1 second, and the threshold is reached to determine that the vehicle accident is a direct judgment)
The schematic diagram is shown in fig. 5;
at the next time 11:00:12 seconds, V, X, H are as follows:
At this time, the judgment is made for each vehicle according to the flow 3:
looking at the speed at S3.1, the vehicle 1 speed is 0. The vehicle 1 is further analyzed.
And (3) acquiring the position of the road with the roadside according to S3.2, wherein the current distance between the current position 7,184 and the road boundary is 7, and the current distance is larger than a preset threshold value Ndr =1, so that the road is not stopped at the roadside.
And calculating the queuing state and the queuing coefficient, wherein no vehicle exists in a certain distance right ahead of the queuing state and the queuing coefficient at the current moment, and the queuing state and the queuing coefficient are not positioned on a stop line or a boundary. It is considered not to be queued.
According to S3.3, the preset parking accumulated time threshold is 10 seconds. Based on acceleration, distance, whether there is a double flash door, each item cuts down on the threshold for 4 seconds (0 seconds minimum threshold)
An acceleration sequence is calculated, and the acceleration sequence is calculated from the speed sequence 22,22,22,22,20,15,15,4,0,0 differential to be 0,0,0,2,5,0,11,4,0, wherein the maximum acceleration is 11, which is greater than the threshold value Na =10, indicating that there is a drastic speed change, and the parking accumulated time threshold value Nt is reduced by 4 seconds.
Calculating the minimum distance sequence between the vehicle 1 and other vehicles, and obtaining the historical minimum distance sequence from the positions of the vehicle 1 and the vehicle 2, wherein the minimum distance of 78,68,56,41,26,2,32 is 2 and is smaller than a threshold value Nd =5, and the parking accumulated time threshold value Nt is reduced by 4 seconds.
And (3) starting double-flashing and vehicle door detection, wherein the double-flashing and vehicle door is not found at the moment, and the parking accumulated time threshold is not further reduced.
Whereby the parking accumulated time threshold Nt =2 seconds.
Meanwhile, the current parking time tn =2 seconds of the vehicle is calculated according to the formula in 2.3, the threshold value Nt is reached, and the vehicle accident is judged at the moment.
The schematic diagram is shown in fig. 6;
In this example, even if two vehicles collide and escape after the collision of the vehicle 2, the vehicle 1 is stationary, and the vehicle accident determination of the vehicle 1 is output. If both vehicles stop after collision, vehicle accidents of both vehicles 1 and 2 are output.
Example 2:
the vehicle congestion detection based on traffic flow monitoring is provided in this example, and the conditions are the same as those in example 1, and the speed, position and direction of vehicles in the area are continuously detected and stored to form V, X and H data, the V, X and H data are stored in a table, the formats of the three are the same, the number of columns of the table depends on the number of vehicles in the detection range, the number of rows depends on the number n of pieces of the reserved history data, and the detection record is once per second, delta=1, and the number n=10 of pieces of data (10 pieces of data of the reserved history) are taken as an example.
In this example, data is collected from 11:00:01, and when 10 pieces are collected (from 11:00:10 seconds), judgment is started, and no personnel appear in the whole process.
At 11:00:10 seconds, V, X, H is as follows:
At this time, it is determined at S3 for each vehicle.
The vehicle 1, having a speed of 0, continues to perform position determination, and at this time, the position 6,200, having a distance from the roadside of 6, is greater than the set threshold value Ndr =1, and is considered to be stopped on the road.
Looking at its queuing state, there is no car in front of it, but a stop line is nearby, and it is clear that it is queuing, the queuing number s is 1, less than the set threshold value Ns =3. And judging the normal condition of the device, and not carrying out subsequent operation.
The vehicle 2, whose speed is 0, continues to make a position determination, where the position 6,195 is 6 from the roadside distance, and is greater than the set threshold value Ndr =1, and is considered to be stopped on the road. And judging the normal condition of the device, and not carrying out subsequent operation.
Checking the queuing state, wherein a vehicle is arranged in front of the queuing state, a stop line is arranged in front of the head, the queuing state is definitely in the queuing state, the queuing number s is 2, and the queuing number s is smaller than a set threshold value Ns =3. No subsequent operations are performed.
The vehicle 3, whose speed is 0, continues to perform position determination, and at this time, the position 6,190 is 6 from the roadside distance, and is greater than the set threshold value Ndr =1, and is considered to be stopped on the road.
Checking the queuing state, wherein a vehicle is arranged in front of the queuing state, a stop line is arranged in front of the head, the queuing state is confirmed, the queuing number s is 3, and the queuing number s is more than or equal to a set threshold value Ns =3. The vehicle cumulative waiting time tn =1 second is calculated.
The event is output, queued, queue length 3, wait time 1 second. (the duration of the queue length reaching threshold 3), the situation is shown in fig. 7;
at 11:00:11 seconds, V, X, H is as follows:
at this point the vehicle 1 has started, but the queue is still present.
And S3, judging all vehicles in sequence.
The vehicle 1, speed 5, is considered normal.
The vehicle 2, whose speed is 0, continues to make a position determination, where the position 6,195 is 6 from the roadside distance, and is greater than the set threshold value Ndr =1, and is considered to be stopped on the road.
Looking at the queuing state, a vehicle is arranged in front of the queuing state, a stop line is arranged in front of the head vehicle (vehicle 1), the queuing state is clearly determined, and the queuing number s is 2 and is smaller than the set value of Ns =3. No subsequent operations are performed.
The vehicle 3, whose speed is 0, continues to perform position determination, and at this time, the position 6,190 is 6 from the roadside distance, and is greater than the set threshold value Ndr =1, and is considered to be stopped on the road.
Checking the queuing state, wherein a vehicle is arranged in front of the queuing state, a stop line is arranged in front of the head vehicle (vehicle 1), the queuing state is confirmed, the queuing number s is 3, and the queuing number s is more than or equal to a set threshold value Ns =3. The vehicle cumulative waiting time tn =2 seconds is calculated.
Output event, queuing waiting, queue length 3, waiting time 2 seconds. (the duration of the queue length reaching threshold 3), the situation is illustrated in fig. 8;
at 11:00:12 seconds, V, X, H is as follows:
and S3, judging all vehicles in sequence.
The speed of the vehicles 1 and 2 is not 0, and is considered as normal.
The vehicle 3, whose speed is 0, continues to perform position determination, and at this time, the position 6,190 is 6 from the roadside distance, and is greater than the set threshold value Ndr =1, and is considered to be stopped on the road.
Checking the queuing state, wherein a vehicle is arranged in front of the queuing state, a stop line is arranged in front of the head vehicle (vehicle 2), the queuing state is clearly determined to be in queuing, the queuing number s is 2 and is smaller than a queuing threshold value Ns =3, judging the normal condition of the queuing state, and not carrying out subsequent operation,
This is shown in fig. 9;
if the following vehicle 3 is started normally and there is a non-0 speed, then all three vehicles are in normal condition.
If the vehicle 3 is not started for a long time, no vehicle is caused in front of the vehicle (the vehicle 1 and the vehicle 2 are driven away), and the vehicle is far away from the stop line, and the non-queuing state is determined. At this time, the speed of the vehicle 3 is 0, the distance from the roadside is far, and the vehicle is not in a queuing state, and the judgment of the vehicle accident is continued according to the process S3.2.
Example 3:
The example provides personnel accident detection based on traffic flow monitoring, which continuously detects and stores the speed, the position and the direction of a vehicle in an area to form V, X and H data, stores the V, X and H data in a table, continuously detects and stores the position and the direction of personnel in the area to form Y data, and stores the Y data in the table.
In this example, the number of persons and vehicles is the same as m=n=10 in this example. The detection interval of the person is the same as in this example of the vehicle, once per second detection record, δ=λ=1.
In this example, data was collected from 11:00:01, and the judgment was started when 10 pieces were collected (from 11:00:10 seconds).
At 11:00:10 seconds, V, X, H, Y is as follows:
at this time, the determination in S3 is made for the vehicle 1, and the vehicle speed is not 0, and this is considered to be normal at this time. And (4) judging the pedestrian 1 in the step S4, wherein the current posture of the pedestrian is standing, meets the requirements, and is considered to be normal at the moment. At 11:00:11 seconds, V, X, H, Y is as follows:
at this time, the vehicle 1 is judged in S3.1, and the vehicle speed is 0.
S3.2, judging that the distance from the roadside is 5 and is larger than a threshold value Ndr =1, and judging the queuing number of the road, wherein the road is considered to be stopped in the road, and no other vehicles or stop lines are found to be in a non-queuing state around the road.
And S3.3, a preset parking time threshold Nt =10 seconds, wherein the maximum speed change 15 is calculated to be larger than the threshold Na =10 according to a formula, the minimum distance between the history and a person is reduced by 4 seconds, the minimum distance between the history and the person is 2, the minimum distance between the history and the person is smaller than the distance threshold Nd =5, the parking time is reduced by 4 seconds, and the final parking time threshold is Nt =2 seconds. The present parking time tn =1 second, calculated according to equation 2.3, does not reach the threshold Nt, and is temporarily considered to be a suspected vehicle accident, rather than a vehicle accident.
And (3) judging the pedestrian 1 in the step (S4), judging the current non-standing state in the step (4.1S), entering the step (S4.2), calculating the minimum distance between the history of the person and the vehicle to be 2, which is smaller than a distance threshold value Nq =5, outputting an event, namely a personnel accident, and calculating the rest time of the person to be 0 seconds, wherein the vehicle which is too close to the personnel is the vehicle 1.
At 11:00:12 seconds, V, X, H, Y is as follows:
at this time, the vehicle 1 is judged in S3.1, and the vehicle speed is 0.
S3.2, judging that the distance from the roadside is 5 and is larger than a threshold value Ndr =1, and judging the queuing number of the road, wherein the road is considered to be stopped in the road, and no other vehicles or stop lines are found to be in a non-queuing state around the road.
And S3.3, a preset parking time threshold Nt =10 seconds, wherein the maximum speed change 15 is calculated to be larger than the threshold Na =10 according to a formula, the minimum distance between the history and a person is reduced by 4 seconds, the minimum distance between the history and the person is 2, the minimum distance between the history and the person is smaller than the distance threshold Nd =5, the parking time is reduced by 4 seconds, and the final parking time threshold is Nt =2 seconds. The vehicle accident is output when the present parking time tn =2 seconds, calculated according to equation 2.3, reaches the threshold Nt. And (4) judging the pedestrian 1 in the step (S4), wherein the judging flow is the same as that of the previous step, the accident event of the personnel is still output, and the vehicle which is too close to the personnel is the vehicle 1 by calculating the rest time of the personnel for 1 second. In this example, similarly to embodiment 1, the vehicle is stopped after an accident, and a vehicle accident and a personal accident are outputted. Even if the vehicle escapes, personnel accidents can be output, and the personnel accidents are irrelevant to the condition of the vehicle.