Subway passenger flow movement trajectory recognition method based on image processing

By selecting the camera with the highest recognition rate in the subway and reasonably switching between cameras based on camera coverage and pedestrian occlusion, the problem of inaccurate subway passenger movement trajectory recognition in video image recognition was solved, achieving more efficient passenger movement trajectory recognition.

CN120451908BActive Publication Date: 2026-02-17BEIJING URBAN CONSTRUCTION DESIGN & DEVELOPMENT GROUP CO LIMITED
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510585841.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2026-02-17
Estimated Expiration
2045-05-08

AI Technical Summary

Technical Problem

Existing technologies for recognizing subway passenger movement trajectories using video images are prone to inaccurate results due to factors such as crowding and building obstructions, leading to errors in movement trajectory recognition.

Method used

By acquiring video images from inside the subway, the system identifies targets and determines whether to switch cameras. It then selects the camera with the highest recognition rate to combine the images, extracts the motion trajectory, and makes reasonable switching based on camera coverage and crowd obstruction to reduce interruptions in the motion trajectory.

Benefits of technology

It improves the accuracy and adaptability of subway passenger movement trajectory recognition, reduces the occurrence of discontinuous movement trajectories, and enhances the convenience and accuracy of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451908B_ABST
    Figure CN120451908B_ABST
Patent Text Reader

Abstract

A subway passenger flow motion trajectory identification method based on image processing, comprising: obtaining an original image shot by an original camera in a subway, confirming an identification target; extracting movement data of the identification target, judging whether a camera needs to be switched; if it is judged that the camera needs to be switched, obtaining an actual position of the identification target, obtaining a backup camera; obtaining a video screen of the backup camera, analyzing the identification degree of the backup camera; screening the camera with the highest identification degree as a docking camera, collecting real-time images of the identification target shot by the docking camera; combining the original image and the real-time image, extracting a target trajectory of the identification target; forming a trajectory set by target trajectories of all identification targets to obtain a subway passenger flow motion trajectory; thus, the motion trajectory disconnection situation can be reduced, the camera can be reasonably switched, the accuracy of the camera identification degree can be improved, and the accuracy, convenience and applicability of the subway passenger flow motion trajectory identification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of subway passenger flow movement trajectory identification, and particularly relates to a subway passenger flow movement trajectory identification method based on image processing. BACKGROUND

[0002] Through identification of the subway passenger flow movement trajectory, the flow of passengers at different time periods and different locations can be deeply understood. This helps the subway operator to reasonably adjust the train operation frequency and departure interval, so as to ensure that there is enough transport capacity to meet passenger demand during the passenger flow peak period, and to avoid resource waste during the passenger flow valley period. This optimization operation scheduling strategy can not only improve the passenger travel experience, but also improve the overall operation efficiency of the subway system. At present, the subway passenger flow movement trajectory is often identified through video images. This technology is relatively convenient and can better adapt to the use environment. However, when identifying the passenger flow movement trajectory using video images, errors in passenger flow movement trajectory identification are easily caused due to the crowding of the crowd, the shielding of the building and other reasons, resulting in inaccurate identification results.

[0003] Therefore, the designer of the present application, in view of the above-mentioned defects, through earnest research and design, and based on years of experience and achievements in the relevant industry, has designed a subway passenger flow movement trajectory identification method based on image processing to overcome the above-mentioned defects. SUMMARY

[0004] The purpose of the present application is to provide a subway passenger flow movement trajectory identification method based on image processing, which can solve the problems of the prior art, reduce the disconnection of the movement trajectory, reasonably switch the camera, improve the accuracy of the camera recognition degree, and improve the accuracy, convenience and applicability of the subway passenger flow movement trajectory identification based on image processing.

[0005] To achieve the above-mentioned purpose, the present application discloses a subway passenger flow movement trajectory identification method based on image processing, characterized by the following steps:

[0006] Step S1, acquiring a video image in the subway and recording it as an original image, identifying a target from the original image, and obtaining a camera corresponding to the original image, recorded as an original camera;

[0007] Step S2, extracting movement data of the identification target from the video image, and determining whether the camera needs to be switched according to the movement data;

[0008] Step S3, if it is determined that the camera needs to be switched, obtaining the actual position of the identification target, and obtaining a backup camera according to the actual position;

[0009] Step S4, acquiring a video image of the backup camera, and analyzing the recognition degree of the backup camera according to the video image;

[0010] Step S5, the camera with the highest recognition degree is selected as the docking camera, and the video image of the recognition target taken by the docking camera is collected as the real-time image;

[0011] Step S6, the original image and the real-time image are combined, the motion trajectory of the recognition target is extracted, and the target trajectory is obtained;

[0012] Step S7, the target trajectories of all recognition targets are formed into a trajectory set, and the subway passenger flow motion trajectory is obtained.

[0013] In step S2, the step of judging whether the camera needs to be switched according to the movement data of the recognition target extracted from the video image comprises the following steps:

[0014] Step S21, the real-time position of the recognition target is extracted from the video image, and it is judged whether the real-time position is changing;

[0015] Step S22, if the real-time position is changing, the movement data of the recognition target is extracted from the video image, and the movement data includes movement speed and movement direction;

[0016] Step S23, according to the movement speed and the movement direction, the movement purpose of the recognition target is judged, and the movement purpose includes taking a car, transferring and getting off;

[0017] Step S24, if the movement purpose is taking a car, the waiting platform for taking a car of the recognition target is estimated according to the movement direction;

[0018] Step S25, a movement path is formed according to the real-time position and the waiting platform for taking a car, the coverage degree of the original camera to the movement path is obtained, and it is judged whether the camera needs to be switched according to the coverage degree;

[0019] Step S26, if the movement purpose is not taking a car, it is judged that the camera needs to be switched.

[0020] In step S25, the step of forming a movement path according to the real-time position and the waiting platform for taking a car, obtaining the coverage degree of the original camera to the movement path, and judging whether the camera needs to be switched according to the coverage degree comprises the following steps:

[0021] Step S251, the movement space area of the movement path is obtained, and the movement space area covered by the original camera is collected and recorded as the covered space area;

