Subway passenger flow movement track identification method based on image processing

By reasonably switching cameras in the subway, combining mobile data and subway layout analysis, the problem of disconnection in subway passenger flow trajectory recognition is solved, the accuracy and applicability of the recognition is improved, and more accurate passenger flow trajectory data is provided.

CN120451908AActive Publication Date: 2025-08-08BEIJING URBAN CONSTRUCTION DESIGN & DEVELOPMENT GROUP CO LIMITED
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When identifying the movement trajectory of subway passenger flow, the prior art is prone to inaccurate identification results due to crowded people and blocked buildings, and the unreasonable camera switching leads to disconnection of the movement trajectory.

Method used

By obtaining video images in the subway, confirming the recognition target and determining whether the camera needs to be switched, filtering the camera with the highest recognition, combining mobile data and subway layout to analyze the coverage and occlusion of the camera, and reasonably switching the camera to reduce disconnection of the motion trajectory and improve recognition accuracy and applicability.

Benefits of technology

It effectively reduces the disconnection of movement trajectory, improves the accuracy and convenience of subway passenger flow trajectory recognition, adapts to different subway environments, and provides more accurate passenger flow trajectory data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451908A_ABST
    Figure CN120451908A_ABST
Patent Text Reader

Abstract

A subway passenger flow movement track identification method based on image processing comprises the following steps: acquiring an original image shot by an original camera in a subway, and confirming an identification target; extracting movement data of the recognized target, and judging whether a camera needs to be switched or not; if it is judged that the camera needs to be switched, the actual position of the recognition target is obtained, and a standby camera is obtained; acquiring a video picture of the standby camera, and analyzing the recognition degree of the standby camera; screening the camera with the highest recognition degree as a docking camera, and collecting a real-time image of the recognition target shot by the docking camera; combining the original image and the real-time image, and extracting a target track of the recognition target; forming a trajectory set by the target trajectories of all the identification targets to obtain a subway passenger flow movement trajectory; therefore, the situation of disconnection of the motion trail can be reduced, the cameras are reasonably switched, the accuracy of the recognition degree of the cameras is improved, and the accuracy, convenience and applicability of subway passenger flow motion trail recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of subway passenger flow motion trajectory recognition, and in particular to a subway passenger flow motion trajectory recognition method based on image processing. Background Art

[0002] By identifying subway passenger trajectories, we can gain a deeper understanding of passenger movements at different times and locations. This helps subway operators rationally adjust train frequency and departure intervals, ensuring sufficient capacity to meet passenger demand during peak periods and avoiding resource waste during low periods. This optimized operational scheduling strategy not only enhances the passenger experience but also improves the overall operational efficiency of the subway system. Currently, subway passenger trajectories are often identified through video images, a technology that is more convenient and adaptable to different environments. However, using video images to identify passenger trajectories can easily lead to errors in passenger trajectory recognition due to factors such as crowds and obstructions from buildings, resulting in inaccurate recognition results.

[0003] To this end, in view of the above-mentioned defects, the designers of the present invention have conducted intensive research and design, and integrated their long-term experience and achievements in related industries to research and design a subway passenger flow trajectory recognition method based on image processing to overcome the above-mentioned defects. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for identifying subway passenger flow motion trajectories based on image processing, which can solve the problems of the existing technology, reduce the disconnection of motion trajectories, reasonably switch cameras, improve the accuracy of camera recognition, and improve the accuracy, convenience and applicability of subway passenger flow motion trajectory identification based on image processing.

[0005] To achieve the above object, the present invention discloses a method for identifying subway passenger flow trajectory based on image processing, which is characterized by comprising the following steps: Step S1, obtaining a video image in the subway and recording it as an original image, confirming the recognition target from the original image, and obtaining the camera corresponding to the original image and recording it as the original camera; Step S2, extracting the movement data of the identified target from the video image, and determining whether to switch the camera according to the movement data; Step S3: If it is determined that the camera needs to be switched, the actual position of the recognition target is obtained, and a backup camera is obtained according to the actual position; Step S4, obtaining the video image of the backup camera, and analyzing the recognition degree of the backup camera based on the video image; Step S5: Select the camera with the highest recognition rate as the docking camera, and collect the video image of the recognized target captured by the docking camera as a real-time image; Step S6, combining the original image and the real-time image to extract the motion trajectory of the identified target and obtain the target trajectory; Step S7: The target trajectories of all identified targets are combined into a trajectory set to obtain the subway passenger flow trajectory.

[0006] In step S2, the step of extracting the movement data of the identified target from the video image and determining whether the camera needs to be switched based on the movement data includes the following steps: Step S21, extracting the real-time position of the identified target from the video image, and determining whether the real-time position is changing; Step S22: if the real-time position is changing, extracting movement data of the identified target from the video image, wherein the movement data includes movement speed and movement direction; Step S23, judging the moving purpose of the identified target based on the moving speed and moving direction, wherein the moving purpose includes boarding, transferring, and exiting the station; Step S24: If the moving purpose is to take a bus, the waiting platform of the target is estimated and identified based on the moving direction; Step S25: A moving path is formed based on the real-time position and the waiting platform, and the coverage of the moving path by the original camera is obtained. Based on the coverage, it is determined whether the camera needs to be switched; Step S26: If the purpose of movement is not to take a vehicle, it is determined that the camera needs to be switched.

[0007] In step S25, the steps of forming a moving path based on the real-time position and the waiting platform, obtaining the coverage of the moving path by the original camera, and determining whether to switch cameras based on the coverage include the following steps: Step S251, obtaining the moving space area of the moving path, collecting the moving space area covered by the original camera and recording it as the covered space area; Step S252: Determine whether a subway passenger has appeared in the uncovered space area within the moving space area. If a subway passenger has appeared, estimate the probability of the identified target appearing in the uncovered space area, and obtain the coverage of the moving path based on the probability. Step S253: If no subway passenger has appeared, the coverage of the moving path is 100%; Step S254, determining whether the coverage of the moving path meets a preset coverage standard. If so, it is determined that there is no need to switch cameras. Step S255: If the preset coverage standard is not reached, it is determined that the camera needs to be switched.

