Disclosure of Invention
The invention aims to provide a detection method for monitoring abnormal events of video crowd flow in a crowded scene, so as to detect whether potential safety hazards such as overlarge flow, slow walking, incapability of completely passing and the like exist when the crowd flows through a road, and ensure the safety of the crowd flowing through the road at the intersection with large crowd flow.
A detection method of monitoring video crowd flow abnormal events in crowded scenes is applied to detecting abnormal events when pedestrians pass through roads at intersections with large traffic flows, and comprises the steps of collecting monitoring videos of pedestrians passing through roads in real time through a first camera of each intersection, analyzing each video segment, predicting whether the number of pedestrians passing through the roads in the existing green light time is larger than an upper limit value, if yes, further analyzing actual average speeds of all pedestrians passing through the roads, and if the actual average speeds are smaller than a set average speed, judging that the pedestrians pass through the roads as abnormal events, and sending a green light on-time prolonging signal to traffic lights of the intersections.
The invention has the principle and beneficial effects that the monitoring video of the pedestrian crossing the road is collected in real time through the first camera at the intersection, so that the state of the crowd at the intersection crossing the road can be mastered and known in real time; in the invention, each video segment is analyzed, whether the number of pedestrians passing through a road in the existing green light time is larger than an upper limit value is estimated, the upper limit value is set according to different road openings, the crowd walking in one direction passes through the road from the first row (when the green light allowing the pedestrians to pass through the road just lights up) to the last row when the green light allowing the pedestrians to pass through the road just extinguishes, the width of the matrix is the width of a crosswalk, the upper limit value of the crosswalk allowing the pedestrians to pass through the crosswalk calculated under the condition is calculated, and the opposite direction calculating method is the same; if the estimated number of pedestrians passing through the road in the existing green time is larger than the upper limit value, the current situation that the traffic of the intersection is very large and exceeds the upper limit value is indicated, and although the current situation that the traffic of the intersection exceeds the upper limit value is indicated, if the traffic of the intersection is fast, the current situation that the traffic of the intersection is possible to pass through the intersection is indicated, therefore, the actual average speed of all pedestrians passing through the road needs to be further analyzed, if the actual average speed is smaller than the set average speed, the set average speed is the speed of the pedestrians passing through the road under normal conditions, if the actual average speed is smaller than the set average speed, the current situation that the traffic of the pedestrians is slow is indicated, and in the existing green time allowing the pedestrians to pass through the intersection, the current situation that the traffic of the intersection is not safe is indicated, therefore the current pedestrian passing through the road is an abnormal event is determined, in order to ensure the safety of the pedestrians passing through the road under the conditions, and sending a signal for prolonging the green light on time to the traffic lights at the intersection.
Further, the method comprises the steps of analyzing each video segment, judging whether the number of pedestrians passing through a road in a designated time is larger than a reference value, if so, increasing the analysis frequency of video frames, judging whether continuous aggregation exists among pedestrians passing through the road on the basis that the existing green light is on and walking at a set average speed is feasible, and if so, estimating the number of pedestrians passing through the existing green light, and if so, estimating whether the number of pedestrians is larger than an upper limit value.
The method has the advantages that although the traffic of people at the road crossing is large, not all people waiting for the road crossing at one time usually, so that the method adopts a pre-estimated mode to count the number of people flowing through the road crossing, specifically analyzes each video segment to judge whether the number of people crossing the road is larger than a reference value or not in a designated time, and the designated time is time in a set time period, for example, 2 minutes before a green light allowing the pedestrians to pass is lighted, the number of people crossing the road exceeds the reference value, which means that the traffic of people crossing the road secondarily is large, the monitoring and analysis are required to be enhanced, and the number of people crossing the road is required to be pre-estimated. Judging whether the number of pedestrians passing through the road in the designated time is larger than a reference value, if so, increasing the analysis frequency of video frames, and on the basis that the existing green light is lightened and the traffic can pass through at the set average speed, namely, the pedestrians which cannot pass through the road at the set average speed are not counted even if the pedestrians reach the road in the green light lightening time, judging whether the pedestrians passing through the road are continuously gathered, if so, estimating the number of pedestrians which will pass through the road in the existing green light time, and estimating whether the number of pedestrians is larger than an upper limit value.
Further, the method further comprises the step of analyzing the gathering speed of the pedestrians which are gathered continuously, and when the gathering speed of the pedestrians is larger than the set speed, judging that the pedestrians pass through the road as an abnormal event, and sending a green light on time prolonging signal to traffic lights at the intersection. If the number of pedestrians passing through the road in the designated time is larger than the reference value and the accumulation speed of pedestrians is too high under the condition of continuous accumulation, the number of pedestrians to be passed through the road is rapidly increased in a short time, and the number of pedestrians to be passed through the road is very likely to exceed the set upper limit value, so that the pedestrians are judged to be abnormal events when passing through the road, and a green light on time prolonging signal is sent to traffic lights at the intersection.
Further, each video segment is analyzed, whether opposite crowd flows run in opposite directions have the opposite impact phenomenon is analyzed, if yes, the pedestrian passing through the road is judged to be an abnormal event, and first warning information is sent to the pedestrian at the intersection.
Because the crowd who crosses the road flows greatly, the crowd who looks and move is in order to pass through the crossing fast, can not avoid having to borrow the way, bump etc. action to lead to the hedging phenomenon of crowd flow, in case the hedging phenomenon appears, then can be very dangerous, can judge this pedestrian and cross the road and be the unusual event, can be timely send first warning information to crossing pedestrian to remind the danger that the pedestrian probably appears, make the pedestrian walk in order, and can tell the pedestrian and have prolonged green light time, need not panic, prevent trampling the incident emergence.
Further, each video segment is analyzed, whether the crowd flows have irregular surging phenomenon is analyzed, if yes, the pedestrian crossing the road is judged to be an abnormal event, and second warning information is sent to the crossing pedestrians.
Because the crowd who crosses the road flows greatly, no matter the crowd who is the syntropy or subtends flows can be crowded, the action such as inserting team to lead to crowd to flow to have irregular surging phenomenon, take place to step on the incident easily, therefore judge this pedestrian and cross the road and be the unusual event when crowd flows to have irregular surging phenomenon, send second warning information to crossing pedestrian, with remind the pedestrian to probably appear irregular surging to step on etc. to make the pedestrian walk in order, and can tell the pedestrian and prolonged green light time.
And further, analyzing each video segment, and analyzing whether the walking speed of pedestrians in the crowd flow is lower than the set minimum speed, if so, sending a signal for prolonging the green light on time to the traffic lights at the intersection.
The walking speed of pedestrians in the crowd flow is lower than the set minimum speed, which means that special crowds such as old people, blind people or children inconvenient to walk exist in the crowd flow, so that a green light-on time prolonging signal is sent to traffic lights at the intersection for ensuring safety.
Further, the method comprises the steps that the traffic flow condition is collected through the second camera at the intersection, if the traffic flow is smaller than the set lower limit value, when the number of pedestrians passing through the road in the estimated green time is larger than the upper limit value, the second camera at the intersection is also used for collecting special crowd information, whether the special crowd can pass or not is estimated according to the set walking speed of the special crowd in the crowded scene and the current green light time, if yes, prompt information is sent, and if not, waiting information is sent.
The situation that the traffic flow is collected through the second camera of the intersection, if the traffic flow is smaller than the set lower limit value, the situation shows that vehicles at the intersection are fewer or no vehicles exist at the moment, the second camera is not needed to be used for collecting traffic flow information frequently, but can be used for collecting special crowd information when the number of pedestrians passing through the road in the estimated existing green time is larger than the upper limit value, according to the set traveling speed of the special crowd in the crowded scene and the existing green time, whether the special crowd can pass through or not is estimated, if yes, prompt information is sent out, if no, waiting information is sent out, namely whether the special crowd can successfully pass through the intersection or not provides accurate reference, firstly, the safety of the intersection passing through of special packet crowd is increased, secondly, the situation that the crowd flow cannot pass through the intersection smoothly in the green time is avoided, the green time is prolonged, and therefore the adjusting frequency of the traffic light is reduced, and the influence on normal traffic is reduced as much as possible.
Furthermore, in order to strengthen the management and control of the intersections and improve the management efficiency and the safety, abnormal events of pedestrians crossing the roads are counted in a designated time, and management demand information is sent out for the intersections with the counted times being larger than a normal value.
Detailed Description
The following is a further detailed description of the embodiments:
as shown in fig. 1, in this embodiment, a method for detecting abnormal events of monitoring video crowd flow in a crowded scene is applied to detecting abnormal events when pedestrians pass through a road at intersections with large traffic volume, so as to detect whether potential safety hazards such as excessive traffic volume, slow walking, incapability of completely passing through the road exist when the crowd flows through the road, and ensure that the crowd flows through the road at intersections with large traffic volume.
A detection method for monitoring video crowd flow abnormal events in a crowded scene comprises the steps of collecting monitoring videos of pedestrians crossing roads in real time through a first camera at an intersection, analyzing each video segment, specifically extracting video segments in the monitoring videos, dividing the video segments into a plurality of continuous frames, and analyzing each frame.
The method comprises the steps of estimating whether the number of pedestrians passing through a road in the existing green light time is larger than an upper limit value, specifically estimating whether the number of pedestrians passing through the road in the designated time is larger than a reference value, if yes, increasing the analysis frequency of video frames, and judging whether continuous aggregation exists among pedestrians passing through the road on the basis that the existing green light is lightened and the pedestrians walk at a set average speed, if yes, estimating the number of pedestrians to be passed through in the existing green light time, and if the number of pedestrians is larger than the upper limit value. The upper limit value is set according to different road openings, the crowd walking in one direction can be in the form of a matrix from the first row (when the green light allowing the pedestrians to pass through the road just lights up) to the last row when the green light allowing the pedestrians to pass through the road just extinguishes, the width of the matrix is the width of the crosswalk, the calculated upper limit value of the crosswalk allowing the crowd to pass through the crosswalk is the same as the upper limit value, and the opposite direction calculating method is the same, the reference value in the embodiment can be half of the upper limit value or one third of the upper limit value, and the embodiment is preferably half of the upper limit value.
The number of pedestrians contained in each frame of video is calculated by extracting the number of particles in each frame of video, which is not described in detail herein, the number of pedestrians passing through the road in the designated time can be calculated in this way, whether the pedestrians passing through the road are continuously gathered can be judged by comparing the front frame of video with the rear frame of video, and whether the number of pedestrians passing through the road is larger than the upper limit value can be estimated according to the speed of gathering and the time period that the existing green light is lighted and the pedestrians walk at the set average speed.
In this embodiment, if the number of pedestrians passing through the road is greater than the upper limit value, the actual average speed of all pedestrians passing through the road is further analyzed, and if the actual average speed is less than the set average speed, the current pedestrian passing through the road is determined to be an abnormal event, and a signal for prolonging the green light on time is sent to the traffic lights of the intersection. The actual average speed of all pedestrians can be calculated according to the moving speed of the same particles of the continuous different frames of video.
In this embodiment, on the basis that the number of pedestrians passing through the road is estimated to be greater than the upper limit value, and the actual average speed of all pedestrians passing through the road is smaller than the set average speed, the method further includes analyzing the gathering speed of the pedestrians which are continuously gathered, and when the gathering speed of the pedestrians is greater than the set speed, judging that the pedestrians pass through the road this time as an abnormal event, and sending a green light on-time prolonging signal to traffic lights of the road junction.
In this embodiment, in order to manage risk intersections more efficiently and safely, the method further includes counting abnormal events of pedestrians crossing roads within a specified time, and sending management demand information for intersections with statistics times greater than a normal value.
In this embodiment, the method further includes analyzing each video segment, and analyzing whether the walking speed of pedestrians in the crowd is lower than a set minimum speed, if yes, sending a signal for prolonging the green light on time to traffic lights at the intersection. The special crowd such as the old or children with inconvenient actions in crowd flow is described, and the measures are adopted to ensure safety.
In this embodiment, each video clip is analyzed to analyze whether opposite crowd flows have a hedging phenomenon, if so, the pedestrian crossing is determined to be an abnormal event, and first warning information is sent to the intersection pedestrian. The method for analyzing whether the crowd flow has the opposite impact phenomenon is that particles in each video segment have own motion tracks, the particles can be subjected to horizontal and vertical components between adjacent frames, the similarity between track segments is measured by adopting a partial shape matching strategy, candidate track segment pairs are extracted from the track segments, track characteristics are extracted from the candidate track segment pairs, matching cost is calculated, and the minimum matching cost is used as the similarity of the two track segments. And carrying out hierarchical clustering on the track fragments, clustering the particle track fragments by using a hierarchical clustering algorithm, extracting motion characteristics, and extracting particles including particle size, average speed of particle motion and main direction of particle motion. And judging whether opposite impulse motion exists according to the merging direction of the main directions of the overlapped parts of the particle moving ranges.
And analyzing each video segment, and analyzing whether the crowd flows have irregular surging phenomenon, if so, judging that the pedestrian crosses the road as an abnormal event, and sending second warning information to the intersection pedestrian. The method for analyzing whether the crowd flow has the surge phenomenon is characterized in that the crowd flow state is judged according to the number of particles in the opposite-impact area and the total number of particles on the basis of the disclosed method for analyzing the opposite-impact phenomenon, so that whether the crowd flow is abnormal, namely whether the surge phenomenon exists is judged.
The embodiment further comprises the steps that the traffic flow condition is collected through the second camera at the intersection, if the traffic flow is smaller than the set lower limit value, when the number of pedestrians passing through the road in the estimated green time is larger than the upper limit value, the second camera at the intersection is further used for collecting special crowd information, whether the special crowd can pass or not is estimated according to the set walking speed of the special crowd in the crowded scene and the current green light time, if yes, prompt information is sent, and if no, waiting information is sent. In this way, a prompt is made as to whether a particular crowd is crossing the road at an appropriate time.
The foregoing is merely an embodiment of the present application, and a specific structure and characteristics of common knowledge in the art, which are well known in the scheme, are not described herein, so that a person of ordinary skill in the art knows all the prior art in the application date or before the priority date, can know all the prior art in the field, and has the capability of applying the conventional experimental means before the date, and a person of ordinary skill in the art can complete and implement the present embodiment in combination with his own capability in the light of the present application, and some typical known structures or known methods should not be an obstacle for a person of ordinary skill in the art to implement the present application. It should be noted that modifications and improvements can be made by those skilled in the art without departing from the structure of the present application, and these should also be considered as the scope of the present application, which does not affect the effect of the implementation of the present application and the utility of the patent. The protection scope of the present application is subject to the content of the claims, and the description of the specific embodiments and the like in the specification can be used for explaining the content of the claims.