[0022] Step S252, it is judged whether there are subway passengers appearing in the non-covered space area in the movement space area, if there are subway passengers appearing, the probability of the recognition target appearing in the non-covered space area is estimated, and the coverage degree of the movement path is obtained according to the probability;

[0023] Step S253, if the subway passenger has appeared, the coverage of the moving path is 100%;

[0024] Step S254, judging whether the coverage of the moving path reaches the preset coverage standard, if reaching the preset coverage standard, judging that the camera does not need to be switched;

[0025] Step S255, if not reaching the preset coverage standard, judging that the camera needs to be switched.

[0026] In step S252, if the subway passenger has appeared, the probability of the identification target appearing in the non-coverage space region is estimated, and the coverage of the moving path is obtained according to the probability, which includes the following steps:

[0027] Step S2521, if the subway passenger has appeared, the common features of the passengers appearing in the non-coverage space region are counted;

[0028] Step S2522, extracting the features of the same type as the common features and recording them as target features, and judging the similarity between the target features and the common features;

[0029] Step S2523, establishing a correlation curve between the similarity and the probability of the identification target appearing in the non-coverage space region, and finding the corresponding probability of the identification target appearing in the non-coverage space region according to the similarity, and recording it as the appearance probability;

[0030] Step S2524, calculating the area ratio of the coverage space region to the moving space region, setting the proportion coefficient of the appearance probability and the area ratio respectively, and calculating the coverage of the moving path according to the proportion coefficient.

[0031] In step S3, if it is judged that the camera needs to be switched, the actual position of the identification target is obtained, and the standby camera is obtained according to the actual position, which includes the following steps:

[0032] Step S31, if it is judged that the camera needs to be switched, the moving path of the identification target is estimated according to the moving direction and the moving purpose;

[0033] Step S32, obtaining the moving path picture photographed in the original camera as the original path picture, and finding the camera containing the original path picture in the photographed picture as the first camera;

[0034] Step S33, calculating the ratio of the original path picture to the photographed picture of the first camera and recording it as the picture ratio;

[0035] Step S34, screening out the first camera whose picture ratio reaches the preset picture ratio threshold, and obtaining the second camera;

[0036] Step S35, deleting the original path picture in the shooting picture of the second camera to obtain a second shooting picture;

[0037] Step S36, obtaining a proportion of the moving path picture in the second shooting picture and recording the proportion as a second proportion, and determining whether the second proportion reaches a preset second proportion threshold;

[0038] Step S37, screening and removing the camera that does not reach the second proportion threshold to obtain a backup camera.

[0039] In step S4, the step of obtaining the video picture of the backup camera and analyzing the recognition degree of the backup camera comprises the following steps:

[0040] Step S41, obtaining the minimum number of times of switching the backup camera to capture the moving path picture;

[0041] Step S42, obtaining the flow direction captured by the backup camera, counting the number of flow directions and recording the number as a direction number, and obtaining a flow occlusion degree according to the direction number;

[0042] Step S43, obtaining a video image captured by the backup camera and recording the video image as a backup image, extracting a subway layout according to the backup image, and obtaining a layout occlusion degree according to the subway layout;

[0043] Step S44, setting a proportion factor of the minimum number of times, the flow occlusion degree and the layout occlusion degree respectively, and calculating the recognition degree of the backup camera according to the proportion factor.

[0044] In step S42, the step of obtaining the flow direction captured by the backup camera, counting the number of flow directions and recording the number as a direction number, and obtaining a flow occlusion degree according to the direction number comprises the following steps:

[0045] Step S421, determining whether the direction number is 1, and if the direction number is not 1, determining whether there is a fixed moving channel in different flow directions;

[0046] Step S422, if there is a fixed moving channel in different flow directions, drawing a channel position three-dimensional map of the fixed moving channel of the flow direction according to the fixed moving channel;

[0047] Step S423, marking the installation position of the backup camera on the channel position three-dimensional map, obtaining a fixed moving channel of the recognition target and recording the fixed moving channel as a recognition moving channel;

[0048] Step S424, obtaining a fixed moving channel existing between the installation position and the recognition moving channel and recording the fixed moving channel as an occlusion channel;

[0049] Step S425, obtaining the average moving speed of passengers in the blocked passage, summing up the average moving speed of passengers in all blocked passages to obtain the average blocking speed;

[0050] Step S426, counting the number of passages in the blocked passage, and calculating the crowd blocking degree in combination with the average blocking speed;

[0051] Step S427, if there is no fixed moving passage in different crowd directions, obtaining the crowd density, and obtaining the crowd blocking degree according to the crowd density;

[0052] Step S428, if the number of directions is 1, obtaining the crowd blocking degree according to the installation position of the backup camera.

[0053] In step S427, the step of obtaining the crowd density and obtaining the crowd blocking degree according to the crowd density if there is no fixed moving passage in different crowd directions, comprises the following steps:

[0054] Step S4271, obtaining the crowd density in the video image of the backup camera and recording it as the reference density;

[0055] Step S4272, obtaining the average moving speed of passengers in the video image of the backup camera and recording it as the reference speed;

[0056] Step S4273, setting the weight ratio of the reference density, the reference speed and the number of directions respectively, and calculating the crowd blocking degree according to the weight ratio.

[0057] In step S428, the step of obtaining the crowd blocking degree according to the installation position of the backup camera if the number of directions is 1, comprises the following steps:

[0058] Step S4281, obtaining the moving speed of passengers in the video image of the backup camera, calculating the difference between the moving speed of the identified target and the moving speed of different passengers, and calculating the mean value of the difference and recording it as the speed difference;

[0059] Step S4282, obtaining the distance between the identified target and the backup camera according to the moving path of the identified target and the installation position of the backup camera and recording it as the target distance;

[0060] Step S4283, calculating the crowd blocking degree in combination with the speed difference, the target distance and the reference density.

[0061] In step S43, the step of obtaining the video image collected by the backup camera and recording it as the backup image, extracting the subway layout according to the backup image, and obtaining the layout blocking degree according to the subway layout, comprises the following steps:

[0062] Step S431, obtaining the local layout in the subway station in the standby image to form a local layout map;

[0063] Step S432, finding the shooting blind area of the standby camera according to the local layout map, and counting the number of blind areas in the shooting blind area;

