A three-dimensional target motion tracking method based on binocular vision
Through binocular vision and unscented Kalman filtering algorithm, the 3D-CTRV model is established, which solves the problem of false detection and missed detection in three-dimensional moving target tracking, achieves high-precision tracking of nonlinear moving targets, and overcomes the problems of illumination and image Quality impact, improving the accuracy of motion trajectories.
Patent Information
- Application Number
- CN202210490588.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-05-07
AI Technical Summary
Existing technology is difficult to effectively solve the problem of false detection and missed detection caused by illumination, image quality and other problems in the establishment of motion models of three-dimensional moving targets and non-linear motion tracking. Especially in the tracking of non-linear moving targets, the Kalman filter algorithm Truncation errors are introduced during nonlinearization, which affects the estimation accuracy.
A three-dimensional target motion tracking method based on binocular vision is used to detect targets through binocular cameras, establish a 3D-CTRV model, and use unscented Kalman filtering for motion prediction and observation updates to overcome false detections and missed detections and achieve more accurate motion. Trajectory tracking.
Describe the motion state of nonlinear moving targets in three-dimensional space, reduce errors through unscented Kalman filtering, form a smoother and closer to real motion trajectory, and improve the accuracy of motion tracking.
Smart Images

Figure CN114882070B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of mobile robots, and in particular relates to a three-dimensional target motion tracking method based on binocular vision. Background Art
[0002] Motion tracking algorithms can be divided into kernel based tracking and point based tracking. Common kernel based tracking methods include mean shift tracking and support vector machine. Common point tracking methods include particle filter, multi hypothesis tracking, and Kalman filter series algorithms. Kalman filter has two assumptions: ① the system is linear; ② the noise affecting the measurement is white noise. When these two conditions cannot be met, the Kalman filter estimation algorithm is no longer applicable. In actual situations, since the target motion estimation is affected by other factors, the motion has nonlinear characteristics. The methods for motion estimation of targets with nonlinear motion include: Extended Kalman Filter (EKF). EKF first linearizes the nonlinear model through Taylor expansion, and then tracks the motion of non-cooperative targets. When EKF linearizes nonlinear systems, it uses Taylor expansion and then discards high-order terms, which will introduce truncation errors and affect the estimation accuracy. The Unscented Kalman Filter uses unscented transformation instead of Taylor expansion to achieve linearization of nonlinear systems, avoiding truncation errors and improving the accuracy of motion estimation.
[0003] However, there are two technical challenges in the 3D motion tracking technology based on visual images. The first challenge is to establish a motion model for the 3D moving target. The second challenge is that the motion tracking algorithm must be able to overcome the phenomenon of false detection or even missed detection caused by problems such as lighting and image quality, especially for the motion tracking of nonlinear moving targets. Summary of the invention
[0004] The purpose of the present invention is to provide a three-dimensional target motion tracking method based on binocular vision in order to solve the above-mentioned problems.
[0005] The technical solution adopted by the present invention is as follows: a three-dimensional target motion tracking method based on binocular vision, the three-dimensional target motion tracking method based on binocular vision comprises the following steps:
[0006] Step S1: The binocular camera detects the target; the parallax between the left and right images is used to perform three-dimensional reconstruction to obtain the three-dimensional information of the target in the camera coordinate system;
[0007] Step S2: Establish a 3D-CTRV model; input the position information of the detected three-dimensional target, obtain its three-dimensional position in the camera coordinate system, calculate the azimuth and pitch angle relative to the camera, and obtain the motion state of the three-dimensional target;
[0008] Step S3: Unscented Kalman filter motion prediction: based on the three-dimensional target state detected in the current frame and the three-dimensional target state detected in the previous frame, the motion state of the target in the next frame is estimated;
[0009] Step S4: Unscented Kalman filter observation update; after obtaining the observation value of the next frame, the target motion state of the next frame is updated according to the predicted value and the predicted observation value, and the filtered trajectory after the unscented Kalman filter processing is obtained to realize three-dimensional target motion tracking based on binocular vision.
[0010] In a preferred embodiment, in step S2, establishing a 3D-CTRV model includes the following steps: predicting the movement of the dynamic target during the movement of the binocular camera, and then obtaining the predicted trajectory of the moving target, firstly, it is necessary to establish an observation coordinate system; the dynamic target motion tracking is performed in the camera coordinate system, with the optical center of the left camera as the origin of the camera coordinate system, the X-axis of the camera coordinate system is parallel to the horizontal plane and perpendicular to the forward direction of the mobile robot, the Y-axis of the camera coordinate system is parallel to the horizontal plane, with the forward direction of the mobile robot as positive, and the Z-axis of the camera coordinate system is defined by the right-hand rule, and the vertical direction perpendicular to the horizontal plane is positive. Since the three-dimensional coordinates of the dynamic target A detected in each frame are in the camera coordinate system at the current moment, the camera coordinate system of the binocular camera is constantly changing during the movement, and the three-dimensional coordinates of the dynamic target A will also change accordingly; the present invention uses the first frame camera coordinate system as the observation coordinate system, and firstly, it is necessary to convert the three-dimensional coordinates of the target A detected in each frame to the observation coordinate system: the three-dimensional targets A detected in the first frame, the second frame and the nth frame are all converted to the first frame camera coordinate system, and a motion trajectory can be obtained based on the detection results, that is, Curved track.
[0011] In a preferred embodiment, in step S2, a constant speed model is selected to describe the motion state of the dynamic target;
[0012] The three-dimensional constant turning speed model (3D-CTRV) has two assumptions: Assumption 1: the moving target has a fixed turning rate; Assumption 2: the dynamic target has a constant speed;
[0013] Assume that the three-dimensional coordinates of the dynamic target A in the kth frame are (x k yk z k ) T , the azimuth angle of the dynamic target A in the kth frame is θ k , the pitch angle is The motion state equation of the dynamic target A in the kth frame can be expressed as:
[0014]
[0015] The azimuth and elevation angles of the dynamic target A can be obtained by formula (2) and formula (3) respectively:
[0016]
[0017]
[0018] In addition, the pitch velocity of the dynamic target is defined as ω, and the azimuth velocity is defined as φ. According to the assumption 1 of the three-dimensional constant rotation speed model: the moving target has a fixed turning rate, ω and φ are constant in the time interval from the k-1th frame to the kth frame, and can be obtained by formula (4) and formula (5) respectively:
[0019]
[0020]
[0021] According to the second assumption of the constant speed model: the dynamic target has a constant speed; the speed of the dynamic target A from the k-1 frame to the k frame is defined as v, and v is constant; it can be obtained by formula (6):
[0022]
[0023] According to formula (2) to formula (6), we can get the velocity Vk of the dynamic target A at the kth frame:
[0024]
[0025] In a preferred embodiment, in step S3, an unscented Kalman filter is used to track the motion of the moving target; the unscented Kalman filter algorithm can be divided into three stages: a motion prediction stage, an observation stage, and an update stage.
[0026] In a preferred embodiment, the motion prediction stage is the dynamic prediction stage of the unscented Kalman filter algorithm, and the state prediction equation and observation equation of the dynamic target A must be defined first:
[0027]
[0028] Wherein, F(X) represents the state transfer equation, the state equation is defined by formula (1), and the observation equation H(X) is defined by formula (10). According to the assumption of constant speed model, the state transfer equation between two consecutive frames can be expressed by formula (9);
[0029] F(X k )=X k +V k *Δt (9)
[0030]
[0031] In formula (8), Q k is the predicted noise of the kth frame, R k+1 is the observation noise of the k+1th frame, assuming Q k and R k+1 is a Gaussian white noise with a mean of 0 and variances of Q and R. Since the state equation studied in this paper contains the three-dimensional position, azimuth and pitch angle of the dynamic target, it is a 5*1 matrix, so in the experiment the variance matrix Q is defined as a 5*5 diagonal matrix; the observation is the three-dimensional position of the dynamic target, which is a 3*1 matrix, so its variance matrix is defined as a 3*3 diagonal matrix;
[0032] Next, we need to use the unscented transform to generate the sigma point to replace the state equation X of the kth frame k , the state equation X k There are 5 variables, and 11 sigma points are to be generated. The sigma point set generated in the kth frame is defined as
[0033]
[0034] The 11 sigma points are defined as:
[0035]
[0036] in, and P k They represent the mean and variance of the state equation of the dynamic target A in the kth frame respectively. The mean can be defined as Variance P k is a 5*5 order diagonal matrix, λ represents the mean of the random variable The proportional factor of the distance between the sigma sampling point and the sigma sampling point is a variable that can be customized according to actual conditions;
[0037] The next step is to assign weights to the 11 sigma points defined in formula (13):
[0038]
[0039] Where ω can control the sigma point and mean The distance between them, n represents the dimension of the state equation. The state equation of this paper has five variables, and the value of n is 5. Next, each sigma point is predicted, and the 11 sigma points are respectively substituted into formula (14) to obtain the predicted sigma point x of the k+1th frame: k+1|k,i :
[0040] x k+1|k,i =x k,i +V k *Δt (14)
[0041] According to the predicted sigma point x k+1|k,i The weights assigned by and formula (15) can be used to calculate the mean of motion state prediction. and variance P k+1|k :
[0042]
[0043]
[0044] In a preferred embodiment, the observation phase can obtain the mean value of the state prediction equation according to the three-dimensional coordinates, azimuth and pitch angle information of the dynamic target detected on the k-1 frame image and the k frame image. and variance P k+1|k Next, we need to predict the sigma point x k+1|k,i Substitute into the observation equation H(X) in formula (4-11) to predict the observed value z of the target 3D coordinates at the k+1th frame k+1|k,i :
[0045] z k+1|k,i =H(x k+1|k,i ) (17)
[0046] Combined with the weights given by formula (13), the mean of the predicted observation values of the dynamic target A in the kth frame in the k+1th frame can be solved: and variance S k+1|k :
[0047]
[0048]
[0049] According to the predicted sigma point x k+1|k,i , the mean value of the predicted sigma point at the k+1th frame obtained by formula (15) The predicted observed sigma point zk+1|k,i And the mean of the observed values of the target 3D coordinates at the predicted k+1th frame obtained by formula (18) The correlation function T between the prediction equation and the observation equation can be solved k+1|k ; Then use the variance S of the predicted observations k+1|k And the correlation function T k+1|k Then we can solve the Kalman gain KG k+1|k ;
[0050]
[0051]
[0052] In a preferred embodiment, the updating stage needs to be based on the actual observation value Z of the three-dimensional coordinates of the dynamic target in the k+1th frame. k+1 , predict the mean of the target state at the k+1th frame and variance P k+1|k , predict the mean of the observations of the k+1th frame and variance S k+1|k And the Kalman gain KG k+1|k To update the state equation and variance P k+1|k+1 :
[0053]
[0054]
[0055] Finally, according to the updated state of the k+1th frame and the observation equation H(X), we can use formula (24) to get the actual state estimate X of the k+1th frame: k+1 :
[0056]
[0057] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0058] In the present invention, the motion model on the two-dimensional image is extended to the three-dimensional space, the motion state of the target performing nonlinear motion is described, and motion tracking is performed on this basis. The detected trajectory is filtered using the unscented Kalman filter algorithm, which can reduce the error caused by false detection or missed detection, and compared with the detection trajectory formed by each frame of detection results, the trajectory estimated by the unscented Kalman filter will be smoother and closer to the real motion trajectory. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A camera coordinate system direction definition diagram of the present invention;
[0060] Figure 2 This is a schematic diagram of the dynamic target coordinate conversion in the present invention;
[0061] Figure 3 This is a flow chart of the unscented Kalman filter (UKF) algorithm in the present invention. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0063] Reference Figure 1-3 ,
[0064] A three-dimensional target motion tracking method based on binocular vision, the three-dimensional target motion tracking method based on binocular vision comprising the following steps:
[0065] Step S1: The binocular camera detects the target; the parallax between the left and right images is used to perform three-dimensional reconstruction to obtain the three-dimensional information of the target in the camera coordinate system;
[0066] Step S2: Establish a 3D-CTRV model; input the position information of the detected three-dimensional target, obtain its three-dimensional position in the camera coordinate system, calculate the azimuth and pitch angle relative to the camera, and obtain the motion state of the three-dimensional target;
[0067] Step S3: Unscented Kalman filter motion prediction: based on the three-dimensional target state detected in the current frame and the three-dimensional target state detected in the previous frame, the motion state of the target in the next frame is estimated;
[0068] Step S4: Unscented Kalman filter observation update; after obtaining the observation value of the next frame, the target motion state of the next frame is updated according to the predicted value and the predicted observation value, and the filtered trajectory after the unscented Kalman filter processing is obtained to realize three-dimensional target motion tracking based on binocular vision.
[0069] In the step S2, establishing the 3D-CTRV model includes the following steps: predicting the movement of the dynamic target during the movement of the binocular camera, and then obtaining the predicted trajectory of the moving target, firstly, it is necessary to establish an observation coordinate system; the dynamic target motion tracking is performed in the camera coordinate system, with the optical center of the left camera as the origin of the camera coordinate system, the X-axis of the camera coordinate system is parallel to the horizontal plane and perpendicular to the forward direction of the mobile robot, the Y-axis of the camera coordinate system is parallel to the horizontal plane, with the forward direction of the mobile robot as positive, and the Z-axis of the camera coordinate system is defined by the right-hand rule, perpendicular to the horizontal plane upward as positive, because the three-dimensional coordinates of the dynamic target A detected in each frame are in the camera coordinate system at the current moment, the camera coordinate system of the binocular camera is constantly changing during the movement, and the three-dimensional coordinates of the dynamic target A will also change accordingly; the present invention uses the first frame camera coordinate system as the observation coordinate system, firstly, it is necessary to convert the three-dimensional coordinates of the target A detected in each frame to the observation coordinate system: the three-dimensional targets A detected in the first frame, the second frame and the nth frame are all converted to the first frame camera coordinate system, and a motion trajectory can be obtained based on the detection results, that is, Curved track.
[0070] In step S2, a constant speed model is selected to describe the motion state of the dynamic target;
[0071] The three-dimensional constant turning speed model (3D-CTRV) has two assumptions: Assumption 1: the moving target has a fixed turning rate; Assumption 2: the dynamic target has a constant speed;
[0072] Assume that the three-dimensional coordinates of the dynamic target A in the kth frame are (x k y k z k ) T , the azimuth angle of the dynamic target A in the kth frame is θ k , the pitch angle is The motion state equation of the dynamic target A in the kth frame can be expressed as:
[0073]
[0074] The azimuth and elevation angles of the dynamic target A can be obtained by formula (2) and formula (3) respectively:
[0075]
[0076]
[0077] In addition, the pitch velocity of the dynamic target is defined as ω, and the azimuth velocity is defined as φ. According to the assumption 1 of the three-dimensional constant rotation speed model: the moving target has a fixed turning rate, ω and φ are constant in the time interval from the k-1th frame to the kth frame, and can be obtained by formula (4) and formula (5) respectively:
[0078]
[0079]
[0080] According to the second assumption of the constant speed model: the dynamic target has a constant speed; the speed of the dynamic target A from the k-1 frame to the k frame is defined as v, and v is constant; it can be obtained by formula (6):
[0081]
[0082] According to formula (2) to formula (6), we can get the velocity V of the dynamic target A in the kth frame: k :
[0083]
[0084] In step S3, an unscented Kalman filter is used to track the motion of the moving target; the unscented Kalman filter algorithm can be divided into three stages: motion prediction stage, observation stage, and update stage.
[0085] In the motion prediction stage of the unscented Kalman filter algorithm, the state prediction equation and observation equation of the dynamic target A must be defined first:
[0086]
[0087] Wherein, F(X) represents the state transfer equation, the state equation is defined by formula (1), and the observation equation H(X) is defined by formula (10). According to the assumption of constant speed model, the state transfer equation between two consecutive frames can be expressed by formula (9);
[0088] F(X k )=X k +V k *Δt (9)
[0089]
[0090] In formula (8), Q k is the predicted noise of the kth frame, E k+1 is the observation noise of the k+1th frame, assuming Q k and R k+1is a Gaussian white noise with a mean of 0 and variances of Q and R. Since the state equation studied in this paper contains the three-dimensional position, azimuth and pitch angle of the dynamic target, it is a 5*1 matrix, so in the experiment the variance matrix Q is defined as a 5*5 diagonal matrix; the observation is the three-dimensional position of the dynamic target, which is a 3*1 matrix, so its variance matrix is defined as a 3*3 diagonal matrix;
[0091] Next, we need to use the unscented transform to generate the sigma point to replace the state equation X of the kth frame k , the state equation X k There are 5 variables, and 11 sigma points are to be generated. The sigma point set generated in the kth frame is defined as
[0092]
[0093] The 11 sigma points are defined as:
[0094]
[0095] in, and P k They represent the mean and variance of the state equation of the dynamic target A in the kth frame respectively. The mean can be defined as Variance P k is a 5*5 order diagonal matrix, λ represents the mean of the random variable The proportional factor of the distance between the sigma sampling point and the sigma sampling point is a variable that can be customized according to actual conditions;
[0096] The next step is to assign weights to the 11 sigma points defined in formula (13):
[0097]
[0098] Where ω can control the sigma point and mean The distance between them, n represents the dimension of the state equation. The state equation of this paper has five variables, and the value of n is 5. Next, each sigma point is predicted, and the 11 sigma points are respectively substituted into formula (14) to obtain the predicted sigma point x of the k+1th frame: k+1|k,i :
[0099] x k+1|k,i =x k,i +V k *Δt (14)
[0100] According to the predicted sigma point x k+1|k,iThe weights assigned by and formula (15) can be used to calculate the mean of motion state prediction. and variance P k+1|k :
[0101]
[0102]
[0103] In the observation phase, the mean value of the state prediction equation can be obtained based on the three-dimensional coordinates, azimuth and pitch angle information of the dynamic target detected on the k-1 frame image and the k frame image. and variance P k+1|k Next, we need to predict the sigma point x k+1|k,i Substitute into the observation equation H(X) in formula (4-11) to predict the observed value z of the target 3D coordinates at the k+1th frame k+1|k,i :
[0104] z k+1|k,i =H(x k+1|k,i ) (17)
[0105] Combined with the weights given by formula (13), the mean of the predicted observation values of the dynamic target A in the kth frame in the k+1th frame can be solved: and variance S k+1|k :
[0106]
[0107]
[0108] According to the predicted sigma point x k+1|k,i , the mean value of the predicted sigma point at the k+1th frame obtained by formula (15) The predicted observed sigma point z k+1|k,i And the mean of the observed values of the target 3D coordinates at the predicted k+1th frame obtained by formula (18) The correlation function T between the prediction equation and the observation equation can be solved k+1|k ; Then use the variance S of the predicted observations k+1|k And the correlation function T k+1|k Then we can solve the Kalman gain KG k+1|k ;
[0109]
[0110]
[0111] The update stage needs to be based on the actual observation value Z of the three-dimensional coordinates of the dynamic target in the k+1th frame. k+1, predict the mean of the target state at the k+1th frame and variance P k+1|k , predict the mean of the observations of the k+1th frame and variance S k+1|k And the Kalman gain KG k+1|k To update the state equation and variance P k+1|k+1 :
[0112]
[0113]
[0114] Finally, according to the updated state of the k+1th frame and the observation equation H(X), we can use formula (24) to get the actual state estimate X of the k+1th frame: k+1 :
[0115]
[0116] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0117] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-dimensional target motion tracking method based on binocular vision, characterized in that: The three-dimensional target motion tracking method based on binocular vision comprises the following steps: Step S1: The binocular camera detects the target; the parallax between the left and right images is used to perform three-dimensional reconstruction to obtain the three-dimensional information of the target in the camera coordinate system; Step S2: Establish a 3D-CTRV model; input the position information of the detected three-dimensional target, obtain its three-dimensional position in the camera coordinate system, calculate the azimuth and pitch angle relative to the camera, and obtain the motion state of the three-dimensional target; Step S3: Unscented Kalman filter motion prediction: based on the three-dimensional target state detected in the current frame and the three-dimensional target state detected in the previous frame, the motion state of the target in the next frame is estimated; Step S4: unscented Kalman filter observation update; after obtaining the observation value of the next frame, the target motion state of the next frame is updated according to the predicted value and the predicted observation value, and the filtered trajectory after the unscented Kalman filter processing is obtained to realize three-dimensional target motion tracking based on binocular vision. In the step S2, the establishment of the 3D-CTRV model includes the following steps: predicting the motion of the dynamic target during the movement of the binocular camera, and then obtaining the predicted trajectory of the moving target. First, an observation coordinate system needs to be established; dynamic target motion tracking is performed in the camera coordinate system, with the optical center of the left camera as the origin of the camera coordinate system, and the X-axis of the camera coordinate system is parallel to the horizontal plane and perpendicular to the forward direction of the mobile robot. The Y axis of the camera coordinate system is parallel to the horizontal plane, with the moving robot's forward direction as positive. The Z axis of the camera coordinate system is defined by the right-hand rule, perpendicular to the horizontal plane and upward as positive. Since the three-dimensional coordinates of the dynamic target A detected in each frame are in the camera coordinate system at the current moment, the camera coordinate system of the binocular camera is constantly changing during the movement, and the three-dimensional coordinates of the dynamic target A will also change accordingly; take the first frame camera coordinate system as the observation coordinate system, first need to convert the three-dimensional coordinates of the target A detected in each frame to the observation coordinate system: convert the three-dimensional target A detected in the 1st frame, the 2nd frame and the nth frame to the camera coordinate system of the first frame, and a motion trajectory can be obtained based on the detection results.
2. A three-dimensional target motion tracking method based on binocular vision as claimed in claim 1, characterized in that: In step S2, a constant speed model is selected to describe the motion state of the dynamic target; The three-dimensional constant rotation speed model (3D-CTRV) has two assumptions: Assumption 1: the moving target has a fixed turning rate; Assumption 2: the dynamic target has a constant speed; Assume that the three-dimensional coordinates of the dynamic target A in the kth frame are (x k y k z k ) T , the azimuth angle of the dynamic target A in the kth frame is θ k , the pitch angle is The motion state equation of the dynamic target A in the kth frame can be expressed as: The azimuth and elevation angles of the dynamic target A can be obtained by formula (2) and formula (3) respectively: In addition, the pitch velocity of the dynamic target is defined as ω, and the azimuth velocity is defined as φ. According to the assumption 1 of the three-dimensional constant rotation speed model: the moving target has a fixed turning rate, ω and φ are constant in the time interval from the k-1th frame to the kth frame, and can be obtained by formula (4) and formula (5) respectively: According to the second assumption of the constant speed model: the dynamic target has a constant speed; the speed of the dynamic target A from the k-1 frame to the k frame is defined as v, and v is constant; it can be obtained by formula (6): According to formula (2) to formula (6), we can get the velocity V of the dynamic target A in the kth frame: k :
3. A three-dimensional target motion tracking method based on binocular vision as claimed in claim 1, characterized in that: In step S3, an unscented Kalman filter is used to track the motion of the moving target; the unscented Kalman filter algorithm can be divided into three stages: motion prediction stage, observation stage, and update stage.
4. A three-dimensional target motion tracking method based on binocular vision as claimed in claim 3, characterized in that: In the motion prediction stage of the unscented Kalman filter algorithm, the state prediction equation and observation equation of the dynamic target A must be defined first: Wherein, F(X) represents the state transfer equation, the state equation is defined by formula (1), and the observation equation H(X) is defined by formula (10). According to the assumption of constant speed model, the state transfer equation between two consecutive frames can be expressed by formula (9); F(Xk)=X k +V k *Δt (9) In formula (8), Q k is the predicted noise of the kth frame, R k+1 is the observation noise of the k+1th frame, assuming Q k and R k+1 It is a Gaussian white noise with a mean of 0 and a variance of Q and R. Since the state equation contains the three-dimensional position, azimuth and pitch angle of the dynamic target, it is a 5*1 matrix, so in the experiment the variance matrix Q is defined as a 5*5 diagonal matrix; the observation is the three-dimensional position of the dynamic target, which is a 3*1 matrix, so its variance matrix is defined as a 3*3 diagonal matrix; Next, we need to use the unscented transform to generate the sigma point to replace the state equation X of the kth frame k , the state equation X k There are 5 variables, and 11 sigma points are to be generated. The sigma point set generated in the kth frame is defined as The 11 sigma points are defined as: in, and P k They represent the mean and variance of the state equation of the dynamic target A in the kth frame respectively. The mean can be defined as Variance P k is a 5*5 order diagonal matrix, λ represents the mean of the random variable The proportional factor of the distance between the sigma sampling point and the sigma sampling point is a variable that can be customized according to actual conditions; The next step is to assign weights to the 11 sigma points defined in formula (13): Where ω can control the sigma point and mean The distance between them, n represents the dimension of the state equation, the state equation has five variables, and the value of n is 5; Next, predict each sigma point, and substitute the 11 sigma points into formula (14) to obtain the predicted sigma point x of the k+1th frame: k+1|k,i : x k+1|k,i =x k,i +V k *Δt (14) According to the predicted sigma point x k+1|k,i The weights assigned by and formula (15) can be used to calculate the mean of motion state prediction. and variance P k+1|k :
5. A three-dimensional target motion tracking method based on binocular vision as claimed in claim 4, characterized in that: In the observation phase, the mean value of the state prediction equation can be obtained based on the three-dimensional coordinates, azimuth and pitch angle information of the dynamic target detected on the k-1 frame image and the k frame image. and variance P k+1|k Next, we need to predict the sigma point x k+1|k,i Substitute into the observation equation H(X) in formula (4-11) to predict the observed value z of the target 3D coordinates at the k+1th frame k+1|k,i : z k+1|k,i =H(x k+1|k,i) (17) Combined with the weights given by formula (13), the mean of the predicted observation values of the dynamic target A in the kth frame in the k+1th frame can be solved: and variance S k+1|k : According to the predicted sigma point x k+1|k,i , the mean value of the predicted sigma point at the k+1th frame obtained by formula (15) The predicted observed sigma point z k+1|k,i And the mean of the observed values of the target 3D coordinates at the predicted k+1th frame obtained by formula (18) The correlation function T between the prediction equation and the observation equation can be solved k+1|k ; Then use the variance S of the predicted observations k+1|k And the correlation function T k+1|k Then we can solve the Kalman gain KG k+1|k ; 6. A three-dimensional target motion tracking method based on binocular vision as claimed in claim 1, characterized in that: The update stage needs to be based on the actual observation value Z of the three-dimensional coordinates of the dynamic target in the k+1th frame. k+1 , predict the mean of the target state at the k+1th frame and variance P k+1|k , predict the mean of the observations of the k+1th frame and variance S k+1|k And the Kalman gain KG k+1|k To update the state equation and variance P k+1|k+1 : Finally, according to the updated state of the k+1th frame and the observation equation H(X), we can use formula (24) to get the actual state estimate X of the k+1th frame: k+1 :