[0008] In step S252, if a subway passenger has appeared, the probability of the identified target appearing in the uncovered space area is estimated, and the coverage of the moving path is obtained according to the probability, including the following steps: Step S2521: If a subway passenger has appeared, then the common features of the passengers who appeared in the non-covered space area are counted; Step S2522: extract the same type of features of the recognition target and the common features and record them as target features, and determine the similarity between the target features and the common features; Step S2523: Establish a correlation curve between the similarity and the probability of the identified target appearing in the uncovered space area, and obtain the probability of the corresponding identified target appearing in the uncovered space area based on the similarity, and record it as the appearance probability; Step S2524: Calculate the area ratio of the coverage space area to the movement space area, set proportional coefficients of the occurrence probability and the area ratio respectively, and calculate the coverage of the movement path according to the proportional coefficients.

[0009] In step S3, if it is determined that the camera needs to be switched, the actual position of the identified target is obtained, and the step of obtaining a backup camera according to the actual position includes the following steps: Step S31: If it is determined that the camera needs to be switched, the moving path of the identified target is estimated based on the moving direction and moving purpose; Step S32: obtaining the moving path image captured by the original camera and recording it as the original path image, and searching for a camera that captures the original path image as the first camera; Step S33, calculating the ratio of the original path image to the shooting image of the first camera and recording it as the image ratio; Step S34, filtering out the first camera whose picture ratio reaches a preset picture ratio threshold, and obtaining the second camera; Step S35, deleting the original path image in the shooting image of the second camera to obtain a second shooting image; Step S36, obtaining a proportion of the moving path image in the second shooting image and recording it as a second proportion, and determining whether the second proportion reaches a preset second proportion threshold; Step S37: Filter and remove cameras that do not reach the second percentage threshold to obtain backup cameras.

[0010] In step S4, the step of obtaining the video image of the backup camera and analyzing the recognition degree of the backup camera based on the video image includes the following steps: Step S41, obtaining the minimum number of camera switching times for capturing the moving path image after switching to the standby camera for shooting; Step S42: Obtain the direction of the crowd flow captured by the backup camera, count the number of crowd flow directions and record it as the number of directions, and obtain the crowd flow obstruction degree based on the number of directions; Step S43: obtaining a video image captured by a backup camera and recording it as a backup image, extracting the subway layout based on the backup image, and obtaining the layout occlusion degree based on the subway layout; Step S44 , respectively setting the scaling factors of the minimum number of times, the crowd occlusion degree, and the layout occlusion degree, and calculating the recognition degree of the backup camera based on the scaling factors.

[0011] In step S42, the steps of obtaining the crowd flow directions captured by the backup camera, counting the number of crowd flow directions and recording the number of directions, and obtaining the crowd flow obstruction degree according to the number of directions include the following steps: Step S421: determine whether the number of directions is 1. If the number of directions is not 1, determine whether there are fixed moving channels for different pedestrian flow directions. Step S422: If there are fixed moving channels in different crowd flow directions, a three-dimensional map of the channel positions of the fixed moving channels in the crowd flow directions is drawn based on the fixed moving channels; Step S423: Mark the installation position of the backup camera on the three-dimensional channel position map, obtain the fixed moving channel of the recognition target and record it as the recognized moving channel; Step S424, obtaining a fixed moving channel between the installation position and the identified moving channel and recording it as a blocking channel; Step S425, obtaining the average moving speed of passengers in the blocked passage, and summing the average moving speeds of passengers in all blocked passages to obtain the average blocking speed; Step S426: Count the number of blocked channels and calculate the crowd blocking degree based on the average blocking speed; Step S427: If there is no fixed moving channel for different crowd flow directions, the crowd density is obtained, and the crowd flow obstruction degree is obtained according to the crowd density; Step S428: If the number of directions is 1, the crowd obstruction degree is determined based on the installation position of the backup camera.

[0012] In step S427, if there is no fixed moving channel for different crowd flow directions, the step of obtaining crowd density and obtaining crowd flow obstruction degree according to the crowd density includes the following steps: Step S4271, obtaining the crowd density in the video image of the backup camera and recording it as a reference density; Step S4272, obtaining the average moving speed of the passengers in the video image of the backup camera and recording it as a reference speed; Step S4273: Set the weight ratios of the reference density, reference speed, and number of directions respectively, and calculate the crowd flow obstruction degree based on the weight ratios.

[0013] In step S428, if the number of directions is 1, the step of determining the crowd obstruction degree according to the installation position of the backup camera includes the following steps: Step S4281, obtaining the passenger moving speed in the video image of the backup camera, calculating the difference between the moving speed of the recognition target and the moving speeds of different passengers, and calculating the average of the differences and recording them as the speed difference; Step S4282: Calculate the distance between the target and the backup camera based on the target's movement path and the backup camera's installation location and record it as the target distance. Step S4283: The crowd obstruction degree is calculated by combining the speed difference, target distance, and reference density.

[0014] In step S43, the steps of obtaining a video image captured by a backup camera and recording it as a backup image, extracting the subway layout based on the backup image, and obtaining the layout occlusion degree based on the subway layout include the following steps: Step S431, obtaining the local layout of the subway station in the backup image to form a local layout map; Step S432, finding the shooting blind spots of the backup camera according to the local layout diagram, and counting the number of the shooting blind spots; Step S433, determining the number of shooting blind spots passed by the identified target according to its moving path and recording the number of blind spots passed; Step S434 , respectively setting weight coefficients for the number of blind spots, the number of passes, and the reference density, and calculating the layout occlusion degree based on the weight coefficients.