[0064] Step S433, determining the number of shooting blind areas passed according to the moving path of the identified target and recording the number of passes;

[0065] Step S434, setting the weight coefficients of the number of blind areas, the number of passes and the reference density respectively, and calculating the layout blocking degree according to the weight coefficients.

[0066] From the above, the subway passenger flow motion trajectory recognition method based on image processing has the following effects:

[0067] 1. The recognition method can combine all the pictures to obtain the motion trajectory of the identified target, and further form the subway passenger flow motion trajectory according to the motion trajectories of all the identified targets. In the trajectory recognition, the camera can be switched by selection to reduce the disconnection of the motion trajectory, and the accuracy of the subway passenger flow motion trajectory recognition based on image processing is improved.

[0068] 2. The coverage of the camera is obtained by judging the purpose of the passenger according to the moving data of the passenger, combining the spatial area of the moving path of the identified target covered by the camera and the probability of the identified target appearing in the non-covered area, and comprehensively judging whether the camera needs to be switched. In this way, the camera can be reasonably switched, which not only improves the accuracy of the subway passenger flow motion trajectory recognition, but also improves the convenience of the subway passenger flow motion trajectory recognition based on image processing.

[0069] 3. Different analyses can be made according to the number of pedestrian flow directions in the video image of the standby camera, whether there is a fixed moving channel in the pedestrian flow direction and other different situations, the pedestrian flow blocking degree caused by the pedestrian flow to the identified target in different situations is confirmed, and more accurate results suitable for actual scenes can be obtained through specific analysis of specific problems, so that the recognition degree of the camera is more accurate, and the adaptability of the subway passenger flow motion trajectory recognition based on image processing is improved.

[0070] The detailed content of the application can be obtained through the following description and the attached drawings. BRIEF DESCRIPTION OF DRAWINGS

[0071] Figure 1 The schematic diagram of the subway passenger flow motion trajectory recognition method based on image processing of the application is shown. DETAILED DESCRIPTION

[0072] Reference Figure 1, show the subway passenger flow movement trajectory recognition method based on image processing of the application.

[0073] As shown in Figure 1 The subway passenger flow movement trajectory recognition method based on image processing, specifically can include the following steps:

[0074] Step S1, get the video image in the subway and record it as the original image, confirm the recognition target from the original image, and get the camera corresponding to the original image, record it as the original camera.

[0075] When the subway passenger flow movement trajectory recognition is performed, there are multiple cameras in the subway station, and the shooting pictures of some cameras have overlap, and generally only one camera is used to shoot the recognition target at the same time. Get the video image in the subway and record it as the original image, confirm the recognition target from the original image by using a target detection algorithm (such as YOLO, Faster R-CNN, etc.), and get the camera corresponding to the original image, record it as the original camera. For example, passenger A in the subway station, A, B, C three cameras can shoot passenger A, but the angle of A camera is clearer, and it is easier to identify passenger A, so A camera is used as the original camera, and the picture collected is the original picture. Assuming that only B camera can collect passenger A, then B camera is used as the original camera.

[0076] Step S2, extract the movement data of the recognition target from the video image, and determine whether the camera needs to be switched according to the movement data.

[0077] Step S3, if it is determined that the camera needs to be switched, the actual position of the recognition target is obtained, and the standby camera is obtained according to the actual position.

[0078] Step S4, get the video picture of the standby camera, and analyze the recognition degree of the standby camera according to the video picture.

[0079] Step S5, select the camera with the highest recognition degree as the docking camera, and collect the video image of the recognition target shot by the docking camera as the real-time image.

[0080] If the docking camera still needs to be switched subsequently, the second docking camera, the third docking camera, etc. are obtained by the above method.

[0081] Step S6, combine the original image and the real-time image, extract the movement trajectory of the recognition target, and obtain the target trajectory.

[0082] Combine the original image with the real-time image of all subsequent docking cameras, and splice to form the movement trajectory of the recognition target.

[0083] Step S7, forming a trajectory set by all target trajectories of the identified target, obtaining the subway passenger flow movement trajectory.

[0084] Each passenger is identified as an identified target, and the movement trajectory of the subway passenger flow is obtained by forming a set of target trajectories of all passengers. According to the obtained movement trajectory of the subway passenger flow, a more suitable operation scheme can be generated.

[0085] In actual application, since the subway passengers often move during the ride, the camera cannot completely cover all areas in the subway when identifying the movement trajectory of the subway passenger flow, so the camera needs to be switched. Since there are multiple cameras in the subway, selecting a suitable camera to switch can more accurately and quickly obtain the passenger flow movement trajectory. For example, passenger A gets off the subway vehicle and prepares to exit the station. The A camera cannot completely cover the area from the subway vehicle to the exit, so the camera needs to be switched. The B camera or the C camera can be selected to switch. Since the B camera is blocked, it is easy to lose the tracking of passenger A due to the blockage, so the movement trajectory obtained by selecting the C camera will be more accurate and real. According to the actual situation, a suitable camera is selected to switch, which improves the efficiency and convenience of passenger flow movement trajectory identification.

[0086] Optionally, in step S2, the movement data of the identified target is extracted from the video image, and the step of determining whether the camera needs to be switched according to the movement data can include the following steps:

[0087] Step S21, extracting the real-time position of the identified target from the video image, and determining whether the real-time position is changing.

[0088] When the camera in the subway station identifies the target, it may be that the target gets off the vehicle, and it is identified on the platform. It may be that the target enters the station from the entrance, and it is identified at the entrance. According to whether the real-time position of the identified target is changing, it is determined whether the identified target is moving.

[0089] Step S22, if the real-time position is changing, extracting the movement data of the identified target from the video image, the movement data including the movement speed and the movement direction.

[0090] Step S23, determining the movement purpose of the identified target according to the movement speed and the movement direction, the movement purpose including riding, transferring, and exiting.

[0091] Using classification algorithms such as decision tree, support vector machine (SVM), random forest, etc., the movement speed and direction of the target are mapped to a specific movement purpose (riding, transferring, and exiting), the model is obtained by training the historical movement data, and the movement purpose of the identified target is determined.

[0092] Step S24, if the moving purpose is to take a train, then a waiting platform for taking a train is identified according to the moving direction prediction of the identified target.

