A night pedestrian tailing determination method and system based on video image analysis
Patent Information
- Application Number
- CN202610848794.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-01
AI Technical Summary
为此,本申请提出一种基于视频图像分析的夜间行人尾随判定方法及系统,旨在解决夜间或低光照环境下,现有尾随判定系统因图像质量下降导致目标识别和追踪失败,从而无法有效判定尾随行为的技术问题
[0014] The technical solution according to the embodiments of this application has at least the following beneficial effects: This application provides a method for determining pedestrian tailing at night based on video image analysis. It acquires the motion state information of the device holder of a handheld device and infers their motion intention and trajectory. Simultaneously, it acquires video image data and performs scene motion normalization processing. In the normalized scene, it identifies and tracks moving objects, inferring their motion intention and trajectory. Based on this, this application evaluates the degree of synchronization between the device holder's motion intention and the moving object's motion intention, and analyzes the degree of coordination between the moving object's trajectory and the device holder's trajectory. Finally, based on the synchronization score and coordination score, it determines whether tailing behavior exists and issues a warning. This method effectively solves the problem in existing technologies where, in nighttime or low-light environments, poor image quality (such as underexposure, high noise, and motion blur) makes target recognition and tracking difficult, thus making it impossible to accurately determine tailing behavior. Through scene motion normalization processing, this application can eliminate the influence of the handheld device's own motion on image analysis, ensuring stable identification and tracking of moving objects even in dynamic environments. Meanwhile, by comprehensively analyzing the synchronicity of the device holder's movement intention and the movement intention of the moving object, as well as the coordination of their movement trajectories, this application can more comprehensively and accurately determine potential tailing behavior.
Smart Images