[0015] From the above content, it can be seen that the subway passenger flow motion trajectory recognition method based on image processing of the present invention has the following effects: 1. The recognition method of the present invention can combine all images to obtain the motion trajectory of the recognition target, and further form the subway passenger flow motion trajectory based on the motion trajectories of all recognition targets. In trajectory recognition, by selecting cameras for switching, the disconnection of the motion trajectory can be reduced, thereby improving the accuracy of subway passenger flow motion trajectory recognition based on image processing.

[0016] 2. By determining the passenger's purpose based on the passenger's movement data, and combining the camera coverage obtained by combining the spatial area of the target's movement path covered by the camera and the probability of the target appearing in the uncovered area, a comprehensive judgment is made on whether the camera needs to be switched. This reasonable camera switching can not only improve the accuracy of subway passenger flow movement trajectory recognition, but also improve the convenience of subway passenger flow movement trajectory recognition based on image processing.

[0017] 3. Different analyses can also be made based on different situations, such as the number of pedestrian flow directions in the video image of the backup camera and whether there are fixed moving channels in the pedestrian flow direction. This can confirm the degree of pedestrian flow occlusion caused by the pedestrian flow to the identification target in different situations. Specific analysis of specific problems can help obtain more accurate results that are more suitable for actual scenarios. Therefore, the camera's recognition degree is also more accurate, improving the adaptability of subway passenger flow movement trajectory recognition based on image processing.

[0018] The details of the present invention can be found in the following description and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram showing the subway passenger flow motion trajectory recognition method based on image processing of the present invention is shown. DETAILED DESCRIPTION

[0020] See also Figure 1 , showing the subway passenger flow motion trajectory recognition method based on image processing of the present invention.

[0021] like Figure 1 As shown, the subway passenger flow motion trajectory recognition method based on image processing may specifically include the following steps: Step S1: Obtain a video image in the subway and record it as an original image, confirm the recognition target from the original image, and obtain the camera corresponding to the original image and record it as the original camera.

[0022] When identifying subway passenger movement trajectories, because multiple cameras are located within a subway station and some cameras' images overlap, typically only one camera is used to capture the target at a time. A video image from the subway is captured and recorded as the original image. An object detection algorithm (such as YOLO or Faster R-CNN) is then used to identify the target within the original image. The camera corresponding to the original image is recorded as the original camera. For example, if passenger A is in the subway station, all three cameras A, B, and C can capture passenger A. However, camera A has a clearer angle, making it easier to identify passenger A. Therefore, camera A is considered the original camera, and the captured image is the original image. If only camera B can capture passenger A, camera B is considered the original camera.

[0023] Step S2: extracting the movement data of the identified target from the video image, and determining whether the camera needs to be switched based on the movement data.

[0024] Step S3: If it is determined that the camera needs to be switched, the actual position of the recognition target is obtained, and a backup camera is obtained according to the actual position.

[0025] Step S4: Obtain the video image of the backup camera, and analyze the recognition degree of the backup camera based on the video image.

[0026] Step S5: Select a camera with the highest recognition degree as a docking camera, and collect a video image of the recognized target shot by the docking camera as a real-time image.

[0027] If you still need to switch cameras after docking, you can use the above method to obtain the second docking camera, the third docking camera, etc.

[0028] Step S6: Combine the original image and the real-time image to extract the motion trajectory of the identified target and obtain the target trajectory.

[0029] The original image is combined with the real-time images of all subsequent docking cameras to form the motion trajectory of the identified target.

[0030] Step S7: The target trajectories of all identified targets are formed into a trajectory set to obtain the subway passenger flow trajectory.

[0031] By identifying each passenger as a target and forming a collection of all the passengers' target trajectories, we can obtain the movement trajectory of the subway passenger flow. The movement trajectory of the subway passenger flow obtained based on statistics is conducive to generating a more appropriate operation plan.

[0032] In practice, subway passengers often move around during their rides. Therefore, cameras may not fully cover all areas of the subway when identifying passenger movement, necessitating camera switching. Multiple cameras exist within the subway system, and selecting the appropriate camera for this purpose allows for more accurate and rapid passenger movement trajectories. For example, when passenger A exits a subway car and prepares to leave the station, camera A may not fully cover the area from the car to the exit, necessitating a camera switch. Cameras B or C can be selected. However, since camera B is subject to significant occlusion and is prone to disconnection when tracking passenger A, selecting camera C yields a more accurate and realistic movement trajectory. Selecting the appropriate camera for switching based on actual conditions improves the efficiency and convenience of passenger movement trajectory identification.

[0033] Optionally, in step S2, extracting movement data of the identified target from the video image and determining whether to switch the camera according to the movement data may include the following steps: Step S21: extract the real-time position of the recognition target from the video image and determine whether the real-time position is changing.

[0034] When a camera in a subway station identifies a target, it could be that the target is getting off the train, in which case it is identified at the platform, or entering the station from the entrance, in which case it is identified at the entrance. The camera can determine whether the target is moving based on whether its real-time location is changing.

[0035] Step S22: If the real-time position is changing, the movement data of the identified target is extracted from the video image, and the movement data includes the movement speed and the movement direction.

[0036] Step S23: judging the moving purpose of the identified target according to the moving speed and moving direction, where the moving purpose includes boarding, transferring, and exiting the station.

[0037] Using classification algorithms such as decision trees, support vector machines (SVMs), and random forests, the target's speed and direction are mapped to specific movement purposes (getting on the bus, transferring, and exiting the station). Through training with historical movement data, a model is obtained to determine and identify the target's movement purpose.

[0038] Step S24: If the purpose of movement is to take a bus, the waiting platform of the target is estimated and identified based on the moving direction.

[0039] The platform where the identified target is about to go is estimated based on the moving direction of the identified target.

[0040] Step S25: A moving path is formed based on the real-time position and the waiting platform, and the coverage of the moving path by the original camera is obtained. It is determined whether the camera needs to be switched based on the coverage.

[0041] Step S26: If the purpose of movement is not to take a vehicle, it is determined that the camera needs to be switched.