[0093] The waiting platform for taking a train is identified according to the moving direction prediction of the identified target.

[0094] Step S25, a moving path is formed according to the real-time position and the waiting platform for taking a train, an original camera coverage degree of the moving path is obtained, and it is judged whether the camera needs to be switched according to the coverage degree.

[0095] Step S26, if the moving purpose is not to take a train, then it is judged that the camera needs to be switched.

[0096] In actual application, if the purpose of the identified target is to transfer or to exit, since the distance of the transfer line and the exit line is relatively long, and floor change is involved, etc., the camera is difficult to cover the complete area, so it is judged that the camera needs to be switched. If it is judged that the moving purpose of the identified target is to take a train, then it is needed to judge whether the camera needs to be switched according to the actual situation. Since the passenger taking a train is not necessarily from the entrance, for example, the passenger gets off at F station of No. 1 train, and the first time the passenger is identified in the subway at F station is at the platform of F station. If the passenger is wrong in the direction and takes the train in the opposite direction, then the moving purpose of the passenger is still to take a train, but the distance is only on the opposite side, so the camera does not need to be switched at this time, because the corresponding camera can cover the moving range of the passenger taking a train.

[0097] Optionally, in step S25, the step of obtaining the camera coverage degree of the moving path according to the real-time position and the waiting platform for taking a train, and judging whether the camera needs to be switched according to the coverage degree, can include the following steps:

[0098] Step S251, a moving space area of the moving path is obtained, and the moving space area covered by the original camera is collected and recorded as a covered space area.

[0099] The moving path between the real-time position and the waiting platform for taking a train is taken as the moving path of the identified target.

[0100] Step S252, it is judged whether there is a subway passenger appearing in the non-covered space area in the moving space area, if there is a subway passenger appearing, then the probability of the identified target appearing in the non-covered space area is predicted, and the coverage degree of the moving path is obtained according to the probability.

[0101] Step S253, if there is no subway passenger appearing, then the coverage degree of the moving path is 100%.

[0102] Step S254, it is judged whether the coverage degree of the moving path reaches a preset coverage degree standard, if the preset coverage degree standard is reached, then it is judged that the camera does not need to be switched.

[0103] Step S255, if the preset coverage criterion is not reached, it is determined that the camera needs to be switched.

[0104] In actual application, in the identification of the moving path of the target, there can be a blind area that cannot be shot by the camera, i.e. a space region that is not covered by the original camera. If no passenger has ever appeared in the non-covered space region, it means that the target cannot reach the region, and thus the remaining regions are all covered by the original camera, and the moving path of the target can be shot, so there is no need to switch the camera. If some regions cannot be shot by the original camera, it means that the target can reach the blind area of the camera, so the original camera can not capture the moving path of the target, and thus the moving path can be incorrect, so it is necessary to determine whether the camera needs to be switched according to the actual situation. Switching the camera can improve the accuracy of the identification of the moving path of the target and reduce the disconnection in the identification process.

[0105] Optionally, in step S252, if a passenger has ever appeared, the probability of the target appearing in the non-covered space region is estimated, and the step of obtaining the coverage of the moving path according to the probability can include the following steps:

[0106] Step S2521, if a passenger has ever appeared, the common features of the passengers appearing in the non-covered space region are counted.

[0107] Generally, the original camera covers a larger region where passengers often appear, and the non-covered region is a region where a small number of passengers appear, so the passengers appearing in the region have some common features. For example, the No. 1 region is a non-covered space region, and the No. 1 region is close to the platform and is relatively dangerous. Therefore, the common features of the passengers appearing in the No. 1 region are that the passengers have weak safety awareness.

[0108] Step S2522, extracting features of the same type as the common features as target features, and determining the similarity between the target features and the common features.

[0109] For example, the common features are that the passengers are young, and the features of the same type as the common features are the ages, and the similarity between the target features and the common features of the target can be obtained by cosine similarity.

[0110] Step S2523, establishing a correlation curve between the similarity and the probability of the target appearing in the non-covered space region, finding the corresponding probability of the target appearing in the non-covered space region according to the similarity, and recording the probability as the appearance probability.

[0111] The higher the similarity is, the more likely the target is to appear in the non-covered space region, and thus the higher the appearance probability is.

[0112] Step S2524, calculate the area ratio of the coverage space area to the moving space area, set the proportional coefficient of the appearance probability and the area ratio respectively, and calculate the coverage degree of the moving path according to the proportional coefficient.

[0113] In actual application, when the identification target is likely to appear in the non-coverage space area, the original camera may be disconnected and thus error occurs when collecting the moving track of the identification target. Therefore, the greater the appearance probability is, the smaller the coverage degree of the moving path is. The greater the area ratio of the coverage space area to the moving space area is, the greater the coverage degree of the original camera to the moving path is. If there is no non-coverage space area, the coverage degree of the original camera to the moving path is 100%. For example, if the proportional coefficients of the appearance probability and the area ratio are set as 0.5 and 0.5 respectively, and the appearance probability and the area ratio are 40% and 40% respectively, the coverage degree of the moving path is 0.5*40%+0.5*40%=0.4.

[0114] Optionally, in step S3, if it is judged that the camera needs to be switched, the actual position of the identification target is obtained, and the step of obtaining the standby camera according to the actual position comprises the following steps:

[0115] Step S31, if it is judged that the camera needs to be switched, the moving path of the identification target is estimated according to the moving direction and the moving purpose.

[0116] If the camera needs to be switched, the moving purpose of the identification target is likely to be transfer or outbound, and thus the moving path cannot be formed according to the real-time position and the waiting station platform. The moving path of the identification target can be estimated according to the moving direction and the moving purpose. According to the moving direction and the moving purpose, the moving path most frequently used by most passengers is taken as the moving path of the identification target. For example, for the passengers going from the platform to the transfer channel, the frequency of the passengers choosing different paths in this scenario is counted, and the path with the highest frequency is taken as the estimated moving path. Meanwhile, the estimated path is dynamically adjusted in combination with the real-time passenger flow information and the operation of the subway (such as temporary closure of part of the channel). If the moving purpose is to take the train and it is judged that the camera needs to be switched, the moving path formed according to the real-time position and the waiting station platform can be used as the estimated moving path.