Figure CN122676540A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video image analysis technology, and more specifically, to a method and system for determining pedestrian tailing at night based on video image analysis. Background Technology
[0002] To address the safety concerns of lone pedestrians at night, a real-time tailgating detection system based on video image analysis has emerged. This system utilizes the rear camera of portable devices such as smartphones to capture real-time video footage behind the user. After preprocessing by a processing unit, it identifies human targets, assigns a unique identifier to each target, and continuously tracks their movement. The system determines whether tailgating is occurring by comparing the real-time distance between the pedestrian and the user, the pattern of distance changes, and the direction of movement. If the pedestrian maintains a fixed distance from the user for an extended period and their walking routes highly overlap, the system immediately triggers an alarm. In well-lit street scenes with simple backgrounds, this effectively ensures the safety of lone pedestrians. However, the system's reliability drops significantly in complex urban low-light environments. When a user transitions from a bright main road to a dimly lit alley, the sudden change in light causes a delay in the camera's exposure adjustment, resulting in severe underexposure of the initial image. The system cannot extract human features and directly loses track of the target. Subsequent attempts by the camera to automatically increase sensitivity and extend exposure time to compensate for the light introduce two major problems: significantly increased image noise and blurred object edges; and severe motion blur when combined with the user's walking movements. Due to the low signal-to-noise ratio and high image blur, the performance of the human detection algorithm drops sharply. It is difficult to accurately identify real people following behind, and it is easy to misidentify static objects such as debris and pipes as human targets, resulting in failures such as missed detection and false alarms. This greatly reduces the practical value of the system in complex road conditions at night. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method and system for determining pedestrian tailing at night based on video image analysis, aiming to solve the technical problem that existing tailing determination systems fail to effectively determine tailing behavior due to the failure of target recognition and tracking caused by the degradation of image quality at night or in low light environments.
[0004] In a first aspect, embodiments of this application provide a method for determining pedestrian tailing at night based on video image analysis, applied to a handheld device, including: The motion state information of the device holder of the handheld device is obtained, and based on the motion state information, the motion intention of the device holder is inferred to obtain the motion intention and motion trajectory of the device holder. The video image data of the handheld device is acquired, a scene motion reference is established based on the video image data, and the scene motion normalization processing is performed on the video image data to obtain image data in the normalized scene. In the image data of the normalized scene, moving objects are identified and tracked, and based on the motion trajectory of the moving objects, the motion intention of the moving objects is inferred to obtain the motion intention and motion trajectory of the moving objects; The degree of synchronization between the movement intention of the device holder and the movement intention of the moving object is assessed to obtain a synchronization score; Analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder to obtain a coordination score; Based on the synchronization score and the coordination score, it is determined whether tailing behavior exists and an early warning is issued.
[0005] According to some embodiments of this application, obtaining the motion state information of the device holder of the handheld device includes: The device owner's acceleration is obtained through the built-in three-axis accelerometer of the handheld device, and the device owner's angular velocity is obtained through the built-in three-axis gyroscope of the handheld device. The current direction of travel of the device is determined based on the angular velocity; The motion state information of the device holder of the handheld device is determined based on the acceleration, the angular velocity, and the current direction of travel.
[0006] According to some embodiments of this application, inferring the device holder's motion intention based on the motion state information includes: When the motion state information indicates that the acceleration is continuously greater than the first preset acceleration within a preset time period, it is inferred that the device holder is in an acceleration state. When the motion state information indicates that the acceleration is continuously less than the second preset acceleration within a preset time period, it is inferred that the device holder is in a deceleration state. When the motion state information indicates that the acceleration is continuously greater than or equal to the third preset acceleration and less than or equal to the fourth preset acceleration within a preset time period, it is inferred that the device holder is in a constant speed state. When the absolute value of the angular velocity represented by the motion state information is continuously greater than a first preset angular velocity within a preset time period, it is inferred that the device holder is in a turning state; When the motion state information indicates that the acceleration is continuously less than the fifth preset acceleration and the angular velocity is continuously less than the second preset angular velocity within a preset time period, it is inferred that the device holder is in a stationary state, wherein the first preset acceleration is greater than the fourth preset acceleration, the fourth preset acceleration is greater than the fifth preset acceleration, the fifth preset acceleration is greater than the third preset acceleration, the third preset acceleration is greater than the second preset acceleration, and the second preset angular velocity is less than the first preset angular velocity.
[0007] According to some embodiments of this application, the step of establishing a scene motion reference based on the video image data and performing scene motion normalization processing on the video image data to obtain image data in the normalized scene includes: The target background corner is selected from the video image data using the corner detector built into the handheld device; Calculate the optical flow vector of the target background corner point every preset number of frames; Statistical analysis is performed on the optical flow vectors to obtain their average value, which is then used to establish a scene motion reference. Obtain the original motion vectors of the moving objects in the video image data; Determine the background motion vector based on the scene motion reference; Scene motion normalization is performed based on the background motion vector and the original motion vector to obtain image data in the normalized scene.
[0008] According to some embodiments of this application, inferring the motion intention of the moving object based on its motion trajectory includes: Based on the motion trajectory of the moving object, the overlap rate of the motion trajectory is obtained, and the instantaneous velocity of the moving object and the directional angle between the moving object and the device holder are determined. Based on the overlap rate of the motion trajectory, the instantaneous velocity of the moving object, and the directional angle, the motion intention of the moving object is inferred.
[0009] According to some embodiments of this application, the step of assessing the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and obtaining a synchronization score, includes: After determining the device holder's movement intention, the device holder's movement speed, turning angle, and relative distance between the device holder and the moving object are obtained within the next preset time period. Based on the movement speed, the turning angle, and the relative distance, the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object is evaluated, and a synchronization score is obtained.
[0010] According to some embodiments of this application, the step of evaluating the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object based on the movement speed, the turning angle, and the relative distance, and obtaining a synchronization score, includes: An initial synchronization score is preset based on the movement speed, the turning angle, and the relative distance. When the device holder's intention to move is to stop, if the movement speed is less than a preset speed and the relative distance is within a preset distance range, the initial synchronization score is increased to obtain a synchronization score. When the device holder's movement intention is to accelerate or decelerate, if the movement speed is consistent with the speed change trend of the device holder and the relative distance is within a preset distance range, the initial synchronization score is increased to obtain a synchronization score. When the device holder's intention to move is to turn, if the absolute difference between the turning angle and the device holder's turning angle is less than a preset difference, the initial synchronization score is increased to obtain a synchronization score.
[0011] According to some embodiments of this application, the step of analyzing the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder to obtain a coordination score includes: Calculate the geometric similarity between the motion trajectory of the moving object and the motion trajectory of the device holder to obtain an initial coordination score, wherein the geometric similarity is positively correlated with the initial coordination score; Obtain the relative distance and the angle between the moving object and the device holder; When the relative distance is within a preset range and the angle between the relative directions is less than a preset angle, the initial coordination score is increased to obtain a coordination score.
[0012] According to some embodiments of this application, determining whether tailing behavior exists based on the synchronization score and the coordination score, and issuing an early warning, includes: Set corresponding preset weights for the synchronization score and the coordination score; A comprehensive risk score is obtained by weighting the synchronization score, the coordination score, and the corresponding preset weights. If the overall risk score is greater than the preset risk score and the duration of the overall risk score being greater than the preset risk score is greater than the preset duration, it is determined whether there is tailing behavior and an early warning is issued.
[0013] Secondly, this application also discloses a nighttime pedestrian tailing detection system based on video image analysis, applied to a handheld device, comprising: The first acquisition module is used to acquire the motion state information of the device holder of the handheld device, and infer the motion intention of the device holder based on the motion state information to obtain the motion intention and motion trajectory of the device holder. The second acquisition module is used to acquire video image data of the handheld device, establish a scene motion reference based on the video image data, and perform scene motion normalization processing on the video image data to obtain image data in the normalized scene. The identification and inference module is used to identify and track moving objects in the image data of the normalized scene, and infer the movement intention of the moving objects based on their movement trajectories, thereby obtaining the movement intention and movement trajectory of the moving objects. The evaluation module is used to evaluate the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and obtain a synchronization score. The analysis module is used to analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder, and obtain a coordination score; The determination module is used to determine whether tailing behavior exists based on the synchronization score and the coordination score, and to issue an early warning.
[0014] The technical solution according to the embodiments of this application has at least the following beneficial effects: This application provides a method for determining pedestrian tailing at night based on video image analysis. It acquires the motion state information of the device holder of a handheld device and infers their motion intention and trajectory. Simultaneously, it acquires video image data and performs scene motion normalization processing. In the normalized scene, it identifies and tracks moving objects, inferring their motion intention and trajectory. Based on this, this application evaluates the degree of synchronization between the device holder's motion intention and the moving object's motion intention, and analyzes the degree of coordination between the moving object's trajectory and the device holder's trajectory. Finally, based on the synchronization score and coordination score, it determines whether tailing behavior exists and issues a warning. This method effectively solves the problem in existing technologies where, in nighttime or low-light environments, poor image quality (such as underexposure, high noise, and motion blur) makes target recognition and tracking difficult, thus making it impossible to accurately determine tailing behavior. Through scene motion normalization processing, this application can eliminate the influence of the handheld device's own motion on image analysis, ensuring stable identification and tracking of moving objects even in dynamic environments. Meanwhile, by comprehensively analyzing the synchronicity of the device holder's movement intention and the movement intention of the moving object, as well as the coordination of their movement trajectories, this application can more comprehensively and accurately determine potential tailing behavior.
[0015] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0016] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.
[0017] Figure 1 A flowchart illustrating a nighttime pedestrian tailing determination method based on video image analysis, provided as an embodiment of this application; Figure 2 A schematic diagram of a process for obtaining motion state information of a device holder of a handheld device, provided as an embodiment of this application; Figure 3 A schematic diagram of a process for obtaining motion state information of a device holder of a handheld device, provided as an embodiment of this application; Figure 4 This is a flowchart illustrating the process of inferring the motion intention of a moving object according to one embodiment of this application; Figure 5 This is a schematic diagram of a nighttime pedestrian tailing determination system based on video image analysis, provided as an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical methods, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0019] It should be noted that the meaning of "multiple" (or "more than") in the description of the embodiments of this application refers to two or more, and "greater than," "less than," "exceeding," etc. are understood to exclude the number itself, while "above," "below," "within," etc. are understood to include the number itself. If "first," "second," etc. are used in the description, they are only for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0020] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: the existence of a alone, the existence of b alone, the existence of c alone, the simultaneous existence of a and b, the simultaneous existence of a and c, the simultaneous existence of b and c, or the simultaneous existence of a, b, and c, where a, b, and c can be single or multiple.
[0021] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0022] The nighttime pedestrian tailing determination method based on video image analysis provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms; the software can be an application that implements the nighttime pedestrian tailing determination method based on video image analysis, but is not limited to the above forms.
[0023] The embodiments of this application can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.
[0024] See Figure 1 , Figure 1 This is a flowchart illustrating a nighttime pedestrian tailing determination method based on video image analysis, provided in one embodiment of this application. The nighttime pedestrian tailing determination method based on video image analysis provided in this embodiment includes, but is not limited to, steps S110 to S160, which are described in detail below.
[0025] Step S110: Obtain the motion state information of the device holder of the handheld device, and infer the motion intention of the device holder based on the motion state information to obtain the motion intention and motion trajectory of the device holder; Step S120: Acquire video image data from the handheld device, establish a scene motion reference based on the video image data, and perform scene motion normalization processing on the video image data to obtain image data in the normalized scene. Step S130: In the image data of the normalized scene, identify and track moving objects, and infer the moving intention of the moving objects based on their motion trajectory, thereby obtaining the moving intention and motion trajectory of the moving objects. Step S140: Assess the degree of synchronization between the device holder's motion intention and the motion intention of the moving object, and obtain a synchronization score; Step S150: Analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the equipment holder, and obtain a coordination score; Step S160: Based on the synchronization score and coordination score, determine whether there is tailing behavior and issue an early warning.
[0026] It should be noted that "motion state information" refers to data describing the current movement of the device holder, such as speed, acceleration, angular velocity, and direction. This information is the basis for inferring the device holder's movement intention. "Motion intention" refers to the expected movement trend of the device holder or moving object within a specific time period, such as acceleration, deceleration, constant speed, turning, or stopping. "Motion trajectory" refers to the path moved by the device holder or moving object over a period of time. "Video image data" refers to a continuous sequence of images captured by the handheld device's camera, used for visual analysis. "Scene motion reference" refers to a benchmark used to describe the background motion trend in the video frame, which can distinguish moving objects in the video from background motion. "Scene motion normalization processing" refers to removing background motion effects from the video image data, so that all moving objects are analyzed in a relatively static scene, thereby simplifying the identification and tracking of moving objects. "Moving object" refers to an entity with independent motion characteristics identified in the video image, usually referring to pedestrians. "Synchronization score" and "Coordination score" are key indicators for quantifying the motion relationship between the device holder and the moving object, used to ultimately determine whether tailing behavior exists.
[0027] In one embodiment, it is necessary to acquire the motion state information of the device holder of the handheld device and infer the device holder's motion intention based on this information, thereby obtaining the device holder's motion intention and trajectory. For example, the acceleration and angular velocity data of the device can be collected in real time through sensors built into the handheld device, such as accelerometers and gyroscopes. This raw data can be used directly for analysis; for example, when the acceleration is continuously greater than a certain threshold, it can be preliminarily determined that the device holder is accelerating. Alternatively, this raw data can be filtered and integrated to obtain smoother and more accurate motion state information, such as by fusing acceleration and angular velocity data through algorithms such as Kalman filtering to obtain the device holder's precise position, velocity, and attitude in three-dimensional space. Next, video image data of the handheld device is acquired, and a scene motion reference is established based on this data. The video image data is then normalized to scene motion to obtain normalized image data in the scene. For example, the handheld device's camera continuously captures a video stream. To establish a scene motion reference, some feature points considered to be background can be selected from the video frames, such as by extracting corner or edge features in the image using feature detection algorithms such as SIFT, SURF, or ORB. The displacements of these feature points across consecutive frames can be calculated, for example, using optical flow. By performing statistical analysis on the motion vectors of these background feature points, such as calculating their mean or median, the overall motion trend of the scene can be obtained, i.e., the scene motion reference. Then, using this scene motion reference, scene motion normalization processing is performed on the video image data.
[0028] In one embodiment, potential moving objects, such as pedestrians, can be identified in image data after scene motion normalization using background subtraction, inter-frame differencing, or deep learning object detection models (such as YOLO, SSD, etc.). Once a moving object is identified, it needs to be continuously tracked, for example using tracking algorithms such as Kalman filters, SORT, or DeepSORT, to obtain its continuous position in the normalized scene, thereby constructing the moving object's trajectory. Based on these trajectories, the moving object's intention can be further inferred. The consistency of the device holder's and the moving object's intentions within the same time period can be compared. If the device holder is accelerating and the moving object also shows a tendency to accelerate, the synchronization score will be high. Conversely, if the device holder is paused while the moving object is still moving rapidly, the synchronization score will be low. This evaluation can be achieved by setting a series of rules or using machine learning models. The geometric similarity between the two trajectories can be calculated, for example using Dynamic Time Warping (DTW) or Hausdorff distance to measure the matching degree of the two trajectories. If the two trajectories are highly similar in shape and path, the coordination score will be high. In addition, the relative distance and direction between the two can be considered. If the moving object remains within a certain distance behind the device holder for an extended period, and its direction of movement is consistent with that of the device holder, the coordination score will increase accordingly. Different weights can be assigned to the synchronization score and the coordination score, and a weighted sum can be obtained to obtain a comprehensive risk score. When this comprehensive risk score exceeds a preset threshold and persists for a period of time, the system can determine that tailgating behavior has occurred and immediately issue a warning to the device holder through sound, vibration, or screen prompts.
[0029] It should be noted that this application obtains the motion state information of the device holder and infers their motion intention and trajectory, providing a primary reference for subsequent tailgating determination. Simultaneously, by acquiring video image data and performing scene motion normalization processing, it effectively solves the interference of handheld device movement and complex nighttime lighting environments (such as low light, high noise, and motion blur) on target recognition and tracking. Identifying and tracking moving objects in a normalized scene and inferring their motion intention and trajectory ensures accurate capture of potential tailgaders. Subsequently, by evaluating the degree of synchronization of motion intention and coordination of motion trajectory between the device holder and the moving object, the relationship between the two can be more comprehensively and precisely characterized. Finally, a comprehensive judgment is made based on these two scores, and an early warning is issued, significantly improving the accuracy and reliability of nighttime pedestrian tailgating determination.
[0030] See Figure 2 , Figure 2This is a schematic flowchart illustrating the process of obtaining motion state information of a device holder of a handheld device according to an embodiment of this application. Specifically, obtaining the motion state information of a device holder of a handheld device may include the following steps: Step S210: Obtain the acceleration of the device holder through the three-axis accelerometer built into the handheld device and obtain the angular velocity of the device holder through the three-axis gyroscope built into the handheld device; Step S220: Determine the current forward direction of the equipment based on the angular velocity; Step S230: Determine the motion status information of the device holder based on acceleration, angular velocity and current direction of travel.
[0031] The handheld device incorporates a built-in three-axis accelerometer to measure the device's linear acceleration in three orthogonal directions, reflecting the user's linear motion, such as acceleration, deceleration, or uniform motion. A built-in three-axis gyroscope measures the device's angular velocity along three orthogonal axes, reflecting its rotational motion, such as turning or attitude changes. Furthermore, after acquiring the user's angular velocity, the device's current direction of travel can be determined based on its trend and cumulative value. For example, by integrating gyroscope data or combining it with magnetometer data for attitude calculation, the device's orientation can be tracked in real time, thus determining its direction of travel. Therefore, by comprehensively analyzing the acquired acceleration, angular velocity, and determined current direction of travel, a complete picture of the user's motion state can be determined. For example, by fusing these sensor data, detailed motion parameters such as the user's instantaneous velocity, displacement, and turning angle can be calculated. This application's solution, utilizing the built-in three-axis accelerometer and three-axis gyroscope, can capture multi-dimensional motion data of the user in real time and with high accuracy. Accelerometers provide quantified information on linear motion, while gyroscopes provide quantified information on rotational motion. Processing angular velocity to determine the device's current direction of travel makes subsequent interpretations of acceleration and angular velocity more directional, avoiding the ambiguity that can result from relying on data from a single sensor. Ultimately, fusing this multi-source data allows for the construction of a more complete and accurate model of the device owner's motion state. This detailed motion state information forms the basis for subsequent inferences about the device owner's intentions and trajectory, providing solid data support for determining tailing behavior.
[0032] The above method, based on motion state information, infers the device holder's motion intention, specifically including: When the acceleration represented by the motion state information is continuously greater than the first preset acceleration within a preset time period, it is inferred that the device holder is in an acceleration state. When the acceleration represented by the motion state information is continuously less than the second preset acceleration within a preset time period, it is inferred that the device holder is in a deceleration state. When the motion state information indicates that the acceleration is continuously greater than or equal to the third preset acceleration and less than or equal to the fourth preset acceleration within a preset time period, it is inferred that the device holder is in a constant speed state. When the absolute value of the angular velocity represented by the motion state information is continuously greater than the first preset angular velocity within a preset time period, it is inferred that the device holder is in a turning state. When the motion state information indicates that the acceleration is continuously less than the fifth preset acceleration and the angular velocity is continuously less than the second preset angular velocity within a preset time period, it is inferred that the device holder is in a stopped state. Among them, the first preset acceleration is greater than the fourth preset acceleration, the fourth preset acceleration is greater than the fifth preset acceleration, the fifth preset acceleration is greater than the third preset acceleration, the third preset acceleration is greater than the second preset acceleration, and the second preset angular velocity is less than the first preset angular velocity.
[0033] Specifically, the preset time period refers to the time window used to determine the continuity of motion. Its setting aims to avoid misjudgments caused by instantaneous data fluctuations and ensure the stability of the inferred motion intent. The length of this time period can be adjusted according to the actual application scenario and response speed requirements; for example, it can be set to 0.5 seconds to 2 seconds. The first, second, third, fourth, and fifth preset accelerations are thresholds used to distinguish different acceleration states. They collectively define the acceleration range for the device holder in acceleration, deceleration, constant speed, and stationary states. For example, the first preset acceleration can be set to a high positive value to identify obvious acceleration behavior; the second preset acceleration can be set to a negative value to identify obvious deceleration behavior; the third and fourth preset accelerations define a relatively stable acceleration range for identifying constant speed motion. The fifth preset acceleration is a small positive value close to zero, used to determine whether the device is stationary or nearly stationary. Similarly, the first preset angular velocity and the second preset angular velocity are thresholds used to distinguish between steering and non-steering states. The first preset angular velocity is used to identify obvious steering behavior, while the second preset angular velocity is used to determine whether the device is in a non-steering or slightly swaying state. The relationships between these preset thresholds—that is, the first preset acceleration is greater than the fourth preset acceleration, the fourth preset acceleration is greater than the fifth preset acceleration, the fifth preset acceleration is greater than the third preset acceleration, the third preset acceleration is greater than the second preset acceleration, and the second preset angular velocity is less than the first preset angular velocity—ensure the rigor and mutual exclusivity of the different motion intention judgment logics, avoiding ambiguity and overlap in state judgments.
[0034] It should be noted that this application, through refined analysis of acceleration and angular velocity data acquired by the handheld device, and by introducing a series of preset acceleration and angular velocity thresholds and duration judgments, can discretize the continuous motion state of the device holder into a clear motion intention. Specifically, by monitoring the continuous change trend of acceleration within a preset time period, acceleration, deceleration, and constant speed states can be accurately distinguished; by monitoring the absolute value of angular velocity, turning behavior can be effectively identified; and when both acceleration and angular velocity remain at extremely low levels, a stationary state can be determined. This judgment mechanism based on multi-dimensional motion parameters and time duration effectively avoids misjudgments that may arise from single instantaneous data, making the inference of the device holder's motion intention more accurate and stable.
[0035] In some embodiments, assuming that the acceleration of the device holder, as measured by the triaxial accelerometer built into the handheld device, is consistently greater than a first preset acceleration (e.g., 5 m / s²) within a preset time period (e.g., 0.5 seconds), the system infers that the device holder is accelerating. Conversely, if the acceleration is consistently less than a second preset acceleration (e.g., -2 m / s²), it is inferred that the device holder is decelerating. When the acceleration remains between a third preset acceleration (e.g., 0.5 m / s²) and a fourth preset acceleration (e.g., 1.5 m / s²), it is determined to be in a constant speed state. Furthermore, if the absolute value of the angular velocity measured by the triaxial gyroscope is consistently greater than a first preset angular velocity (e.g., 30 degrees / second), it is inferred that the device holder is turning. When the acceleration is consistently less than a fifth preset acceleration (e.g., 0.2 m / s²) and the angular velocity is consistently less than a second preset angular velocity (e.g., 5 degrees / second), it is inferred that the device holder is stationary. These preset acceleration and angular velocity thresholds, as well as the logical relationships between them, can be calibrated and optimized according to actual application scenarios and user behavior patterns to ensure the accuracy of motion intent inference.
[0036] See Figure 3 , Figure 3 This is a schematic diagram illustrating a process for obtaining motion state information of a device holder using a handheld device, according to one embodiment of this application. Specifically, the above-mentioned process of establishing a scene motion reference based on video image data and performing scene motion normalization processing on the video image data to obtain normalized image data in the scene includes: Step S310: Select target background corner points from video image data using the corner detector built into the handheld device; Step S320: Calculate the optical flow vector of the target background corner point every preset number of frames; Step S330: Perform statistical analysis on the optical flow vectors to obtain the average value of the optical flow vectors to establish a scene motion reference; Step S340: Obtain the original motion vector of the moving object in the video image data; Step S350: Determine the background motion vector based on the scene motion reference; Step S360: Perform scene motion normalization processing based on the background motion vector and the original motion vector to obtain image data in the normalized scene.
[0037] Specifically, after the handheld device acquires video image data, in order to accurately identify and track moving objects in the scene, it is necessary to first eliminate the influence of the handheld device's own motion on the video image data. To this end, a corner detector built into the handheld device, such as the Harris corner detector or the Shi-Tomasi corner detector, can be used to select a series of target background corners with significant features from the video image data. Further, to quantify the motion of these background corners, optical flow vectors for these target background corners can be calculated every preset number of frames. An optical flow vector represents the direction and velocity of pixel motion between consecutive frames in an image. By calculating the optical flow vectors of multiple background corners, information about the overall motion of the background can be obtained. Subsequently, these optical flow vectors are statistically analyzed, for example, by calculating their average value, to establish a scene motion reference. This average optical flow vector can effectively characterize the overall motion trend of the handheld device relative to the scene during shooting. Simultaneously, the original motion vectors of moving objects are obtained from the video image data. This can be achieved through methods such as background subtraction, inter-frame differencing, or deep learning to identify objects moving relative to the background in the image and calculate their motion vectors in the image. Based on this, the background motion vector is determined according to the established scene motion reference. Finally, scene motion normalization is performed based on the determined background motion vector and the original motion vectors of the moving objects.
[0038] It should be noted that this application quantifies the motion of the handheld device by first identifying background corner points in the video image and calculating their optical flow vectors. Statistical analysis of these optical flow vectors accurately establishes a scene motion reference, i.e., the motion pattern of the handheld device relative to its environment. Subsequently, the original motion vectors of the moving objects identified in the video image are compared and corrected with the background motion vectors determined by this scene motion reference. Specifically, by subtracting the background motion vectors from the original motion vectors of the moving objects, the interference of the handheld device's own motion, such as shaking, translation, or rotation, on the visual trajectory of the moving objects can be effectively eliminated. Thus, even when the handheld device is in motion, the video image data can be converted into a relatively static, normalized scene perspective, allowing subsequent identification and tracking of moving objects to more accurately reflect their motion in real physical space. This technical solution effectively solves the problem of distorted trajectories of foreground moving objects caused by the device's own motion when shooting video while the handheld device is moving or shaking. By establishing precise scene motion references and performing scene motion normalization, the interference of background motion on the motion analysis of foreground objects can be eliminated. This significantly improves the accuracy and stability of moving object identification and tracking in complex dynamic scenes, especially at night when lighting is insufficient or the background is blurred. This provides a more reliable and accurate data foundation for subsequent evaluation of the synchronization of movement intentions and trajectory coordination between the device holder and the moving object, thereby improving the accuracy of pedestrian tailgating at night.
[0039] See Figure 4 , Figure 4 This is a schematic flowchart illustrating the process of inferring the motion intention of a moving object according to an embodiment of this application. The above-described inference of the motion intention of a moving object based on its motion trajectory includes: Step S410: Based on the motion trajectory of the moving object, obtain the overlap rate of the motion trajectory and determine the instantaneous velocity of the moving object and the directional angle between the moving object and the equipment holder; Step S420: Based on the overlap rate of the motion trajectory, the instantaneous velocity of the moving object, and the directional angle, infer the motion intention of the moving object.
[0040] Specifically, the overlap rate of motion trajectories refers to the degree of spatial similarity or overlap between the motion path of a moving object and the motion path of a device holder over a period of time. This overlap rate can be obtained by calculating the similarity algorithm between the two trajectories (e.g., Dynamic Time Warping (DTW) or Fraser distance). The instantaneous velocity of the moving object can be understood as the magnitude of its velocity at a certain moment, which can be calculated by tracking the displacement changes of the moving object between consecutive frames and combining the frame rate. Its purpose is to reflect the current motion intensity of the moving object. In practical applications, the directional angle between the moving object and the device holder specifically refers to the angle between the current motion direction vector of the moving object and the current motion direction vector of the device holder. For example, it can be obtained by calculating the dot product or cross product of the two direction vectors. Its purpose is to characterize whether the moving object maintains the same motion direction as the device holder.
[0041] It should be noted that the solution in this application overcomes the limitations of relying solely on motion trajectories for rough intent inference by introducing three key indicators: the overlap rate of motion trajectories, instantaneous velocity, and directional angle. Specifically, the overlap rate of motion trajectories directly reflects whether the moving object continuously imitates or follows the device holder's path in space; a high overlap rate usually indicates a strong following intention. The instantaneous velocity of the moving object provides quantitative information about its motion dynamics. For example, if the moving object accelerates when the device holder accelerates, or decelerates when the device holder decelerates, it indicates a certain correlation between the two. Furthermore, the directional angle between the moving object and the device holder directly indicates the consistency of their motion directions; a smaller angle means that their motion directions tend to be consistent. It is precisely because these three indicators meticulously characterize the behavior of the moving object from three dimensions—space, velocity, and direction—that the inference of the moving object's motion intention becomes more accurate and reliable, effectively avoiding potential misjudgments that may occur with traditional methods.
[0042] In some embodiments, when the device holder is walking at night, the handheld device continuously acquires video image data. The system identifies and tracks a moving object. To infer the moving object's intention, the system first calculates the overlap rate between the moving object's trajectory and the device holder's trajectory over the past 30 seconds. For example, if the overlap rate is greater than 80%, it indicates that the moving object has a strong tendency to follow. Simultaneously, the system determines the moving object's instantaneous speed. For example, if the device holder is moving at a constant speed of 1.5 m / s, and the moving object is also moving continuously at a speed of 1.4-1.6 m / s, it indicates that their speeds match. Furthermore, the system calculates the directional angle between the moving object and the device holder. For example, if this angle is consistently less than 10 degrees, it indicates a high degree of consistency in movement direction. Combining this information, when the trajectory overlap rate is high, the instantaneous speed matches the device holder's speed, and the directional angle is small, the system can infer that the moving object has a clear intention to follow.
[0043] In some embodiments described above in this application, a method is proposed to assess the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and to obtain a synchronization score. Specifically, the step of assessing the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and obtaining a synchronization score, may include the following:
[0044] After determining the device holder's intention to move, the device holder's speed, turning angle, and relative distance between the device holder and the moving object are obtained within the next preset time period. Based on the speed of movement, turning angle, and relative distance, the degree of synchronization between the movement intention of the equipment holder and the movement intention of the moving object is assessed, and a synchronization score is obtained.
[0045] After determining the device holder's motion intention, it is necessary to obtain the motion speed, turning angle, and relative distance between the device holder and the moving object within the next preset time period. Specifically, motion speed refers to the rate of movement of the moving object within a specific time period, which can be calculated by tracking the positional changes of the moving object in consecutive video frames. Turning angle refers to the angle at which the moving object changes direction during movement, which can be obtained by analyzing the curvature or direction vector changes of the moving object's trajectory. Relative distance refers to the spatial distance between the device holder and the moving object, which can be estimated using video image processing techniques (e.g., based on target size, perspective, or depth information). The acquisition of these parameters aims to provide a quantitative basis for subsequent synchronization assessment. The solution in this application, by acquiring the motion speed, turning angle, and relative distance between the moving object and the device holder, can capture the correlation between the two in more detail regarding their motion behavior. When a moving object follows a device holder, its motion speed, turning angle, and relative distance to the device holder often exhibit a high degree of consistency or a specific correlation pattern. For example, a follower tends to maintain a similar speed to the follower, and will also turn accordingly when the follower turns, maintaining a relatively stable distance. By quantifying these parameters, multi-dimensional inputs can be provided for subsequent synchronization assessments, thereby improving the accuracy and reliability of the assessment.
[0046] The above assessment, based on speed, turning angle, and relative distance, evaluates the degree of synchronization between the device holder's movement intention and the movement intention of the moving object, resulting in a synchronization score, including: An initial synchronization score is preset based on movement speed, turning angle, and relative distance. When the device holder's intention to move is to stop, if the movement speed is less than the preset speed and the relative distance is within the preset distance range, the initial synchronization score is increased to obtain the synchronization score. When the device holder's intention to move is to accelerate or decelerate, if the movement speed is consistent with the device holder's speed change trend and the relative distance is within a preset distance range, the initial synchronization score is increased to obtain the synchronization score. When the device owner's intention is to turn, if the absolute difference between the turning angle and the device owner's turning angle is less than a preset difference, the initial synchronization score is increased to obtain the synchronization score.
[0047] The preset initial synchronization score refers to a basic score set based on parameters such as movement speed, turning angle, and relative distance after initial acquisition. This score can be obtained from empirical values or through training a machine learning model, reflecting the initial matching degree of the movement intentions of both parties. The preset speed refers to the highest speed threshold required for the moving object to be considered synchronized with the device holder when the device holder is stationary. The preset distance range refers to the distance interval between the moving object and the device holder considered as close contact, for example, it can be set to 1 to 5 meters. Consistent speed change trend means that when the device holder is accelerating, the moving object is also accelerating; when the device holder is decelerating, the moving object is also decelerating. The preset difference refers to the absolute difference between the turning angle of the moving object and the turning angle of the device holder when the device holder turns. When this difference is less than the preset value, it indicates that the turning behaviors of both parties are highly consistent. This application's solution, by meticulously distinguishing different movement intentions of the equipment holder (such as pausing, accelerating, decelerating, or turning) and setting corresponding synchronization evaluation conditions for each intention, can more accurately capture potential tailing behavior between the moving object and the equipment holder. For example, when the equipment holder pauses, if the moving object also quickly decelerates and stops near the equipment holder, its synchronization score will be significantly improved. Similarly, when the equipment holder accelerates or decelerates, if the moving object's acceleration or deceleration trend is consistent with itss and the distance between the two is moderate, the synchronization score will also increase accordingly. Furthermore, when the equipment holder turns, if the moving object also turns at a similar turning angle, it further indicates a high degree of synchronization between their movement intentions. This refined evaluation mechanism based on specific movement intentions makes the determination of synchronization closer to actual tailing behavior patterns.
[0048] In this regard, this application further proposes to analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the equipment holder, and obtain a coordination score, including: The geometric similarity between the motion trajectory of the moving object and the motion trajectory of the device holder is calculated to obtain an initial coordination score, wherein the geometric similarity is positively correlated with the initial coordination score; Obtain the relative distance and the angle between the moving object and the device holder; When the relative distance is within a preset range and the angle between the relative directions is less than a preset angle, the initial coordination score is increased to obtain the coordination score.
[0049] Specifically, calculating geometric similarity refers to quantifying the degree of matching between two motion trajectories in terms of shape, orientation, and relative position using a specific algorithm. For example, methods such as Dynamic Time Warping (DTW), Frechet distance, or Hausdorff distance can be used to calculate the geometric similarity of trajectories. A higher geometric similarity indicates a higher degree of matching between the two trajectories, resulting in a higher initial coordination score. This initial coordination score is the base score for evaluating tailing behavior, reflecting the similarity of the trajectories themselves. Furthermore, obtaining the relative distance and the angle between relative directions involves calculating the straight-line distance between the moving object and the device holder, as well as the angle between their motion direction vectors, after tracking their position information in real-time or near real-time. The relative distance reflects their spatial proximity, while the angle between their relative directions reflects the consistency of their motion directions.
[0050] It should be noted that this application, by introducing three key indicators—geometric similarity, relative distance, and the angle between relative directions—can more comprehensively and precisely assess the degree of trajectory coordination between a moving object and a device holder. First, geometric similarity effectively captures the morphological matching of two trajectories, providing a basic quantitative basis for the degree of coordination. Second, by obtaining and determining whether the relative distance is within a preset range, situations where the trajectories are similar but the actual distance is too great to constitute a tailing threat can be ruled out. Finally, combined with the angle between relative directions, it can be further confirmed whether the moving object is continuously moving in the direction the device holder is traveling, thereby effectively distinguishing between accidental unidirectional movement and intentional following behavior.
[0051] The above-mentioned determination of whether tailing behavior exists, based on synchronization and coordination scores, and the issuance of warnings, specifically includes: Set corresponding preset weights for the synchronization score and the coordination score; A comprehensive risk score is obtained by weighting the synchronization score, the coordination score, and the corresponding preset weights. If the overall risk score is greater than the preset risk score and the duration of the overall risk score being greater than the preset risk score is greater than the preset duration, it is determined whether there is tailing behavior and an early warning is issued.
[0052] Specifically, preset weights refer to the numerical values assigned to the synchronization score and coordination score, reflecting their relative importance in determining tailing behavior. For example, the weight of the synchronization score can be set to 0.6 and the weight of the coordination score to 0.4, based on practical application scenarios and experience, or adjusted according to specific needs. These weights can be preset or dynamically optimized through machine learning. Weighted calculation involves multiplying the synchronization score and coordination score by their respective preset weights, then summing the products to obtain a comprehensive value, i.e., the comprehensive risk score. For example, the comprehensive risk score can be calculated as: (synchronization score × preset weight of synchronization score) + (coordination score × preset weight of coordination score). In practical applications, the preset risk score is a threshold used to determine whether the comprehensive risk score reaches the danger level that triggers a warning. When the comprehensive risk score exceeds this preset risk score, it indicates a potential tailing risk. Furthermore, the preset duration refers to the length of time required for the comprehensive risk score to remain above the preset risk score. The introduction of duration is to avoid false alarms caused by instantaneous score fluctuations, ensuring that warnings are only triggered after the trailing risk has persisted for a period of time, thereby improving the accuracy and stability of warnings.
[0053] It should be noted that this application, by introducing preset weights to weight the synchronization and coordination scores, can more comprehensively and reasonably assess potential tailing risks. Given that synchronization and coordination may have different indicative meanings and importance in tailing behavior, assigning different weights allows the judgment model to better reflect reality. For example, in some scenarios, the synchronization of movement intention may be a better indicator of tailing intent than the coordination of trajectory, and vice versa. It is precisely because of this weighting mechanism that the comprehensive risk score can more accurately reflect the true degree of tailing threat. Furthermore, this application effectively avoids false alarms caused by occasional or transient events by judging whether the comprehensive risk score is consistently greater than the preset risk score.
[0054] See Figure 5 , Figure 5 This is a schematic diagram of a nighttime pedestrian tailing determination system based on video image analysis, provided as an embodiment of this application. The nighttime pedestrian tailing determination system 500 based on video image analysis includes: The first acquisition module 510 is used to acquire the motion state information of the device holder of the handheld device, and infer the motion intention of the device holder based on the motion state information to obtain the motion intention and motion trajectory of the device holder. The second acquisition module 520 is used to acquire video image data from a handheld device, establish a scene motion reference based on the video image data, and perform scene motion normalization processing on the video image data to obtain image data in the normalized scene. The identification and inference module 530 is used to identify and track moving objects in image data in a normalized scene, and infer the moving intention of the moving object based on the moving object's motion trajectory, so as to obtain the moving object's motion intention and motion trajectory. The evaluation module 540 is used to evaluate the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and obtain a synchronization score. Analysis module 550 is used to analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the equipment holder, and obtain a coordination score. The judgment module 560 is used to determine whether tailing behavior exists based on the synchronization degree score and the coordination degree score, and to issue an early warning.
[0055] It should be noted that the information interaction and execution process between the above modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.
[0056] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0057] The above provides a detailed description of the preferred embodiments of this application. However, this application is not limited to the above-described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined in this application.
Claims
1. A method for determining pedestrian tailing at night based on video image analysis, applied to a handheld device, characterized in that, include: The motion state information of the device holder of the handheld device is obtained, and based on the motion state information, the motion intention of the device holder is inferred to obtain the motion intention and motion trajectory of the device holder. The video image data of the handheld device is acquired, a scene motion reference is established based on the video image data, and the scene motion normalization processing is performed on the video image data to obtain image data in the normalized scene. In the image data of the normalized scene, moving objects are identified and tracked, and based on the motion trajectory of the moving objects, the motion intention of the moving objects is inferred to obtain the motion intention and motion trajectory of the moving objects; The degree of synchronization between the movement intention of the device holder and the movement intention of the moving object is assessed to obtain a synchronization score; Analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder to obtain a coordination score; Based on the synchronization score and the coordination score, it is determined whether tailing behavior exists and an early warning is issued.
2. The method according to claim 1, characterized in that, The step of obtaining the motion status information of the device holder of the handheld device includes: The device owner's acceleration is obtained through the built-in three-axis accelerometer of the handheld device, and the device owner's angular velocity is obtained through the built-in three-axis gyroscope of the handheld device. The current direction of travel of the device is determined based on the angular velocity; The motion state information of the device holder of the handheld device is determined based on the acceleration, the angular velocity, and the current direction of travel.
3. The method according to claim 2, characterized in that, The step of inferring the device holder's movement intention based on the movement state information includes: When the motion state information indicates that the acceleration is continuously greater than the first preset acceleration within a preset time period, it is inferred that the device holder is in an acceleration state. When the motion state information indicates that the acceleration is continuously less than the second preset acceleration within a preset time period, it is inferred that the device holder is in a deceleration state. When the motion state information indicates that the acceleration is continuously greater than or equal to the third preset acceleration and less than or equal to the fourth preset acceleration within a preset time period, it is inferred that the device holder is in a constant speed state. When the absolute value of the angular velocity represented by the motion state information is continuously greater than a first preset angular velocity within a preset time period, it is inferred that the device holder is in a turning state; When the motion state information indicates that the acceleration is continuously less than the fifth preset acceleration and the angular velocity is continuously less than the second preset angular velocity within a preset time period, it is inferred that the device holder is in a stationary state, wherein the first preset acceleration is greater than the fourth preset acceleration, the fourth preset acceleration is greater than the fifth preset acceleration, the fifth preset acceleration is greater than the third preset acceleration, the third preset acceleration is greater than the second preset acceleration, and the second preset angular velocity is less than the first preset angular velocity.
4. The method according to claim 1, characterized in that, The step of establishing a scene motion reference based on the video image data and performing scene motion normalization processing on the video image data to obtain normalized image data in the scene includes: The target background corner is selected from the video image data using the corner detector built into the handheld device; Calculate the optical flow vector of the target background corner point every preset number of frames; Statistical analysis is performed on the optical flow vectors to obtain their average value, which is then used to establish a scene motion reference. Obtain the original motion vectors of the moving objects in the video image data; Determine the background motion vector based on the scene motion reference; Scene motion normalization is performed based on the background motion vector and the original motion vector to obtain image data in the normalized scene.
5. The method according to claim 1, characterized in that, The step of inferring the motion intention of the moving object based on its motion trajectory includes: Based on the motion trajectory of the moving object, the overlap rate of the motion trajectory is obtained, and the instantaneous velocity of the moving object and the directional angle between the moving object and the device holder are determined. Based on the overlap rate of the motion trajectory, the instantaneous velocity of the moving object, and the directional angle, the motion intention of the moving object is inferred.
6. The method according to claim 1, characterized in that, The assessment of the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, to obtain a synchronization score, includes: After determining the device holder's movement intention, the device holder's movement speed, turning angle, and relative distance between the device holder and the moving object are obtained within the next preset time period. Based on the movement speed, the turning angle, and the relative distance, the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object is evaluated, and a synchronization score is obtained.
7. The method according to claim 6, characterized in that, The process involves evaluating the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object based on the movement speed, the turning angle, and the relative distance, to obtain a synchronization score, including: An initial synchronization score is preset based on the movement speed, the turning angle, and the relative distance. When the device holder's intention to move is to stop, if the movement speed is less than a preset speed and the relative distance is within a preset distance range, the initial synchronization score is increased to obtain a synchronization score. When the device holder's movement intention is to accelerate or decelerate, if the movement speed is consistent with the speed change trend of the device holder and the relative distance is within a preset distance range, the initial synchronization score is increased to obtain a synchronization score. When the device holder's intention to move is to turn, if the absolute difference between the turning angle and the device holder's turning angle is less than a preset difference, the initial synchronization score is increased to obtain a synchronization score.
8. The method according to claim 1, characterized in that, The analysis determines the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder, resulting in a coordination score, including: Calculate the geometric similarity between the motion trajectory of the moving object and the motion trajectory of the device holder to obtain an initial coordination score, wherein the geometric similarity is positively correlated with the initial coordination score; Obtain the relative distance and the angle between the moving object and the device holder; When the relative distance is within a preset range and the angle between the relative directions is less than a preset angle, the initial coordination score is increased to obtain a coordination score.
9. The method according to claim 1, characterized in that, The determination of whether tailing behavior exists based on the synchronization score and the coordination score, and the issuance of an early warning, includes: Set corresponding preset weights for the synchronization score and the coordination score; A comprehensive risk score is obtained by weighting the synchronization score, the coordination score, and the corresponding preset weights. If the overall risk score is greater than the preset risk score and the duration of the overall risk score being greater than the preset risk score is greater than the preset duration, it is determined whether there is tailing behavior and an early warning is issued.
10. A nighttime pedestrian tailing detection system based on video image analysis, applied to a handheld device, characterized in that, include: The first acquisition module is used to acquire the motion state information of the device holder of the handheld device, and infer the motion intention of the device holder based on the motion state information to obtain the motion intention and motion trajectory of the device holder. The second acquisition module is used to acquire video image data of the handheld device, establish a scene motion reference based on the video image data, and perform scene motion normalization processing on the video image data to obtain image data in the normalized scene. The identification and inference module is used to identify and track moving objects in the image data of the normalized scene, and infer the movement intention of the moving objects based on their movement trajectories, thereby obtaining the movement intention and movement trajectory of the moving objects. The evaluation module is used to evaluate the degree of synchronization between the movement intention of the device holder and the movement intention of the moving object, and obtain a synchronization score. The analysis module is used to analyze the degree of coordination between the motion trajectory of the moving object and the motion trajectory of the device holder, and obtain a coordination score; The determination module is used to determine whether tailing behavior exists based on the synchronization score and the coordination score, and to issue an early warning.