[0042] In actual use, if the target is identified for transfer or exit, it is difficult for the camera to cover the entire area due to the long distances of transfer and exit routes and the changes in floors involved, so it is necessary to switch cameras. If the target is identified for boarding a train, the need for camera switching is determined based on the actual situation. This is because passengers do not necessarily board trains from the entrance. For example, if a passenger gets off at Station F on Train 1, then the passenger's initial identification location within the subway at Station F is at the platform of Station F. If the passenger mistakenly gets on a train in the wrong direction and changes to a train in the opposite direction, the passenger's movement is still to board a train, but only to the opposite side. In this case, there is no need to switch cameras because the corresponding camera can cover the passenger's movement range.

[0043] Optionally, in step S25, a moving path is formed based on the real-time position and the waiting platform, and coverage of the moving path by the original camera is obtained. The step of determining whether to switch cameras based on the coverage may include the following steps: Step S251 , obtaining the moving space area of the moving path, collecting the moving space area covered by the original camera and recording it as the covered space area.

[0044] The real-time location and the movement path that passengers often take between waiting platforms are used as the movement path of the identification target.

[0045] Step S252: determine whether there are subway passengers in the uncovered space area in the moving space area. If there are subway passengers, estimate the probability that the identified target appears in the uncovered space area, and obtain the coverage of the moving path based on the probability.

[0046] Step S253: If no subway passenger has appeared, the coverage of the moving path is 100%.

[0047] Step S254, determining whether the coverage of the moving path reaches a preset coverage standard. If the preset coverage standard is reached, it is determined that there is no need to switch cameras.

[0048] Step S255: If the preset coverage standard is not reached, it is determined that the camera needs to be switched.

[0049] In actual use, there may be blind spots in the target's movement path that cannot be captured by the camera, that is, areas of space not covered by the original camera. If no passengers have appeared in the uncovered area, it means that the target cannot be reached in that area. Then the rest are all covered by the original camera, and the target's movement path can be captured, so there is no need to switch cameras. If there are areas that the original camera cannot capture, it means that the target may be in the camera's blind spot. In this way, the original camera is likely to be disconnected when collecting the target's movement trajectory, which may cause errors in the movement trajectory. Therefore, it is necessary to determine whether to switch cameras based on the actual situation. By switching cameras, the accuracy of the target's movement trajectory recognition can be improved and disconnection during the recognition process can be reduced.

[0050] Optionally, in step S252, if a subway passenger has appeared, the probability of the identified target appearing in the uncovered space area is estimated, and the coverage of the moving path is obtained according to the probability, which may include the following steps: Step S2521: If there are subway passengers present, then the common features of the passengers present in the non-covered space area are counted.

[0051] Generally speaking, original cameras cover larger areas where passengers are most likely to be present. Non-covered areas are typically areas with very few passengers. Therefore, passengers in these areas often share common characteristics. For example, Area 1 is a non-covered area, and Area 1 is close to the platform, making it more dangerous. Therefore, passengers in Area 1 often share a low sense of safety.

[0052] Step S2522: extract the features of the same type as the common features of the recognition target and record them as target features, and determine the similarity between the target features and the common features.

[0053] For example, if the common feature is younger age, then the feature of the same type as the common feature is age. The similarity between the target feature of the identification target and the common feature can be obtained through cosine similarity.

[0054] Step S2523: establish a correlation curve between the similarity and the probability of the identified target appearing in the uncovered space area, obtain the probability of the corresponding identified target appearing in the uncovered space area based on the similarity, and record it as the appearance probability.

[0055] When the similarity is higher, the recognition target is more likely to appear in the non-covered space area, and therefore the probability of occurrence is higher.

[0056] Step S2524: Calculate the area ratio of the coverage space area to the movement space area, set proportional coefficients of the occurrence probability and the area ratio respectively, and calculate the coverage of the movement path according to the proportional coefficients.

[0057] In practice, if the target is likely to appear in uncovered areas, the original camera may experience errors when capturing the target's trajectory due to disconnection. Therefore, the greater the probability of occurrence, the less coverage of the movement path. The greater the ratio of the covered area to the moving area, the greater the original camera's coverage of the movement path. If there are no uncovered areas, the original camera's coverage of the movement path is 100%. For example, if the probability of occurrence and the area ratio are set to 0.5 and 0.5, respectively, and the probability of occurrence and the area ratio are 40% and 40%, respectively, the movement path coverage is 0.5 × 40% + 0.5 × 40% = 0.4.

[0058] Optionally, in step S3, if it is determined that the camera needs to be switched, the actual position of the identified target is obtained, and the step of obtaining a backup camera according to the actual position may include the following steps: In step S31, if it is determined that the camera needs to be switched, the moving path of the target is estimated and identified based on the moving direction and moving purpose.

[0059] If the camera needs to be switched, the target's movement may be for a transfer or exit. In this case, the movement path can no longer be determined based on the real-time location and the waiting platform. Instead, the target's movement path can be estimated based on the movement direction and purpose. Based on the movement direction and purpose, the most common path used by most passengers is used as the target's movement path. For example, for passengers traveling from the platform to the transfer channel, the frequency of different paths chosen by passengers in this scenario is counted, and the path with the highest frequency is used as the estimated movement path. The estimated path is also dynamically adjusted based on real-time passenger flow information and subway operational conditions (such as temporary closures of certain channels). If the movement purpose is to board a train and a camera switch is determined, the previously determined movement path based on the real-time location and the waiting platform can be used as the estimated movement path.

[0060] Step S32: obtaining the moving path picture captured by the original camera and recording it as the original path picture, and searching for a camera that includes the original path picture in the captured picture as the first camera.

[0061] Because the coverage of the camera is limited, when the camera needs to be switched, it means that the original camera cannot fully cover the moving path. Then a section of the moving path that can be captured by the original camera is obtained as the original path image. The purpose of searching for the camera containing the original path image is to prevent disconnection during the process of collecting and identifying the motion trajectory of the target. For example, camera A captures points 1 to 3 on the path, and camera B captures points 4 to 5 on the path. If you switch from camera A to camera B, the trajectory between points 3 and 4 cannot be recognized, which is prone to errors. Therefore, you need to find a camera that can capture points 1 to 3 on the path as the first camera.