[0117] Step S32, the moving path picture photographed in the original camera is obtained and marked as the original path picture, and the camera containing the original path picture in the photographed picture is searched as the first camera.

[0118] Because the coverage of the camera is limited, when the camera needs to be switched, it indicates that the original camera cannot completely cover the moving path. Therefore, a path picture in the moving path that can be shot by the original camera is obtained as an original path picture. The camera containing the original path picture is searched for to avoid disconnection during the collection and identification of the motion trajectory of the target. For example, the A camera shoots points 1 to 3 on the path, and the B camera shoots points 4 to 5 on the path. If the A camera is switched to the B camera, the trajectory between points 3 and 4 cannot be identified, which is prone to errors. Therefore, the camera that can shoot points 1 to 3 on the path is searched for as the first camera.

[0119] In step S33, the ratio of the original path picture to the shooting picture of the first camera is calculated and recorded as a picture ratio.

[0120] The picture ratio refers to the area ratio of the picture.

[0121] In step S34, the first camera whose picture ratio reaches a preset picture ratio threshold value is screened and removed, and a second camera is obtained.

[0122] If the original path picture occupies too large a proportion in the shooting picture of the first camera, the role of the camera in the identification of the motion trajectory after switching will be small. For example, the A camera shoots points 1 to 5 on the path, and the B camera shoots points 2 to 6 on the path. The overlapping part is points 2 to 5 on the path. After switching, only the trajectory of point 6 on the path is added, and the role is small. Because the shooting range of the camera is limited, the more the overlapping picture content is, the less the effective content part is, which will waste the repeated shooting of the camera and cause resource waste.

[0123] In step S35, the original path picture in the shooting picture of the second camera is removed, and a second shooting picture is obtained.

[0124] The original path picture in the shooting picture of the second camera is removed, and a second shooting picture is obtained.

[0125] In step S36, the proportion of the moving path picture in the second shooting picture is obtained and recorded as a second proportion, and whether the second proportion reaches a preset second proportion threshold value is judged.

[0126] In step S37, the camera that does not reach the second proportion threshold value is screened and removed, and a standby camera is obtained.

[0127] In actual application, the original path picture is deleted to obtain the path picture shot by the second camera itself. For example, the A camera shoots the path from point No. 1 to point No. 5, and the B camera shoots the path from point No. 2 to point No. 6. Therefore, the path picture without overlapping in the B camera shooting picture is point No. 6. If the effective content is too little, the effect is low, and switching to the other camera can cause resource waste and cannot obtain effective trajectory pictures. Therefore, the camera with less effective content is screened and removed according to the threshold value.

[0128] Optionally, in step S4, the video picture of the standby camera is obtained, and the step of analyzing the recognition degree of the standby camera according to the video picture can include the following steps:

[0129] In step S41, the minimum number of times of switching the camera for collecting the moving path picture after the standby camera is switched is obtained.

[0130] By simulating different standby camera switching schemes, the number of times of switching the camera for collecting the moving path picture of the recognition target is recorded under each scheme, and the number of times corresponding to the scheme with the least number of times is selected as the minimum number of times. The significance of obtaining the minimum number of times lies in evaluating the convenience and stability of the standby camera in the process of collecting the moving path picture. A lower minimum number of times means that the moving path picture can be collected with fewer camera switching operations when the standby camera is used, which reduces the risk of target loss and trajectory disconnection caused by frequent camera switching, thereby improving the efficiency and accuracy of passenger flow motion trajectory recognition.

[0131] Since the moving path is long, multiple cameras may need to be switched to completely recognize the moving path. For example, if the original camera is the A camera, the E, F, and G cameras need to be switched again after the B camera is switched to completely collect and recognize the motion trajectory of the target. Therefore, the minimum number of times of switching the camera is 3. If the C camera is switched from the A camera, only the D camera needs to be switched again to complete the trajectory collection of the target, and the minimum number of times of switching the camera is 1.

[0132] In step S42, the direction of the passenger flow collected by the standby camera is obtained, the number of directions is counted and recorded as the direction number, and the passenger flow occlusion degree is obtained according to the direction number.

[0133] Different cameras have different angles, so the range of passengers collected is different, and the direction of the passenger flow involved is also different. For example, the camera with the focus on the station has disordered passenger flow direction. The camera with the focus on the exit and entrance usually has an orderly passenger flow direction in the shot picture.

[0134] Step S43, the video image collected by the backup camera is obtained and recorded as a backup image, a subway layout is extracted according to the backup image, and a layout occlusion degree is obtained according to the subway layout.

[0135] Step S44, a minimum number, a proportion factor of a passenger flow occlusion degree and a layout occlusion degree are respectively set, and a recognition degree of the backup camera is calculated according to the proportion factor.

[0136] In actual application, after switching the camera, the motion trajectory of the recognition target needs to be collected and recognized by switching the camera multiple times, which is inconvenient for passenger flow motion trajectory recognition, and the recognition target may be lost due to the switching of the camera, thereby causing the inaccuracy of the motion trajectory. Therefore, the more the minimum number is, the lower the recognition degree of the backup camera is. The greater the passenger flow occlusion degree and the layout occlusion degree are, the more easily the backup camera is affected by occlusion in the recognition process, and the greater the difficulty of recognition is, and therefore the lower the recognition degree of the backup camera is. For example, the proportion factors of the minimum number, the passenger flow occlusion degree and the layout occlusion degree are respectively set as 0.2, 0.4 and 0.4, the minimum number, the passenger flow occlusion degree and the layout occlusion degree are respectively 2, 2 and 1, and the recognition degree of the backup camera is 2*0.2+2*0.4+1*0.4=1.6.

[0137] Optionally, in step S42, a passenger flow direction collected by the backup camera is obtained, the number of the passenger flow direction is counted and recorded as a direction number, and the step of obtaining the passenger flow occlusion degree according to the direction number can include the following steps.

[0138] Step S421, whether the direction number is 1 is judged, if the direction number is not 1, whether there is a fixed moving channel in different passenger flow directions is judged.

[0139] The passenger flow directions under different cameras are different, some of which can have only one flow direction, for example, when the interchange channel allows only one direction, there is only one passenger flow direction. When the interchange channel allows two directions, there are two passenger flow directions. After entering the station, the flow of passengers can be disordered, and therefore there are multiple passenger flow directions.

