Pedestrian state tracking method and device, storage medium and computer device
By introducing a preset process state matrix and chi-square test into Kalman filtering, and using the pedestrian movement path as the input parameter, the problem of insufficient convergence speed and accuracy in pedestrian tracking is solved, and faster and more accurate pedestrian state tracking is achieved.
Patent Information
- Application Number
- CN202410581962.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-11
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-05-11
AI Technical Summary
Existing Kalman filters have poor convergence speed and accuracy in pedestrian tracking, mainly due to noise interference caused by uncontrollable acceleration during pedestrian movement and parameter distortion caused by frame interpolation compensation after the model loses the target.
In Kalman filtering, a preset process state matrix is introduced. By collecting pedestrian movement paths as input parameters, a chi-square test is performed to update the posterior state variables and covariance matrix, thereby reducing the number of parameters and noise interference and improving convergence speed and accuracy.
By reducing the number of parameters and noise interference, the convergence speed and accuracy of Kalman filtering in pedestrian state tracking are improved.
Smart Images

Figure CN118485693B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a pedestrian state tracking method and device, a storage medium and a computer device. BACKGROUND
[0002] In recent years, with the rapid development of science and technology, Kalman filtering is applied more and more widely. Kalman filtering is a mathematical technique for estimating unknown variables from a series of incomplete or inaccurate data. It can optimize the processing of time series data to obtain a corrected prediction result. Its application scenarios involve many fields such as industry, military, aviation, automobile, medical treatment, finance and the like, so as to improve the performance and efficiency of various application systems.
[0003] At present, when Kalman filtering is applied to pedestrian tracking, the input parameters of the model are relatively complex, which include the distance and speed of pedestrian movement. Therefore, in Kalman filtering, the uncontrollable acceleration in the pedestrian movement process will cause noise interference, and the model will use frame interpolation to compensate for the target after losing the target, so that the input parameters of the model are distorted, and then the convergence speed and accuracy of the tracking algorithm used by Kalman filtering are poor. SUMMARY
[0004] The present application aims to at least solve one of the above technical defects, in particular, the technical defect that the convergence speed and accuracy of the tracking algorithm used by Kalman filtering in the prior art are poor.
[0005] The present application provides a pedestrian state tracking method based on Kalman filtering, which comprises the following steps:
[0006] When a target pedestrian is detected for the first time, the moving path of the target pedestrian at the current time is collected, and the initial data of Kalman filtering is determined; the initial data includes a posterior state quantity and a posterior covariance matrix;
[0007] A prior state quantity corresponding to the posterior state quantity is determined, a prior covariance matrix corresponding to the posterior covariance matrix is determined by using a preset process state matrix, and a chi-square test is performed on the moving path based on the moving path, the prior state quantity and the prior covariance matrix, to obtain a test result;
[0008] The posterior state quantity and the posterior covariance matrix are updated according to the test result, and the updated posterior state quantity and posterior covariance matrix are outputted;
[0009] The moving path of the target pedestrian at the next time is continuously collected, and the determination of the prior state quantity corresponding to the posterior state quantity and the following steps are returned to be executed until a preset ending condition is met.
[0010] Optionally, determining the prior state quantity corresponding to the posterior state quantity includes:
[0011] The state transition matrix of the Kalman filter is determined, and the state transition matrix is used to perform state transition on the posterior state quantity to obtain the prior state quantity corresponding to the posterior state quantity.
[0012] Optionally, determining the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix includes:
[0013] Determine the state noise matrix of the Kalman filter; the state noise matrix is used to describe the noise interference during the state transition process of the Kalman filter.
[0014] The process state matrix is used to optimize the state noise matrix, and the optimized state noise matrix is used to perform state transition on the posterior covariance matrix to obtain the prior covariance matrix corresponding to the posterior covariance matrix.
[0015] Optionally, the test result is either pass or fail;
[0016] The chi-square test is performed on the movement path based on the movement path, the prior state variables, and the prior covariance matrix to obtain the test results, including:
[0017] Determine the measurement noise matrix of the Kalman filter; the measurement noise matrix is used to describe the noise interference of the movement path during the acquisition process;
[0018] Determine the residual value between the movement path and the prior state quantity, and calculate the chi-square value based on the residual value, the measurement noise matrix, and the prior covariance matrix;
[0019] If the chi-square value is not less than a preset threshold, then the test result of the movement path is determined to be passed;
[0020] If the chi-square value is less than the preset threshold, the test result of the movement path is determined to be unsuccessful.
[0021] Optionally, updating the posterior state variable and the posterior covariance matrix based on the test result includes:
[0022] When the test result is passed, the Kalman gain is determined according to the prior covariance matrix, and the posterior state variable and the posterior covariance matrix are updated based on the Kalman gain.
[0023] When the test result is negative, the posterior state quantity is updated based on the movement path, and the posterior covariance matrix is updated to the posterior covariance matrix in the initial data.
[0024] Optionally, updating the posterior state quantity based on the Kalman gain includes:
[0025] The residual value between the movement path and the prior state quantity is determined, and the prior state quantity is optimized based on the Kalman gain and the residual value. The optimization result is then used as the updated posterior state quantity.
[0026] Optionally, updating the posterior covariance matrix based on the Kalman gain includes:
[0027] The prior covariance matrix is optimized based on the Kalman gain, and the optimization result is used as the updated posterior covariance matrix.
[0028] This application also provides a pedestrian status tracking device, including:
[0029] The data initialization module is used to collect the movement path of the target pedestrian at the current time when the target pedestrian is first detected, and to determine the initial data for Kalman filtering; the initial data includes posterior state variables and posterior covariance matrix.
[0030] The chi-square test module is used to determine the prior state quantity corresponding to the posterior state quantity, and to determine the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix, and to perform a chi-square test on the movement path based on the movement path, the prior state quantity and the prior covariance matrix to obtain the test result.
[0031] The data update module is used to update the posterior state quantity and the posterior covariance matrix according to the test result, and output the updated posterior state quantity and posterior covariance matrix.
[0032] The iterative solution module is used to continue collecting the movement path of the target pedestrian at the next moment, and return to execute the determination of the prior state corresponding to the posterior state and the following steps until the preset termination condition is met.
[0033] This application also provides a storage medium, characterized in that: the storage medium stores computer-readable instructions, which, when executed by one or more processors, cause one or more processors to perform the steps of the pedestrian state tracking method as described in any of the above embodiments.
[0034] This application also provides a computer device, characterized in that it includes: one or more processors, and a memory;
[0035] The memory stores computer-readable instructions, which, when executed by the one or more processors, perform the steps of the pedestrian state tracking method as described in any of the above embodiments.
[0036] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0037] The pedestrian state tracking method, apparatus, storage medium, and computer equipment provided in this application, when using Kalman filtering to track the motion state of a pedestrian, can acquire the target pedestrian's movement path at the current moment when the target pedestrian is first detected, and determine the initial data for Kalman filtering. This initial data includes posterior state variables and a posterior covariance matrix, thereby obtaining the basic data required for pedestrian state tracking. Next, it can determine the prior state variables corresponding to the posterior state variables, and, using a preset process state matrix, determine the prior covariance matrix corresponding to the posterior covariance matrix. Based on the movement path and prior covariance matrix, the method and apparatus can then track the pedestrian state. The posterior state variables and prior covariance matrix are used to perform a chi-square test on the movement path to obtain the test result. Here, by using a preset process state matrix, only the movement path can be used as an input parameter, thereby reducing the convergence impact caused by a large number of parameters and noise interference caused by acceleration. Finally, the posterior state variables and posterior covariance matrix are updated according to the test result, and the updated posterior state variables and posterior covariance matrix are output. Then, the movement path of the target pedestrian at the next time step can be collected, and the process returns to determine the prior state variable corresponding to the posterior state variable and the following steps until the preset termination condition is met. In pedestrian state tracking, this application can add a preset process state matrix to the Kalman filter and use the pedestrian's movement path as an input parameter, thereby improving the convergence speed and accuracy of the Kalman filter by reducing the number of parameters. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating a pedestrian state tracking method provided in an embodiment of this application;
[0040] Figure 2A flowchart illustrating a chi-square test process provided in an embodiment of this application;
[0041] Figure 3 A schematic diagram of the structure of a pedestrian status tracking device provided in an embodiment of this application;
[0042] Figure 4 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0043] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] Currently, when Kalman filtering is applied to pedestrian tracking, the input parameters of the model are relatively complex, including the distance and speed of the pedestrian's movement. Therefore, during Kalman filtering, the uncontrollable acceleration during the pedestrian's movement will cause noise interference, and the model will use frame interpolation to compensate for the target after losing the target, which will distort the model's input parameters. As a result, the tracking algorithm used by Kalman filtering has poor convergence speed and accuracy.
[0045] Based on this, this application proposes the following technical solution, as detailed below:
[0046] In one embodiment, such as Figure 1 As shown, Figure 1 This is a flowchart illustrating a pedestrian state tracking method provided in an embodiment of this application. The present application provides a pedestrian state tracking method, specifically including the following:
[0047] S110: When the target pedestrian is first detected, the pedestrian's movement path at the current time is collected, and the initial data for Kalman filtering is determined; the initial data includes the posterior state variables and the posterior covariance matrix.
[0048] In this step, when a user needs to track the status of pedestrians in a real-world scene, they can activate the pedestrian tracking system. This system collects data on the movement of pedestrians at preset time intervals, obtaining the distance traveled by each pedestrian at any given moment and performing corresponding dynamic tracking. When the system first detects a pedestrian, it can designate that pedestrian as the target pedestrian and collect their current movement path to determine the initial data for the Kalman filter, thereby improving the accuracy of the Kalman filter process.
[0049] The initial data here includes the posterior state quantity and the posterior covariance matrix. The posterior state quantity refers to the estimated pedestrian state obtained after the prediction and update steps, based on the Kalman filter model and sensor measurement data; it provides the optimal estimate of the current pedestrian state in the system. The posterior covariance matrix, on the other hand, is a measure of the uncertainty of the pedestrian state estimate obtained after the prediction and update steps, based on the Kalman filter model and sensor measurement data. It provides variance and covariance information of the pedestrian state estimate, used to evaluate the accuracy and stability of the estimate. Therefore, at the first moment of Kalman filtering of the pedestrian state, the pedestrian tracking system can initialize the posterior state quantity and the posterior covariance matrix, using them as the posterior state quantity and posterior covariance matrix of the previous moment.
[0050] Specifically, the initial posterior state value in a pedestrian tracking system can be represented as follows:
[0051]
[0052] The initial posterior covariance matrix in a pedestrian tracking system can be represented as follows:
[0053]
[0054] Furthermore, when collecting the movement path of a target pedestrian, the pedestrian tracking system can use sensors to collect the target pedestrian's current position coordinates and subtract the current position coordinates from the position coordinates collected at the previous moment to obtain the target pedestrian's current distance traveled. In this application, the pedestrian tracking system can use this distance traveled as a parameter input to the Kalman filter model, thereby achieving dynamic tracking of the pedestrian's state.
[0055] Understandably, when a pedestrian tracking system performs dynamic pedestrian state tracking, it can track the state of a single target pedestrian or track the state of multiple pedestrians simultaneously; there is no limitation on this. After the pedestrian tracking system is started, when a pedestrian is detected for the first time, a new set of initial data for Kalman filtering can be acquired, and then the pedestrian's state can be dynamically tracked through Kalman filtering.
[0056] S120: Determine the prior state quantity corresponding to the posterior state quantity, and determine the prior covariance matrix corresponding to the posterior covariance matrix using the preset process state matrix, and perform a chi-square test on the movement path based on the movement path, the prior state quantity and the prior covariance matrix to obtain the test result.
[0057] In this step, after obtaining the posterior state quantity and the posterior covariance matrix through the steps, the pedestrian tracking system can first determine the prior state quantity corresponding to the posterior state quantity, and then determine the prior covariance matrix corresponding to the posterior covariance matrix using the preset process state matrix. Then, the pedestrian tracking system can perform a chi-square test on the movement path based on the current movement path, the prior state quantity, and the prior covariance matrix to obtain the test result.
[0058] In this context, unlike posterior state variables and posterior covariance matrices, prior state variables refer to the predicted system state obtained based on the Kalman filter model after the prediction step, while the prior covariance matrix measures the uncertainty of the predicted system state obtained based on the system dynamic model after the prediction step. Furthermore, a preset process state matrix is used to describe the impact of the Kalman filter on the pedestrian's state during state transitions. Therefore, by using the preset process state matrix, this application can use the travel distance as an input parameter for the Kalman filter, thereby reducing the number of Kalman filter parameters.
[0059] Specifically, the preset process state matrix can be represented as follows:
[0060]
[0061] S130: Update the posterior state variables and posterior covariance matrix based on the test results, and output the updated posterior state variables and posterior covariance matrix.
[0062] In this step, after obtaining the test result through step S120, the pedestrian tracking system can update the posterior state quantity and the posterior covariance matrix according to the test result, and output the updated posterior state quantity and the posterior covariance matrix, that is, the posterior state quantity and the posterior covariance matrix are used as the state prediction of the target pedestrian at the current time and output.
[0063] Understandably, this application can use the test results to determine whether the target pedestrian has been lost or left the system's tracking range. Based on this, the pedestrian tracking system can use different calculation methods to update the posterior state variables and posterior covariance matrix according to different test results. This avoids the pedestrian tracking system using frame interpolation to compensate for the target after losing the target pedestrian, which would cause the input parameters of the Kalman filter to be unrealistic and thus reduce the accuracy of the Kalman filter.
[0064] S140: Continue to collect the movement path of the target pedestrian at the next moment, and return to execute the determination of the prior state quantity corresponding to the posterior state quantity and the following steps, until the preset termination condition is met.
[0065] In this step, after obtaining the posterior state quantity and posterior covariance matrix of the target pedestrian at the current time through step S130, the pedestrian tracking system can continue to collect the movement path of the target pedestrian at the next time and return to execute the determination of the prior state quantity corresponding to the posterior state quantity and the following steps until the preset termination condition is met.
[0066] It is understandable that the preset termination condition here could refer to the target pedestrian leaving the system's tracking range, or it could refer to the Kalman filter reaching a preset number of predictions; no restrictions are imposed here. After obtaining the prediction value at the current moment, the pedestrian tracking system can continue to calculate the prediction value for the next moment until the Kalman filter ends. Therefore, the dynamic predicted state of the target pedestrian can be obtained based on the prediction values output at each moment.
[0067] In the above embodiments, when using Kalman filtering to track the motion state of a pedestrian, the pedestrian's movement path at the current moment can be collected when the target pedestrian is first detected, and the initial data for Kalman filtering can be determined. This initial data includes the posterior state quantity and the posterior covariance matrix, thus obtaining the basic data required for pedestrian state tracking. Next, the prior state quantity corresponding to the posterior state quantity can be determined, and the prior covariance matrix corresponding to the posterior covariance matrix can be determined using a preset process state matrix. Based on the movement path, prior state quantity, and prior covariance matrix... The moving path is subjected to a chi-square test to obtain the test result. Here, by using a preset process state matrix, only the moving path can be used as an input parameter, thereby reducing the convergence impact caused by a large number of parameters and the noise interference caused by acceleration. Finally, the posterior state quantity and posterior covariance matrix are updated according to the test result, and the updated posterior state quantity and posterior covariance matrix are output. Then, the moving path of the target pedestrian at the next time step can be collected, and the process returns to determine the prior state quantity corresponding to the posterior state quantity and the following steps until the preset termination condition is met. In pedestrian state tracking, this application can add a preset process state matrix to the Kalman filter and use the pedestrian's moving path as an input parameter, thereby improving the convergence speed and accuracy of the Kalman filter by reducing the number of parameters.
[0068] In one embodiment, determining the prior state quantity corresponding to the posterior state quantity in step S120 may include:
[0069] S121: Determine the state transition matrix of the Kalman filter, and use the state transition matrix to perform state transition on the posterior state variables to obtain the prior state variables corresponding to the posterior state variables.
[0070] In this embodiment, when determining the prior state quantity, the pedestrian tracking system can first determine the state transition matrix of the Kalman filter, and then use the state transition matrix to perform state transition on the posterior state quantity, thereby obtaining the prior state quantity corresponding to the posterior state quantity.
[0071] The state transition matrix can be used to describe the evolution of the pedestrian's state between two consecutive time points in the Kalman filter. In this application, the state transition matrix can be represented as follows:
[0072]
[0073] Specifically, the expression for the prior state quantity is as follows:
[0074]
[0075] In the formula, F represents the prior state quantity at the current moment; k Represents the state transition matrix; x k-1 This represents the posterior state quantity of the previous time step.
[0076] In one embodiment, determining the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix in step S120 may include:
[0077] S122: Determine the state noise matrix of the Kalman filter; the state noise matrix is used to describe the noise interference during the state transition process of the Kalman filter.
[0078] S123: Optimize the state noise matrix using the process state matrix, and perform state transition on the posterior covariance matrix based on the optimized state noise matrix to obtain the prior covariance matrix corresponding to the posterior covariance matrix.
[0079] In this embodiment, when determining the prior covariance matrix, the pedestrian tracking system can first determine the state noise matrix of the Kalman filter, then optimize the state noise matrix using the process state matrix, and perform state transition on the posterior covariance matrix based on the optimized state noise matrix to obtain the prior covariance matrix corresponding to the posterior covariance matrix. The state noise matrix can be used to describe the noise interference during the state transition process of the Kalman filter.
[0080] Specifically, the expression for the prior covariance matrix is as follows:
[0081]
[0082] In the formula, F represents the prior covariance matrix at the current time step; k Represents the state transition matrix; P represents the transpose of the state transition matrix; k-1 Γ represents the posterior covariance matrix of the previous time step; k Represents the process state matrix; Q represents the transpose of the process state matrix; k This represents the state noise matrix.
[0083] Wherein, the state noise matrix Q k It can be represented as follows:
[0084]
[0085] In one embodiment, such as Figure 2 As shown, Figure 2 A flowchart illustrating a chi-square test process provided in an embodiment of this application; Figure 2 In step S120, the test result is either pass or fail; the step of performing a chi-square test on the movement path based on the movement path, prior state variables, and prior covariance matrix to obtain the test result may include:
[0086] S124: Determine the measurement noise matrix of the Kalman filter; the measurement noise matrix is used to describe the noise interference of the movement path during the acquisition process.
[0087] S125: Determine the residual value between the movement path and the prior state variables, and calculate the chi-square value based on the residual value, the measurement noise matrix, and the prior covariance matrix.
[0088] S126: If the chi-square value is not less than the preset threshold, the test result of the moving path is determined to be passed.
[0089] S127: If the chi-square value is less than the preset threshold, the test result of the moving path is determined to be unsuccessful.
[0090] In this embodiment, after obtaining the prior state variables and the prior covariance matrix, the pedestrian tracking system can first determine the measurement noise matrix of the Kalman filter. This measurement noise matrix can be used to describe the noise interference of the movement path during the acquisition process. Then, the pedestrian tracking system can determine the residual value between the movement path and the prior state variables, and calculate the chi-square value based on the residual value, the measurement noise matrix, and the prior covariance matrix. The chi-square value can then be compared with a preset threshold, and the test result can be used to determine whether the test passes.
[0091] Understandably, when the chi-square value is not less than the preset threshold, it means that the pedestrian tracking system has not lost track of the target pedestrian at the current moment, so the movement path test result can be determined to be passed; when the chi-square value is not less than the preset threshold, it means that the pedestrian tracking system has lost track of the target pedestrian at the current moment or the target pedestrian is not within the system's tracking range, so the movement path test result can be determined to be failed.
[0092] Specifically, the residual values in the Kalman filtering process are expressed as follows:
[0093]
[0094] In the formula, e k Represents the residual value; z k H represents the state value, i.e., the distance traveled by the target pedestrian at the current moment; k The measurement matrix represents the Kalman filter used to convert state values into measurement values; This represents the prior state quantity at the current moment.
[0095] Among them, the measurement matrix H k It can be represented as follows:
[0096]
[0097] The chi-square value is expressed as follows:
[0098]
[0099] In the formula, r k e represents the chi-square value. k H represents the residual value; k Represents the measurement matrix; This represents the transpose of the measurement matrix; R represents the prior covariance matrix at the current time step; k Represents the measurement noise matrix. This represents the transpose of the residual value.
[0100] Among them, the measurement noise matrix R k It can be represented as follows:
[0101]
[0102] Furthermore, after calculating the chi-square value, the pedestrian tracking system can substitute the chi-square value into the following function:
[0103]
[0104] Understandably, the above function converts the chi-square value into a probability value between 0 and 1, which is then used to determine whether the target has been lost or is the current pedestrian. The larger the chi-square value, the smaller the parameter t in the function, and e... -t The larger the value of , the smaller the value of σ(t). Conversely, the smaller the chi-square value, the larger the parameter t in the function, and the larger the value of e. -t The smaller the value of , the larger the value of σ(t). Therefore, by substituting the chi-square value into the σ(t) function, the chi-square value can be converted into a probability value between 0 and 1, which can be used to determine whether the detected target has been lost or whether it is the current target pedestrian.
[0105] For example, when the chi-square value is large, the value of σ(t) will be close to 0, meaning that the current target pedestrian may have been lost; when the chi-square value is small, the value of σ(t) will be close to 1, meaning that the currently detected target may be the target pedestrian. This application uses this method to make judgments based on probability values, thereby better realizing the function of target pedestrian tracking.
[0106] In one embodiment, updating the posterior state variables and the posterior covariance matrix based on the test results in step S130 may include:
[0107] S131: When the test result is passed, the Kalman gain is determined based on the prior covariance matrix, and the posterior state variables and the posterior covariance matrix are updated based on the Kalman gain.
[0108] S132: When the test result is not passed, update the posterior state variables based on the movement path, and update the posterior covariance matrix to the posterior covariance matrix in the initial data.
[0109] In this embodiment, the pedestrian tracking system can update the posterior state variables and posterior covariance matrix in different ways according to different test results, so as to improve the accuracy of Kalman filtering.
[0110] Specifically, when the test result is "pass," it indicates that the Kalman filtering process is normal at the current moment. In this case, the pedestrian tracking system can determine the Kalman gain based on the prior covariance matrix, and then update the posterior state variables and the posterior covariance matrix based on the Kalman gain. When the test result is "fail," it indicates that the Kalman filter cannot track the true state of the target pedestrian at the current moment. In this case, the pedestrian tracking system can update the posterior state variables based on the movement path, and update the posterior covariance matrix to the posterior covariance matrix in the initial data.
[0111] Specifically, when the test result passes, the expression for the Kalman gain can be as follows:
[0112]
[0113] In the formula, K k Indicates Kalman gain; H represents the prior covariance matrix at the current time step; k Represents the measurement matrix; Represents the transpose of the measurement matrix; R k This represents the measurement noise matrix.
[0114] When the test result is "fail", the update expression for the posterior state variable can be as follows:
[0115] x k =Hz k
[0116] In the formula, x k Z represents the posterior state at the current time step; H represents the state transition matrix; z k This represents the state quantity at the current moment; that is, the distance traveled by the target pedestrian at the current moment.
[0117] In one embodiment, updating the posterior state quantity based on the Kalman gain in step S131 may include:
[0118] S1311: Determine the residual value between the movement path and the prior state variable, optimize the prior state variable based on the Kalman gain and the residual value, and use the optimization result as the updated posterior state variable.
[0119] In this embodiment, when the test result is passed, the pedestrian tracking system can first determine the residual value between the movement path and the prior state quantity, and then optimize the prior state quantity according to the Kalman gain and the residual value, and use the optimization result as the updated posterior state quantity.
[0120] Specifically, when the test result is passed, the update expression for the posterior state variable can be as follows:
[0121]
[0122] In the formula, x k Represents the posterior state at the current moment; K represents the prior state quantity at the current moment. k Indicates Kalman gain; z k H represents the state quantity at the current moment, that is, the distance traveled by the target pedestrian at the current moment; k This represents the measurement matrix.
[0123] In one embodiment, updating the posterior covariance matrix based on the Kalman gain in step S131 may include:
[0124] S1312: Optimize the prior covariance matrix based on the Kalman gain, and use the optimization result as the updated posterior covariance matrix.
[0125] In this embodiment, when the test result is passed, the pedestrian tracking system can optimize the prior covariance matrix according to the Kalman gain and use the optimization result as the updated posterior covariance matrix.
[0126] Specifically, when the test result is passed, the update expression for the posterior covariance matrix can be as follows:
[0127]
[0128] In the formula, P k K represents the posterior covariance matrix at the current time; I represents the identity matrix of the Kalman filter; K k H represents the Kalman gain; k Represents the measurement matrix; This represents the prior covariance matrix at the current moment.
[0129] The pedestrian state tracking device provided in the embodiments of this application is described below. The pedestrian state tracking device described below can be referred to in correspondence with the pedestrian state tracking method described above.
[0130] In one embodiment, such as Figure 3 As shown, Figure 3 This application provides a schematic diagram of a pedestrian state tracking device according to an embodiment of the present application. The present application also provides a pedestrian state tracking device, including a chi-square test module 220, a data update module 230, and an iterative solution module 240, specifically comprising the following:
[0131] The data initialization module 210 is used to collect the movement path of the target pedestrian at the current time when the target pedestrian is first detected, and to determine the initial data for Kalman filtering; the initial data includes the posterior state variables and the posterior covariance matrix.
[0132] The chi-square test module 220 is used to determine the prior state quantity corresponding to the posterior state quantity, and to determine the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix, and to perform a chi-square test on the movement path based on the movement path, the prior state quantity and the prior covariance matrix to obtain the test result.
[0133] The data update module 230 is used to update the posterior state variables and the posterior covariance matrix according to the test results, and output the updated posterior state variables and the posterior covariance matrix.
[0134] The iterative solution module 240 is used to continue collecting the movement path of the target pedestrian at the next moment, and return to execute the determination of the prior state quantity corresponding to the posterior state quantity and the following steps, until the preset termination condition is met.
[0135] In the above embodiments, when using Kalman filtering to track the motion state of a pedestrian, the pedestrian's movement path at the current moment can be collected when the target pedestrian is first detected, and the initial data for Kalman filtering can be determined. This initial data includes the posterior state quantity and the posterior covariance matrix, thus obtaining the basic data required for pedestrian state tracking. Next, the prior state quantity corresponding to the posterior state quantity can be determined, and the prior covariance matrix corresponding to the posterior covariance matrix can be determined using a preset process state matrix. Based on the movement path, prior state quantity, and prior covariance matrix... The moving path is subjected to a chi-square test to obtain the test result. Here, by using a preset process state matrix, only the moving path can be used as an input parameter, thereby reducing the convergence impact caused by a large number of parameters and the noise interference caused by acceleration. Finally, the posterior state quantity and posterior covariance matrix are updated according to the test result, and the updated posterior state quantity and posterior covariance matrix are output. Then, the moving path of the target pedestrian at the next time step can be collected, and the process returns to determine the prior state quantity corresponding to the posterior state quantity and the following steps until the preset termination condition is met. In pedestrian state tracking, this application can add a preset process state matrix to the Kalman filter and use the pedestrian's moving path as an input parameter, thereby improving the convergence speed and accuracy of the Kalman filter by reducing the number of parameters.
[0136] In one embodiment, the chi-square test module 220 may include:
[0137] The state quantity calculation submodule is used to determine the state transition matrix of the Kalman filter and use the state transition matrix to perform state transition on the posterior state quantity to obtain the prior state quantity corresponding to the posterior state quantity.
[0138] In one embodiment, the chi-square test module 220 may further include:
[0139] The matrix determination submodule is used to determine the state noise matrix of the Kalman filter; the state noise matrix is used to describe the noise interference during the state transition process of the Kalman filter.
[0140] The matrix calculation submodule is used to optimize the state noise matrix using the process state matrix, and to perform state transition on the posterior covariance matrix based on the optimized state noise matrix, so as to obtain the prior covariance matrix corresponding to the posterior covariance matrix.
[0141] In one embodiment, the chi-square test module 220 may further include:
[0142] The noise matrix determination submodule is used to determine the measurement noise matrix of the Kalman filter; the measurement noise matrix is used to describe the noise interference of the movement path during the acquisition process.
[0143] The chi-square value calculation submodule is used to determine the residual value between the movement path and the prior state variable, and calculate the chi-square value based on the residual value, the measurement noise matrix and the prior covariance matrix.
[0144] The first result determination submodule is used to determine the verification result of the movement path as passed if the chi-square value is not less than a preset threshold.
[0145] The second result determination submodule is used to determine the test result of the movement path as failing if the chi-square value is less than a preset threshold.
[0146] In one embodiment, the data update module 230 may include:
[0147] The first update submodule is used to determine the Kalman gain based on the prior covariance matrix when the test result is passed, and to update the posterior state variables and the posterior covariance matrix based on the Kalman gain.
[0148] The second update submodule is used to update the posterior state variables based on the movement path when the test result is failed, and to update the posterior covariance matrix to the posterior covariance matrix in the initial data.
[0149] In one embodiment, the first update submodule may include:
[0150] The state update unit is used to determine the residual value between the movement path and the prior state value, optimize the prior state value based on the Kalman gain and the residual value, and use the optimization result as the updated posterior state value.
[0151] In one embodiment, the first update submodule may further include:
[0152] The matrix update unit is used to optimize the prior covariance matrix based on the Kalman gain and use the optimization result as the updated posterior covariance matrix.
[0153] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the pedestrian state tracking method as described in any of the above embodiments.
[0154] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the pedestrian state tracking method as described in any of the above embodiments.
[0155] Indicatively, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 4 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the pedestrian state tracking method of any of the above embodiments.
[0156] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0157] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0158] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0159] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0160] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A pedestrian state tracking method based on Kalman filtering, characterized in that, The method includes: When a target pedestrian is first detected, the pedestrian's current movement path is collected, and the initial data for Kalman filtering is determined; the initial data includes the posterior state variables and the posterior covariance matrix. Determine the prior state quantity corresponding to the posterior state quantity, and use a preset process state matrix to determine the prior covariance matrix corresponding to the posterior covariance matrix, and perform a chi-square test on the movement path based on the movement path, the prior state quantity and the prior covariance matrix to obtain the test result; The posterior state variables and the posterior covariance matrix are updated based on the test results, and the updated posterior state variables and posterior covariance matrix are output. Continue to collect the movement path of the target pedestrian at the next moment, and return to execute the determination of the prior state corresponding to the posterior state and the following steps until the preset termination condition is met; The step of updating the posterior state variable and the posterior covariance matrix based on the test result includes: When the test result is passed, the Kalman gain is determined according to the prior covariance matrix, and the posterior state variable and the posterior covariance matrix are updated based on the Kalman gain. When the test result is negative, the posterior state quantity is updated based on the movement path, and the posterior covariance matrix is updated to the posterior covariance matrix in the initial data.
2. The pedestrian state tracking method according to claim 1, characterized in that, Determining the prior state quantity corresponding to the posterior state quantity includes: The state transition matrix of the Kalman filter is determined, and the state transition matrix is used to perform state transition on the posterior state quantity to obtain the prior state quantity corresponding to the posterior state quantity.
3. The pedestrian state tracking method according to claim 1, characterized in that, The step of determining the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix includes: Determine the state noise matrix of the Kalman filter; the state noise matrix is used to describe the noise interference during the state transition process of the Kalman filter. The process state matrix is used to optimize the state noise matrix, and the optimized state noise matrix is used to perform state transition on the posterior covariance matrix to obtain the prior covariance matrix corresponding to the posterior covariance matrix.
4. The pedestrian state tracking method according to claim 1, characterized in that, The test result is either pass or fail; The chi-square test is performed on the movement path based on the movement path, the prior state variables, and the prior covariance matrix to obtain the test results, including: Determine the measurement noise matrix of the Kalman filter; the measurement noise matrix is used to describe the noise interference of the movement path during the acquisition process; Determine the residual value between the movement path and the prior state quantity, and calculate the chi-square value based on the residual value, the measurement noise matrix, and the prior covariance matrix; If the chi-square value is not less than a preset threshold, then the test result of the movement path is determined to be passed; If the chi-square value is less than the preset threshold, the test result of the movement path is determined to be unsuccessful.
5. The pedestrian state tracking method according to claim 1, characterized in that, The update of the posterior state quantity based on the Kalman gain includes: The residual value between the movement path and the prior state quantity is determined, and the prior state quantity is optimized based on the Kalman gain and the residual value. The optimization result is then used as the updated posterior state quantity.
6. The pedestrian state tracking method according to claim 1, characterized in that, The update of the posterior covariance matrix based on the Kalman gain includes: The prior covariance matrix is optimized based on the Kalman gain, and the optimization result is used as the updated posterior covariance matrix.
7. A pedestrian status tracking device, characterized in that, include: The data initialization module is used to collect the movement path of the target pedestrian at the current moment when the target pedestrian is first detected, and to determine the initial data for Kalman filtering. The initial data includes posterior state variables and posterior covariance matrix; The chi-square test module is used to determine the prior state quantity corresponding to the posterior state quantity, and to determine the prior covariance matrix corresponding to the posterior covariance matrix using a preset process state matrix, and to perform a chi-square test on the movement path based on the movement path, the prior state quantity and the prior covariance matrix to obtain the test result. The data update module is used to update the posterior state quantity and the posterior covariance matrix according to the test result, and output the updated posterior state quantity and posterior covariance matrix. The iterative solution module is used to continue collecting the movement path of the target pedestrian at the next moment, and return to execute the determination of the prior state corresponding to the posterior state and the following steps until the preset termination condition is met; The data update module includes: When the test result is passed, the Kalman gain is determined according to the prior covariance matrix, and the posterior state variable and the posterior covariance matrix are updated based on the Kalman gain. When the test result is negative, the posterior state quantity is updated based on the movement path, and the posterior covariance matrix is updated to the posterior covariance matrix in the initial data.
8. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the pedestrian state tracking method as described in any one of claims 1 to 6.
9. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions that, when executed by the one or more processors, perform the steps of the pedestrian state tracking method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle trajectory tracking method based on Kalman filtering and x2 detection smoothing processing
CN110675435A
Target tracking processor and method for correcting error covariance matrix used therefor
JP2011002266A