[0062] Step S33 , calculating the ratio of the original path image to the shooting image of the first camera and recording it as the image ratio.

[0063] The screen ratio refers to the area ratio of the screen.

[0064] Step S34 , filtering out the first cameras whose picture ratios reach a preset picture ratio threshold value to obtain the second cameras.

[0065] If the original path image takes up too large a portion of the first camera's footage, the camera's switching will be less effective in identifying the motion trajectory. For example, if camera A captures a path from points 1 to 5, and camera B captures points 2 to 6, the overlap is from points 2 to 5. After the camera switches, only the trajectory of point 6 is added, making it less useful. Because cameras have limited range, the more overlapping content there is, the less effective content there is, leading to wasted resources and wasted cameras capturing multiple shots.

[0066] Step S35: Delete the original path image in the shooting image of the second camera to obtain a second shooting image.

[0067] The original path image in the shooting image of the second camera is removed and deleted to obtain a second shooting image.

[0068] Step S36 , obtaining the proportion of the moving path image in the second shooting image and recording it as a second proportion, and determining whether the second proportion reaches a preset second proportion threshold.

[0069] Step S37: Filter and remove cameras that do not reach the second percentage threshold to obtain backup cameras.

[0070] In practice, after deleting the original path footage, the second camera's own footage is obtained. For example, if camera A captures the path from points 1 to 5, and camera B captures points 2 to 6, the non-overlapping footage from camera B is point 6. If there is too little valid content, the effect is low, and switching to it easily wastes resources and yields no valid trajectory footage. Therefore, cameras with less valid content are filtered out based on a threshold.

[0071] Optionally, in step S4, the step of obtaining the video image of the backup camera and analyzing the recognition degree of the backup camera based on the video image may include the following steps: Step S41, obtaining the minimum number of camera switching times for capturing the moving path image after switching to the standby camera for shooting.

[0072] By simulating different backup camera switching scenarios, the number of camera switches required to fully capture and identify the target's movement path under each scenario was recorded. The number corresponding to the scenario with the least number of switches was selected as the minimum number. The significance of obtaining the minimum number is to evaluate the convenience and stability of the backup camera in the process of capturing movement path images. A lower minimum number means that when using the backup camera, the movement path image can be captured with fewer camera switching operations, reducing the risk of target loss and trajectory disconnection caused by frequent camera switching, thereby improving the efficiency and accuracy of passenger movement trajectory recognition.

[0073] Because the motion path is long, multiple camera switches may be required to fully identify the motion path. For example, if the original camera is camera A, after switching to camera B, cameras E, F, and G must be switched again to fully capture the target's motion trajectory. The minimum number of camera switches is 3. If, on the other hand, after switching from camera A to camera C, only camera D needs to be switched again to complete the target's motion trajectory, and the minimum number of camera switches is 1.

[0074] Step S42: Obtain the direction of the crowd flow captured by the backup camera, count the number of the crowd flow directions and record it as the number of directions, and obtain the crowd flow occlusion degree according to the number of directions.

[0075] Different cameras capture different passenger ranges due to their different angles, and therefore different passenger flow directions. For example, cameras focused on the interior of a station will show a disordered flow of passengers. However, cameras focused on entrances and exits will generally show orderly passenger flow in their images.

[0076] Step S43: obtaining a video image captured by a backup camera and recording it as a backup image, extracting the subway layout based on the backup image, and obtaining the layout occlusion degree based on the subway layout.

[0077] Step S44 , respectively setting the scaling factors of the minimum number of times, the crowd occlusion degree, and the layout occlusion degree, and calculating the recognition degree of the backup camera based on the scaling factors.

[0078] In practice, after switching cameras, multiple camera switches are required to fully capture the target's trajectory. This is inconvenient for passenger flow trajectory recognition and may also cause target recognition to be lost due to camera switching, resulting in inaccurate trajectory. Therefore, the higher the minimum number of times, the lower the backup camera's recognition accuracy. The greater the crowd occlusion and layout occlusion, the more susceptible the backup camera is to occlusion during the recognition process, increasing recognition difficulty and thus decreasing the backup camera's recognition accuracy. For example, if the scaling factors for the minimum number of times, crowd occlusion, and layout occlusion are set to 0.2, 0.4, and 0.4, respectively, and the minimum number of times, crowd occlusion, and layout occlusion are 2, 2, and 1, respectively, then the backup camera's recognition accuracy is 2 × 0.2 + 2 × 0.4 + 1 × 0.4 = 1.6.

[0079] Optionally, in step S42, obtaining the crowd flow directions captured by the backup camera, counting the number of crowd flow directions and recording them as the number of directions, and obtaining the crowd flow occlusion degree according to the number of directions may include the following steps: Step S421, determine whether the number of directions is 1. If the number of directions is not 1, determine whether there are fixed moving channels for different pedestrian flow directions.

[0080] Different cameras capture different crowd flow directions. Some cameras may only have one direction. For example, if a transfer channel only allows one direction, there will be only one flow direction. If a transfer channel allows two directions, there will be two flow directions. After entering the station, the flow of passengers may be disordered, resulting in multiple flow directions.

[0081] Step S422: If there are fixed moving channels in different crowd flow directions, a three-dimensional map of the channel positions of the fixed moving channels in the crowd flow directions is drawn based on the fixed moving channels.

[0082] Some passenger flows are orderly, for example, designated passages are set for entry, exit, and transfers, and there are fixed passages for passenger movement. However, in some areas of the station, there are no fixed passages, and the movement of passengers is disorderly.

[0083] Step S423: Mark the installation position of the backup camera on the three-dimensional channel position map, obtain the fixed moving channel of the recognition target and record it as the recognition moving channel.

[0084] The fixed moving channel where the identification target is located is recorded as the identification moving channel.