[0140] Step S422, if there is a fixed moving channel in different passenger flow directions, a channel position three-dimensional diagram of the fixed moving channel of the passenger flow direction is drawn according to the fixed moving channel.

[0141] Some passenger flow directions are orderly, for example, the entry and exit of the station and the interchange are provided with a specified channel, and therefore the passenger flow direction has a fixed moving channel. In some places in the station, there is no fixed moving channel, and therefore the movement of passengers is disordered.

[0142] Step S423, the installation position of the backup camera is marked on the channel position three-dimensional diagram, and a fixed moving channel of the recognition target is obtained and recorded as a recognition moving channel.

[0143] The fixed moving channel in which the identification target is located is recorded as an identification moving channel.

[0144] In step S424, the fixed moving channel existing between the installation position and the identification moving channel is obtained and recorded as a shielding channel.

[0145] When there is a fixed moving channel, a fixed shielding is generated. For example, there are three channels A, B and C existing between the identification moving channel and the installation position, and the crowd movement of the three channels will cause a fixed shielding to the identification moving channel. In the middle of the three channels, the D channel is shielded by the identification moving channel, and the D channel does not shield the identification moving channel.

[0146] In step S425, the average passenger moving speed of the shielding channel is obtained, and the average passenger moving speeds of all the shielding channels are summed to obtain the average shielding speed.

[0147] The moving speed of the passengers in each shielding channel is obtained, the average value of the moving speed of the passengers in the channel is calculated to obtain the average passenger moving speed of the shielding channel, and the average passenger moving speeds of all the shielding channels are summed to obtain the average shielding speed.

[0148] In step S426, the number of channels of the shielding channel is counted, and the crowd shielding degree is calculated in combination with the average shielding speed.

[0149] The weight ratios of the number of channels and the average shielding speed are set respectively, and the crowd shielding degree is calculated according to the weight ratios. The more the number of channels, the greater the shielding degree caused to the identification target, so the crowd shielding degree is greater. The greater the average shielding speed, the faster the moving frequency of other passengers, which is more likely to repeatedly cause shielding to the identification target, so the crowd shielding degree is greater. For example, the weight ratios of the number of channels and the average shielding speed are set as 30% and 70% respectively, and the number of channels and the average shielding speed are 3 and 0.5 m / s respectively, so the crowd shielding degree is 3x30%+0.5x70%=1.25.

[0150] In step S427, if there is no fixed moving channel in different crowd directions, the crowd density is obtained, and the crowd shielding degree is obtained according to the crowd density.

[0151] In step S428, if the number of directions is 1, the crowd shielding degree is obtained according to the installation position of the standby camera.

[0152] In actual application, when the trajectory of the identified target is collected, the passenger flow will change and cause a certain degree of occlusion to the identified target, and the degree of occlusion in different situations is different. If the passengers have fixed moving channels, the occlusion caused by the identified target is also relatively fixed, and thus the degree of occlusion is calculated according to the number of channels and the average occlusion speed. However, if there is no fixed moving channel in the passenger flow direction, the occlusion will be more disordered, and thus the degree of occlusion is calculated according to different ways. When the number of passenger flow directions is 1, there is no passenger flow in other directions to cause greater occlusion, and the degree of occlusion is different. Specific problems are analyzed, which is beneficial to obtain more accurate and more suitable data for actual scenes.

[0153] Optionally, in step S427, if there is no fixed moving channel in different passenger flow directions, the crowd density is obtained, and the step of obtaining the degree of passenger flow occlusion according to the crowd density can include the following steps:

[0154] In step S4271, the crowd density in the video image of the backup camera is obtained and recorded as a reference density.

[0155] The crowd density refers to the passenger density, i.e., the number of passengers per square meter.

[0156] In step S4272, the average moving speed of the passengers in the video image of the backup camera is obtained and recorded as a reference speed.

[0157] The average value of the moving speed is calculated according to the moving speed of all passengers, and the average moving speed is obtained and recorded as a reference speed.

[0158] In step S4273, the weight ratio of the reference density, the reference speed, and the number of directions is set respectively, and the degree of passenger flow occlusion is calculated according to the weight ratio.

[0159] The weight ratio is determined by a multi-criteria decision method such as analytic hierarchy process (AHP), for example, the weight ratio of the reference density, the reference speed, and the number of directions is set to 30%, 40%, and 30% respectively, the reference density, the reference speed, and the number of directions are 4 people per square meter, 0.5 meters per second, and 2 respectively, and thus the degree of passenger flow occlusion is 4×30%+0.5×40%+2×30%=2.

[0160] In actual application, the passenger movement is disordered because there is no fixed moving channel for the passenger flow direction, and passengers in any direction can block the identification target, thereby affecting the collection of the movement trajectory of the identification target. The more the crowd density is, the more the space is crowded in the high-density environment, thereby increasing the possibility of occlusion. The faster the average moving speed of the passengers is, the more occlusion is likely to occur. When the passenger flow direction increases, different directions of passenger flow will form intersection points in the subway space, which are prone to occlusion. Therefore, when the passengers are in a disordered movement state, more channel quantity, larger crowd density and faster reference speed will increase the passenger flow occlusion degree.

[0161] Optionally, in step S428, if the number of directions is 1, the step of obtaining the passenger flow occlusion degree according to the installation position of the backup camera can include the following steps:

[0162] In step S4281, the moving speed of the passengers in the video image of the backup camera is obtained, the difference between the moving speed of the identification target and the moving speed of the different passengers is calculated, the mean value of the difference is calculated and recorded as the speed difference.

[0163] The passenger moving speed in the video image of the backup camera refers to the moving speed of all passengers, the difference between the moving speed of the identification target and the moving speed of all passengers is calculated, and the mean value of the difference is calculated.

[0164] In step S4282, the distance between the identification target and the backup camera is obtained according to the moving path of the identification target and the installation position of the backup camera and recorded as the target distance.

[0165] In step S4283, the passenger flow occlusion degree is calculated by combining the speed difference, the target distance and the reference density.

[0166] In actual application, if the number of passenger flow direction is 1, there is no occlusion of the identification target by passengers in other directions. The occlusion of the identification target comes from passengers in the same direction, but if the identification target moves at the same speed as other passengers, the entire passengers are in parallel movement, and there is no change in the occlusion of the identification target, and no additional occlusion is added. Therefore, the greater the speed difference between the identification target and the passengers, the more likely it is to cross the speed of the surrounding passengers, and thus the greater the passenger flow occlusion. The weight ratios of the speed difference, target distance and reference density are set respectively, and the passenger flow occlusion is calculated according to the weight ratios. The greater the target distance and the reference density, the more passengers there are between the identification target and the camera, and thus the greater the occlusion, and thus the greater the passenger flow occlusion. For example, the weight ratios of the speed difference, target distance and reference density are set as 60%, 20% and 20% respectively, and the speed difference, target distance and reference density are 0.2 m / s, 5 m and 6 persons / m2 respectively, and thus the passenger flow occlusion is 0.2 x 60% + 5 x 20% + 6 x 20% = 2.32.

[0167] Optionally, in step S43, a video image captured by the backup camera is obtained and denoted as a backup image, and the steps of obtaining the subway layout according to the backup image and obtaining the layout occlusion degree according to the subway layout can include the following steps.

[0168] In step S431, a local layout in the subway station in the backup image is obtained to form a local layout map.

[0169] The local layout map refers to the subway layout within the range covered by the backup image, and thus is a local subway layout.

[0170] In step S432, a blind area of the backup camera is found according to the local layout map, and the number of blind areas in the blind area is counted.

[0171] The area that cannot be photographed by the backup camera in the covered area is found as the blind area according to the local layout map. For example, the area behind the billboard is a blind area because it is occluded by the billboard.

[0172] In step S433, the number of blind areas passed by the identification target is determined according to the moving path of the identification target and denoted as the number of passages.

[0173] For example, there are four blind areas A, B, C and D in the area, and according to the moving path of the identification target, it is determined that the moving path will pass through two areas A and C, and thus the number of passages is 2.

[0174] In step S434, the weight coefficients of the number of blind areas, the number of passages and the reference density are set respectively, and the layout occlusion degree is calculated according to the weight coefficients.

[0175] The correlation degree between the number of blind areas, the number of passes, the reference density and the layout shielding degree is quantitatively analyzed by using a data analysis method such as principal component analysis (PCA) or grey correlation analysis, so as to determine the corresponding weight coefficients. For example, the weight coefficients of the number of blind areas, the number of passes and the reference density are set as 0.4, 0.3 and 0.3 respectively, and the number of blind areas, the number of passes and the reference density are 4, 2 and 4 persons per square meter respectively, then the layout shielding degree is 4*0.4+2*0.3+4*0.3=3.4.

[0176] In actual application, the more the number of blind areas is, the greater the probability of the identified target passing through the blind area is, so it is easier to cause the track to be disconnected, thereby increasing the layout shielding degree. Similarly, the more the number of blind areas that the identified target passes through is, the longer the time of the motion track being disconnected is, and the greater the layout shielding degree is. Similarly, the greater the reference density is, the more the number of passengers under the backup camera is, so it increases the probability of the identified target reaching the blind area, thereby increasing the layout shielding degree.

[0177] It is obvious that the above description and record are only examples and are not intended to limit the disclosure, application or use of the present application. Although the embodiments have been described in the examples and in the accompanying drawings, the present application is not limited to the specific examples illustrated by the drawings and described in the examples as the best mode currently considered to implement the teachings of the present application, and the scope of the present application will include any embodiments falling within the preceding specification and the appended claims.

Claims

1. A metro passenger flow motion trajectory identification method based on image processing, characterized in that The method comprises the following steps: Step S1, acquiring a video image in the subway and recording as an original image, identifying a recognition target from the original image, and obtaining a camera corresponding to the original image and recording as an original camera; Step S2, extracting movement data of the recognition target from the video image, and judging whether the camera needs to be switched according to the movement data; Step S3, if it is judged that the camera needs to be switched, obtaining an actual position of the recognition target, and obtaining a backup camera according to the actual position; Step S4, acquiring a video screen of the backup camera, and analyzing the recognition degree of the backup camera according to the video screen, which comprises the following steps: Step S41, acquiring the lowest number of times of switching the backup camera to capture the moving path screen after shooting; Step S42, acquiring a people flow direction collected by the backup camera, counting the number of the people flow direction and recording as a direction number, and obtaining a people flow shielding degree according to the direction number; Step S43, acquiring a video image collected by the backup camera and recording as a backup image, extracting a subway layout according to the backup image, and obtaining a layout shielding degree according to the subway layout; Step S44, setting a proportional factor of the lowest number of times, the people flow shielding degree and the layout shielding degree respectively, and calculating the recognition degree of the backup camera according to the proportional factor; Step S5, selecting a camera with the highest recognition degree as a docking camera, and collecting a video image of the recognition target shot by the docking camera as a real-time image; Step S6, combining the original image and the real-time image, extracting a motion trajectory of the recognition target, and obtaining a target trajectory; Step S7, forming a trajectory set of target trajectories of all recognition targets, and obtaining a subway passenger flow motion trajectory. 2.The metro passenger flow motion trajectory identification method based on image processing according to claim 1, characterized in that, In step S2, the step of extracting movement data of the recognition target from the video image and judging whether the camera needs to be switched according to the movement data comprises the following steps: Step S21, extracting a real-time position of the recognition target from the video image, and judging whether the real-time position is changing; Step S22, if the real-time position is changing, extracting movement data of the recognition target from the video image, wherein the movement data comprises a moving speed and a moving direction; Step S23, judging a moving purpose of the recognition target according to the moving speed and the moving direction, wherein the moving purpose comprises taking a train, transferring and getting off; Step S24, if the moving purpose is taking a train, estimating a waiting train platform of the recognition target according to the moving direction; Step S25, forming a moving path according to the real-time position and the waiting train platform, obtaining a coverage degree of the moving path by the original camera, and judging whether the camera needs to be switched according to the coverage degree; Step S26, if the moving purpose is not taking a train, judging that the camera needs to be switched.