[0085] Step S424: Obtain a fixed moving channel between the installation position and the identified moving channel and record it as a blocking channel.

[0086] When there is a fixed moving channel, fixed occlusion will occur. For example, there are three channels A, B, and C between the identification moving channel and the installation position. The movement of people in these three channels will cause fixed occlusion to the identification moving channel, but not the D channel in the middle. The identification moving channel will cause occlusion to the D channel, but the D channel will not block the identification moving channel.

[0087] Step S425 , obtaining the average moving speed of passengers in the blocked passage, and summing the average moving speeds of passengers in all blocked passages to obtain an average blocking speed.

[0088] Obtain the passenger moving speed in each blocked channel, calculate the average passenger moving speed in the channel, obtain the average passenger moving speed of the blocked channel, and then sum all the average moving speeds to obtain the average blocking speed.

[0089] Step S426 , counting the number of blocked channels, and calculating the crowd blocking degree based on the average blocking speed.

[0090] Set the weighted ratios for the number of channels and the average obstruction speed, respectively. Calculate the crowd obstruction degree based on the weighted ratios. A greater number of channels creates greater obstruction for the recognition target, resulting in a higher crowd obstruction degree. A higher average obstruction speed results in faster movement of other passengers, making it more likely that they will repeatedly obstruct the recognition target, thus increasing the crowd obstruction degree. For example, if the weighted ratios for the number of channels and the average obstruction speed are set to 30% and 70%, respectively, and the number of channels and the average obstruction speed are 3 and 0.5 m / s, respectively, then the crowd obstruction degree is 3 × 30% + 0.5 × 70% = 1.25.

[0091] Step S427: If there is no fixed moving channel for different crowd flow directions, the crowd density is obtained, and the crowd flow blocking degree is obtained according to the crowd density.

[0092] Step S428: If the number of directions is 1, the crowd obstruction degree is determined based on the installation position of the backup camera.

[0093] In actual applications, when collecting the motion trajectory of the identified target, the changes in the flow of people will cause a certain degree of occlusion of the identified target, and the degree of occlusion varies in different situations. If passengers have a fixed movement channel, the occlusion of the identified target is also relatively fixed, so it is calculated based on the number of channels and the average occlusion speed. However, if there is no fixed movement channel in the direction of the crowd flow, the occlusion will be more disordered, so the crowd flow occlusion degree is calculated using different methods. When the number of crowd flow directions is 1, there is no crowd flow in other directions to cause greater occlusion, and the occlusion degree varies again. Analyzing specific problems specifically will help to obtain more accurate data that is more suitable for actual scenarios.

[0094] Optionally, in step S427, if there is no fixed moving channel for different crowd flow directions, the step of obtaining crowd density and obtaining crowd flow obstruction degree according to the crowd density may include the following steps: Step S4271: Obtain the crowd density in the video image of the backup camera and record it as the reference density.

[0095] Crowd density refers to passenger density, that is, the number of passengers per square meter.

[0096] Step S4272: Obtain the average moving speed of the passengers in the video image of the backup camera and record it as the reference speed.

[0097] The average moving speed is calculated based on the moving speeds of all passengers to obtain the average moving speed and record it as the reference speed.

[0098] Step S4273: Set the weight ratios of the reference density, reference speed, and number of directions respectively, and calculate the crowd flow obstruction degree based on the weight ratios.

[0099] The weight ratio is determined by multi-criteria decision-making methods such as the analytic hierarchy process (AHP). For example, the weight ratios of the reference density, reference speed, and number of directions are set to 30%, 40%, and 30%, respectively. The reference density, reference speed, and number of directions are 4 people / square meter, 0.5 meters / second, and 2, respectively. The crowd blocking degree is 4×30%+0.5×40%+2×30%=2.

[0100] In practice, since there are no fixed channels for pedestrian flow, passenger movement is disorderly. Passengers moving in any direction may obstruct the identification target, thus affecting the acquisition of the target's motion trajectory. In high-density environments, the diversity of pedestrian flow directions further exacerbates spatial congestion, increasing the likelihood of occlusion. Furthermore, a faster average passenger speed increases the likelihood of occlusion. When there are more pedestrian flow directions, different directions of movement will form intersections within the subway space, which can easily lead to occlusions. Therefore, when passengers are in a disorderly state, a larger number of channels, a higher crowd density, and a faster reference speed will all increase the degree of pedestrian occlusion.

[0101] Optionally, in step S428, if the number of directions is 1, the step of determining the crowd obstruction degree based on the installation position of the backup camera may include the following steps: Step S4281: Obtain the passenger moving speed in the video image of the backup camera, calculate the difference between the moving speed of the recognition target and the moving speeds of different passengers, calculate the average of the differences and record it as the speed difference.

[0102] The passenger moving speed obtained in the video image of the backup camera refers to the moving speed of all passengers, the difference between the moving speed of the recognition target and the moving speed of all passengers is calculated, and then the average of the differences is calculated.

[0103] In step S4282, the distance between the identified target and the backup camera is obtained based on the moving path of the identified target and the installation position of the backup camera and recorded as the target distance.

[0104] Step S4283: The crowd obstruction degree is calculated by combining the speed difference, target distance, and reference density.

[0105] In practice, if the number of crowd flow directions is 1, there will be no obstruction of the recognition target by passengers in other directions. The obstruction of the recognition target comes from passengers moving in the same direction. However, if the recognition target and other passengers move at the same speed, then the entire passenger group is moving in parallel, which will not change the obstruction of the recognition target and add additional obstruction. Therefore, when the speed difference between the recognition target and the passenger is greater, the more likely it is to intersect with surrounding passengers due to speed, and the crowd obstruction degree will increase. The weight ratio of speed difference, target distance, and reference density is set respectively, and the crowd obstruction degree is calculated based on the weight ratio. Among them, the greater the target distance and the greater the reference density, the more passengers will be between the recognition target and the camera, resulting in greater occlusion and the greater the crowd obstruction degree. For example, the weight ratios of speed difference, target distance and reference density are set to 60%, 20% and 20% respectively. The speed difference, target distance and reference density are 0.2 m / s, 5 m and 6 people / m2 respectively. Then the crowd obstruction degree is 0.2×60%+5×20%+6×20%=2.32.

[0106] Optionally, in step S43, obtaining a video image captured by a backup camera and recording it as a backup image, extracting the subway layout based on the backup image, and obtaining the layout occlusion degree based on the subway layout may include the following steps: Step S431: obtaining the local layout of the subway station in the backup image to form a local layout map.

[0107] The local layout map refers to the subway layout within the range that the backup image can cover, so it is a local subway layout.

[0108] Step S432: Find the shooting blind spots of the backup camera according to the local layout diagram, and count the number of the shooting blind spots.

[0109] The area that the backup camera cannot capture within the coverage area is identified based on the local layout diagram as a blind spot. For example, the area behind a billboard is blocked by the billboard, so the area behind the billboard is a blind spot.

[0110] Step S433: Determine the number of shooting blind spots passed by the identified target according to its moving path and record it as the number of blind spots passed.

[0111] For example, there are four blind spots A, B, C, and D in the area, and according to the moving path of the identified target, it is determined that the moving path will pass through areas A and C, so the number of blind spots is 2.

[0112] Step S434 , respectively setting weight coefficients for the number of blind spots, the number of passes, and the reference density, and calculating the layout occlusion degree based on the weight coefficients.

[0113] Using data analysis methods such as principal component analysis (PCA) or gray correlation analysis, we quantitatively analyze the correlation between the number of blind spots, the number of people passing by, and the reference density, and the layout's occlusion degree, thereby determining the corresponding weight coefficients. For example, if the weight coefficients for the number of blind spots, the number of people passing by, and the reference density are set to 0, 4, 0.3, and 0.3, respectively, and the number of blind spots, the number of people passing by, and the reference density are 4, 2, and 4 people per square meter, respectively, then the layout's occlusion degree is 4 × 0.4 + 2 × 0.3 + 4 × 0.3 = 3.4.

[0114] In practice, a greater number of blind spots increases the probability that the target will pass through them, leading to a greater likelihood of trajectory disconnection and increased layout occlusion. Similarly, a greater number of blind spots a target passes through indicates a longer duration of trajectory disconnection and a greater degree of layout occlusion. Similarly, a greater reference density indicates a greater number of passengers under the backup camera, increasing the probability of the target entering a blind spot and, consequently, increasing layout occlusion.

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

Claims

1. A method for identifying subway passenger flow trajectory based on image processing, characterized in that The following steps are involved: Step S1, obtaining a video image in the subway and recording it as an original image, confirming the recognition target from the original image, and obtaining the camera corresponding to the original image and recording it as the original camera; Step S2, extracting the movement data of the identified target from the video image, and determining whether it is necessary to switch the camera according to the movement data; Step S3: If it is determined that the camera needs to be switched, the actual position of the recognition target is obtained, and a backup camera is obtained according to the actual position; Step S4, obtaining the video image of the backup camera, and analyzing the recognition degree of the backup camera based on the video image; Step S5, selecting a camera with the highest recognition rate as a docking camera, and collecting a video image of the identified target captured by the docking camera as a real-time image; Step S6, combining the original image and the real-time image to extract the motion trajectory of the identified target and obtain the target trajectory; Step S7: The target trajectories of all identified targets are combined into a trajectory set to obtain the subway passenger flow trajectory.

2. The method for identifying subway passenger flow trajectory based on image processing according to claim 1, characterized in that: In step S2, the step of extracting the movement data of the identified target from the video image and determining whether the camera needs to be switched based on the movement data includes the following steps: Step S21, extracting the real-time position of the identified target from the video image, and determining whether the real-time position is changing; Step S22: if the real-time position is changing, extracting movement data of the identified target from the video image, wherein the movement data includes movement speed and movement direction; Step S23, judging the moving purpose of the identified target based on the moving speed and moving direction, wherein the moving purpose includes boarding, transferring, and exiting the station; Step S24: If the moving purpose is to take a bus, the waiting platform of the target is estimated and identified based on the moving direction; Step S25: A moving path is formed based on the real-time position and the waiting platform, and the coverage of the moving path by the original camera is obtained. Based on the coverage, it is determined whether the camera needs to be switched; Step S26: If the purpose of movement is not to take a vehicle, it is determined that the camera needs to be switched.

3. The method for identifying subway passenger flow trajectory based on image processing according to claim 2, characterized in that: In step S25, the step of forming a moving path based on the real-time position and the waiting platform, obtaining the coverage of the moving path by the original camera, and determining whether to switch cameras based on the coverage includes the following steps: Step S251, obtaining the moving space area of the moving path, collecting the moving space area covered by the original camera and recording it as the covered space area; Step S252: Determine whether a subway passenger has appeared in the uncovered space area within the moving space area. If a subway passenger has appeared, estimate the probability of the identified target appearing in the uncovered space area, and obtain the coverage of the moving path based on the probability. Step S253: If no subway passenger has appeared, the coverage of the moving path is 100%; Step S254, determining whether the coverage of the moving path meets a preset coverage standard. If so, it is determined that there is no need to switch cameras. Step S255: If the preset coverage standard is not reached, it is determined that the camera needs to be switched.

4. The method for identifying subway passenger flow trajectory based on image processing according to claim 3 is characterized in that: In step S252, if a subway passenger has appeared, the probability of the identified target appearing in the uncovered space area is estimated, and the coverage of the moving path is obtained according to the probability, including the following steps: Step S2521: If a subway passenger has appeared, then the common features of the passengers who appeared in the non-covered space area are counted; Step S2522: extract the same type of features of the recognition target and the common features and record them as target features, and determine the similarity between the target features and the common features; Step S2523: Establish a correlation curve between the similarity and the probability of the identified target appearing in the uncovered space area, and obtain the probability of the corresponding identified target appearing in the uncovered space area based on the similarity, and record it as the appearance probability; Step S2524: Calculate the area ratio of the coverage space area to the movement space area, set proportional coefficients of the occurrence probability and the area ratio respectively, and calculate the coverage of the movement path according to the proportional coefficients.