3. The metro passenger flow motion trajectory identification method based on image processing according to claim 2, characterized in that, In step S25, the step of forming a moving path according to the real-time position and the waiting train platform, obtaining a coverage degree of the moving path by the original camera, and judging whether the camera needs to be switched according to the coverage degree comprises the following steps: Step S251, acquiring a moving space region of the moving path, collecting a moving space region covered by the original camera and recording as a covered space region; Step S252, judging whether there is subway passenger appearing in the non-coverage space region in the moving space region, if there is subway passenger appearing, estimating the probability of the identification target appearing in the non-coverage space region, and obtaining the coverage degree of the moving path according to the probability; Step S253, if there is no subway passenger appearing, the coverage degree of the moving path is 100%; Step S254, judging whether the coverage degree of the moving path reaches the preset coverage degree standard, if reaching the preset coverage degree standard, judging that the camera switching is not needed; Step S255, if not reaching the preset coverage degree standard, judging that the camera switching is needed.

4. The metro passenger flow motion trajectory identification method based on image processing according to claim 3, characterized in that, In step S252, the step of estimating the probability of the identification target appearing in the non-coverage space region if there is subway passenger appearing, and obtaining the coverage degree of the moving path according to the probability, comprises the following steps: Step S2521, if there is subway passenger appearing, counting the common features of the passengers appearing in the non-coverage space region; Step S2522, extracting the features of the same type as the common features of the identification target and recording the features as target features, and judging the similarity between the target features and the common features; Step S2523, establishing a correlation curve between the similarity and the probability of the identification target appearing in the non-coverage space region, searching for the corresponding probability of the identification target appearing in the non-coverage space region according to the similarity, and recording the probability as the appearing probability; Step S2524, calculating the area ratio of the coverage space region to the moving space region, setting the proportion coefficient of the appearing probability and the area ratio respectively, and calculating the coverage degree of the moving path according to the proportion coefficient.

5. The image processing-based metro passenger flow motion trajectory identification method according to claim 1, characterized in that, In step S3, the step of obtaining the actual position of the identification target if judging that the camera switching is needed, and obtaining the standby camera according to the actual position, comprises the following steps: Step S31, if judging that the camera switching is needed, estimating the moving path of the identification target according to the moving direction and the moving purpose; Step S32, obtaining the moving path picture of the moving path shot in the original camera as the original path picture, and searching for the camera containing the original path picture in the shot picture as the first camera; Step S33, calculating the ratio of the original path picture to the shot picture of the first camera and recording the ratio as the picture ratio; Step S34, screening and removing the first camera whose picture ratio reaches the preset picture ratio threshold, and obtaining the second camera; Step S35, deleting the original path picture in the shot picture of the second camera to obtain the second shot picture; Step S36, obtaining the proportion of the moving path picture in the second shot picture and recording the proportion as the second proportion, and judging whether the second proportion reaches the preset second proportion threshold; Step S37, screening and removing the camera which does not reach the second proportion threshold, and obtaining the standby camera. 6.The metro passenger flow motion trajectory identification method based on image processing according to claim 1, characterized in that, In step S42, the step of obtaining the flow direction collected by the standby camera, counting the number of the flow direction and recording the number as the direction number, and obtaining the flow shielding degree according to the direction number, comprises the following steps: Step S421, judging whether the direction number is 1, if the direction number is not 1, judging whether there is fixed moving channel in different flow directions; Step S422, if there are fixed moving channels in different flow directions, draw a channel position three-dimensional graph of the fixed moving channel according to the fixed moving channel; Step S423, mark the installation position of the backup camera on the channel position three-dimensional graph, obtain the fixed moving channel of the identification target and mark it as the identification moving channel; Step S424, obtain the fixed moving channel between the installation position and the identification moving channel and mark it as the shielding channel; Step S425, obtain the average passenger moving speed of the shielding channel, sum the average passenger moving speeds of all the shielding channels to obtain the average shielding speed; Step S426, count the number of channels of the shielding channel, and calculate the flow shielding degree in combination with the average shielding speed; Step S427, if there are no fixed moving channels in different flow directions, obtain the crowd density, and obtain the flow shielding degree according to the crowd density; Step S428, if the number of directions is 1, obtain the flow shielding degree according to the installation position of the backup camera.

7. The metro passenger flow motion trajectory identification method based on image processing according to claim 1, characterized in that, In step S427, the step of obtaining the crowd density and obtaining the flow shielding degree according to the crowd density if there are no fixed moving channels in different flow directions, comprises the following steps: Step S4271, obtain the crowd density in the video image of the backup camera and mark it as the reference density; Step S4272, obtain the average moving speed of the passengers in the video image of the backup camera and mark it as the reference speed; Step S4273, set the weight ratio of the reference density, the reference speed and the number of directions respectively, and calculate the flow shielding degree according to the weight ratio. 8.The metro passenger flow motion trajectory identification method based on image processing according to claim 6, characterized in that, In step S428, the step of obtaining the flow shielding degree according to the installation position of the backup camera if the number of directions is 1, comprises the following steps: Step S4281, obtain the moving speed of the passengers in the video image of the backup camera, calculate the difference between the moving speed of the identification target and the moving speed of different passengers, calculate the average value of the difference and mark it as the speed difference; Step S4282, obtain the distance between the identification target and the backup camera according to the moving path of the identification target and the installation position of the backup camera and mark it as the target distance; Step S4283, calculate the flow shielding degree in combination with the speed difference, the target distance and the reference density. 9.The metro passenger flow motion trajectory identification method based on image processing according to claim 1, characterized in that, In step S43, the step of obtaining the video image collected by the backup camera and marking it as the backup image, extracting the subway layout according to the backup image, and obtaining the layout shielding degree according to the subway layout, comprises the following steps: Step S431, obtain the local layout in the subway station in the backup image, and form a local layout graph; Step S432, find the shooting blind area of the backup camera according to the local layout graph, and count the number of blind areas; Step S433, judge the number of shooting blind areas passed according to the moving path of the identification target and mark it as the passing number; Step S434, set the weight coefficients of the number of blind areas, the passing number and the reference density respectively, and calculate the layout shielding degree according to the weight coefficients.

Citation Information

Patent Citations

  • Image processing method and system for intelligent security and protection monitoring

    CN118887622A