5. The method for identifying subway passenger flow trajectory based on image processing according to claim 1, characterized in that: In step S3, if it is determined that the camera needs to be switched, the actual position of the recognition target is obtained, and the step of obtaining a backup camera according to the actual position includes the following steps: Step S31: If it is determined that the camera needs to be switched, the moving path of the identified target is estimated based on the moving direction and moving purpose; Step S32: obtaining the moving path image captured by the original camera and recording it as the original path image, and searching for a camera that captures the original path image as the first camera; Step S33, calculating the ratio of the original path image to the shooting image of the first camera and recording it as the image ratio; Step S34, filtering out the first camera whose picture ratio reaches a preset picture ratio threshold, and obtaining the second camera; Step S35, deleting the original path image in the shooting image of the second camera to obtain a second shooting image; Step S36, obtaining a proportion of the moving path image in the second shooting image and recording it as a second proportion, and determining whether the second proportion reaches a preset second proportion threshold; Step S37: Filter and remove cameras that do not reach the second percentage threshold to obtain backup cameras.

6. The method for identifying subway passenger flow trajectory based on image processing according to claim 1, characterized in that: In step S4, the step of obtaining the video image of the backup camera and analyzing the recognition degree of the backup camera based on the video image includes the following steps: Step S41, obtaining the minimum number of camera switching times for capturing the moving path image after switching to the standby camera for shooting; Step S42: Obtain the direction of the crowd flow captured by the backup camera, count the number of crowd flow directions and record it as the number of directions, and obtain the crowd flow obstruction degree based on the number of directions; Step S43: obtaining a video image captured by a backup camera and recording it as a backup image, extracting the subway layout based on the backup image, and obtaining the layout occlusion degree based on the subway layout; Step S44 , respectively setting the scaling factors of the minimum number of times, the crowd occlusion degree, and the layout occlusion degree, and calculating the recognition degree of the backup camera based on the scaling factors.

7. The method for identifying subway passenger flow trajectory based on image processing according to claim 6, characterized in that: In step S42, the steps of obtaining the crowd flow directions captured by the backup camera, counting the number of crowd flow directions and recording them as the number of directions, and obtaining the crowd flow obstruction degree according to the number of directions include the following steps: Step S421: determine whether the number of directions is 1. If the number of directions is not 1, determine whether there are fixed moving channels for different pedestrian flow directions. Step S422: If there are fixed moving channels in different crowd flow directions, a three-dimensional map of the channel positions of the fixed moving channels in the crowd flow directions is drawn based on the fixed moving channels; Step S423: Mark the installation position of the backup camera on the three-dimensional channel position map, obtain the fixed moving channel of the recognition target and record it as the recognized moving channel; Step S424, obtaining a fixed moving channel between the installation position and the identified moving channel and recording it as a blocking channel; Step S425, obtaining the average moving speed of passengers in the blocked passage, and summing the average moving speeds of passengers in all blocked passages to obtain the average blocking speed; Step S426: Count the number of blocked channels and calculate the crowd blocking degree based on the average blocking speed; Step S427: If there is no fixed moving channel for different crowd flow directions, the crowd density is obtained, and the crowd flow obstruction degree is obtained according to the crowd density; Step S428: If the number of directions is 1, the crowd obstruction degree is determined based on the installation position of the backup camera.

8. The method for identifying subway passenger flow trajectory based on image processing according to claim 7, characterized in that: In step S427, if there is no fixed moving channel for different crowd flow directions, the step of obtaining crowd density and obtaining crowd flow obstruction degree according to the crowd density includes the following steps: Step S4271, obtaining the crowd density in the video image of the backup camera and recording it as a reference density; Step S4272, obtaining the average moving speed of the passengers in the video image of the backup camera and recording it as a reference speed; Step S4273: Set the weight ratios of the reference density, reference speed, and number of directions respectively, and calculate the crowd flow obstruction degree based on the weight ratios.

9. The method for identifying subway passenger flow trajectory based on image processing according to claim 7, characterized in that: In step S428, if the number of directions is 1, the step of determining the crowd obstruction degree according to the installation position of the backup camera includes the following steps: Step S4281, obtaining the passenger moving speed in the video image of the backup camera, calculating the difference between the moving speed of the recognition target and the moving speeds of different passengers, and calculating the average of the differences and recording them as the speed difference; Step S4282: Calculate the distance between the target and the backup camera based on the target's movement path and the backup camera's installation location and record it as the target distance. Step S4283: The crowd obstruction degree is calculated by combining the speed difference, target distance, and reference density.

10. The method for identifying subway passenger flow trajectory based on image processing according to claim 6, characterized in that: In step S43, the steps of obtaining a video image captured by a backup camera and recording it as a backup image, extracting a subway layout based on the backup image, and obtaining a layout occlusion degree based on the subway layout include the following steps: Step S431, obtaining the local layout of the subway station in the backup image to form a local layout map; Step S432, finding the shooting blind spots of the backup camera according to the local layout diagram, and counting the number of the shooting blind spots; Step S433, determining the number of shooting blind spots passed by the identified target according to its moving path and recording the number of blind spots passed; Step S434 , respectively setting weight coefficients for the number of blind spots, the number of passes, and the reference density, and calculating the layout occlusion degree based on the weight coefficients.

Citation Information

Patent Citations

  • Target detection recognition algorithm based on 3D (Three-dimensional) trajectory analysis

    CN106127137A

  • Target position determination method and device based on multiple cameras and computer equipment

    CN111612827A

  • Method and device for multi-target multi-camera tracking and storage medium

    CN117409032A

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

    CN118887622A

  • Method and device for determining a trajectory within a 3D scene for a camera

    US20180204343A1