Unscented Kalman Filtering for Single Camera Based Motion and Shape Estimation

Accurate estimation of the motion and shape of a moving object is a challenging task due to great variety of noises present from sources such as electronic components and the influence of the external environment, etc. To alleviate the noise, the filtering/estimation approach can be used to reduce it in streaming video to obtain better estimation accuracy in feature points on the moving objects. To deal with the filtering problem in the appropriate nonlinear system, the extended Kalman filter (EKF), which neglects higher-order derivatives in the linearization process, has been very popular. The unscented Kalman filter (UKF), which uses a deterministic sampling approach to capture the mean and covariance estimates with a minimal set of sample points, is able to achieve at least the second order accuracy without Jacobians’ computation involved. In this paper, the UKF is applied to the rigid body motion and shape dynamics to estimate feature points on moving objects. The performance evaluation is carried out through the numerical study. The results show that UKF demonstrates substantial improvement in accuracy estimation for implementing the estimation of motion and planar surface parameters of a single camera.


Introduction
The problem of estimating positions and velocities of moving features in space leads to the problem of estimating motion and shape parameters of moving features from their corresponding image data observed over time. This is important in various engineering applications, such as robotics and machine vision [1][2][3][4][5][6]. A dynamical systems approach to machine vision is introduced in [1], in which the problem of motion and shape parameter estimation is described as an inverse problem associated with a pair of coupled Riccati partial differential equations. Identification of the motion and shape parameters using the estimation technique was discussed in [5,6]. A CCD camera with a laser range finder mounted on a mobile robot for better motion and shape parameters identification can be seen in [5]. A sliding mode approach was proposed to estimate the motion of a moving body with the aid of a CCD camera [6]. For performance improvement, various estimation techniques have been adopted to reduce the noise. The algebraic methods yielded feasible results, but they were computationally unrealistic. The Kalman filter method is used in the estimation of the motion parameters to reduce the effect of the measurement errors which are inevitable in the real world. The Kalman filter (KF) method [7] for estimation of the 3D camera motion in imagine sequences for the applications to the video coding system is proposed by Kim et al. [8]. Kano et al. [9] performed a numerical study and compared an extended Kalman filter (EKF) based recursive algorithm with a non-recursive algebraic method for estimating motion and planar surface parameters.
The KF is theoretically attractive because it has been shown to be the one that minimizes the variance of the estimation mean square error (MSE). The nonlinear filter is used for nonlinear dynamics and/or nonlinear measurement relationships. The problem of estimating the state variables of the nonlinear systems may be solved using the nonlinear version of the Kalman filter. The most popular form is the EKF. The fact that EKF highly depends on a predefined dynamics model forms a major drawback. To achieve good filtering results, the designers are required to have the complete a priori knowledge on both the dynamic process and measurement models, in addition to the assumption that both the process and measurement are corrupted by zero-mean Gaussian white sequences. If the input data does not reflect the real model, the estimates may not be reliable.
Similar to the EKF, the unscented Kalman filter (UKF) [10][11][12][13][14][15][16][17] focuses on approximating the prediction probability characteristics and use the standard minimum mean square error estimator. The UKF has been developed in the context of state estimation of dynamic systems as a nonlinear distribution (or densities in the continuous case) approximation method. The UKF is superior to EKF not only in theory but also in many practical situations. The algorithm performs the prediction of the statistics with a set of carefully chosen sample points for capturing mean and covariance of the system. These sample points are sometimes referred to as the sigma points employed to propagate the probability of state distribution. The basic premise behind the UKF is it is easier to approximate a Gaussian distribution than it is to approximate an arbitrary nonlinear function. Instead of linearizing using Jacobian matrices as in the EKF and achieving first-order accuracy, the UKF can capture the states up to at least second order by using a deterministic sampling approach to capture the mean and covariance estimates with a minimal set of sample points. The deterministic sampling based UKF with applications on estimation of rigid body motion and shape dynamics are presented to estimate the feature points on the moving object. Results obtained shows that UKF is able to provide more accurate and reliable estimation accuracy of the object. Investigation of the UKF approach to the motion and shape estimation problem has not been seen in the literature. This paper is organized as follows. In Section 2, preliminary background on rigid body motion is reviewed. The shape dynamics and optical flow dynamics are discussed in Sections 3 and 4, respectively. The unscented Kalman filter is introduced in Section 5. Results and Discussion are given in Section 6. Conclusions are given in Section 7.

Rigid Body Motion
The mathematical description of a 3D point undergoing a rigid transformation about the camera axes is given as follows. Let x ω , y ω and z ω represent the angle of rotation about the X, Y and Z axes, respectively. Figure 1 illustrates the world coordinate system. An arbitrary rotation R can be represented by successive rotations around the X, Y and Z axes, respectively, as: Assuming infinitesimal rotations, the zeroth order terms of the Taylor series expansion of the trigonometric functions sin and cos provide the following approximations: Using the approximations in Equation (2), R can be approximated in the skew-symmetric matrix form in terms of angular velocity:  which may be written in matrix form: where I represents a 3 × 3 identity matrix. By defining , Equation (4) can be represented as: . If: it is easily seen that Ω Im is a plane in 3 ℜ given as: where:

Shape Dynamics
The motion field describing the motion of individual points on the surface might undergo a change in shape. The dynamical system which describes the changing shape of the surface is called the shape dynamics. Let (X, Y, Z) be the world coordinate frame wherein we have a surface defined by: Assume that S is smooth enough so that its derivatives with respect to each of the variables are defined everywhere. The motion field is assumed to be described by: How the surface as in Equation (10) moves as points on the surface move following the motion field as in Equation (11) can be described by the quasi-linear partial differential equation called the "shape dynamics": Consider the initial condition: The pair of Equations (12) and (13) constitutes an example of a Riccati partial differential equation. The surface defined by Equation (10) is assumed to be a plane described by: where p, q, r are shape parameters that are time varying as a result of the motion field. The vectors are written in terms of homogeneous coordinates ( ) and: Equation (14) can then be rewritten as: Using Equation (15), Equation (5) can be written as: The shape dynamics can be obtained by differentiating Equation (17) with respect to time t: are the shape parameters to be discussed in Section 4.

Optical Flow Dynamics
As shown in Figure 2, the 3D vector is assumed to be observed via perspective projection onto a plane parallel to the (x, y) axes and located at Z = 1 by defining the relationship between an image point ) , ( y x u = and a scene point (X, Y, Z) given by: and: From Equations (14) and (20), we have: and hence the optical flow equations are given by: (24) and (25) denote the optical flow equations. Even when the motion field is time invariant, the parameters of the optical flow equations could be time-varying due to the fact that the shape parameters are changing in time as a result of motion field described by Equation (11). As In particular, if , the shape parameters are periodic functions satisfying the Riccati Equation [2,9]: which is parameterized by a total of six motion parameters and three initial conditions on shape parameters. Therefore, a total of nine parameters need to be adopted for describing the shape dynamics. The Riccati equation propagates in time the relationship between coordinates X, Y, and Z expressed via the surface described by Equation (10).
Once the modeling of shape dynamics and optical flow dynamics is accomplished, the estimation algorithm can be employed for implementing the estimation of motion and planar surface parameters. In addition to the algebraic methods, the recursive estimation algorithms are applicable. The recursive algorithm presented by Kano et al. [9] is an EKF-based algorithm. The motivation of the paper is to carry out the UKF-based approach, which has not been seen in the literature for the motion and shape estimation problem. A brief introduction of the UKF is provided in Section 5.

The Unscented Kalman Filter
The UKF is a nonlinear filter which deals with the case governed by the nonlinear stochastic difference equations: where the state vector where k Q is the process noise covariance matrix, k R is the measurement noise covariance matrix.

The Unscented Transformation
The first step in the UKF is to sample the prior state distribution, i.e., generate the sigma points through the unscented transformation (UT). Figure 3 illustrates the true means and covariances as compared to those obtained by the mapping of the UKF versus that of the EKF. The dot-line ellipse represents the true covariance. The UKF is implemented through the transformation of the nonlinear function ) (⋅ f , shown as the solid-line ellipse on the top portion of the figure; the EKF is accomplished through the Jacobian Several UT's are available. One of the popular approaches is the scaled unscented transformation [15][16][17]. Consider an n dimensional random variable x , having the mean x and covariance P , and suppose that it propagates through an arbitrary nonlinear function f . The unscented transform creates 1 2 + n sigma vectors X (a capital letter) and weighted points, given by: The sigma vectors are propagated through the nonlinear function to yield a set of transformed sigma points:

The Unscented Kalman Filter
A high level of operation of the unscented Kalman filter is shown in Figure 4. To look at the detailed algorithm of the UKF, firstly, the set of sigma points are created by Equation (30). After the sigma points are generated, the time update (prediction step) of the UKF involves the following steps: The measurement update (correction) step of the UKF involves the following steps: The samples are propagated through true nonlinear equations, which can capture the states up to at least second order.

Results and Discussion
Simulation experiments have been carried out to evaluate the performance of the UKF approach in comparison with the conventional EKF approach for estimating motion and shape parameters. Computer code was developed using MATLAB. It is assumed that, at each time instant k , a set of three feature points The associated state equation in discretized form is given by: which is constituted from the set of Equations (24,25) and (27), as follows: along with the random walk models for the angular velocities The process noise covariance matrix is given by 10 14 10 I Q × = − and the parameters utilized in the UKF are given as follows: . The sigma points capture the same mean and covariance irrespective of the choice of matrix square root which is used. The numerical efficient and stable method such as the Cholesky factorization has been used in obtaining the sigma points.

Case1
: : Figures 5-12 show the results for the numerical experiments. Figure 5 shows the sample trajectories for the three feature points on image plane for the case . It can be seen that the motions are circular and periodic around the axis of rotation. Figures 6-8 are the results for the case when Estimation results for parameters 1 c , 2 c and 3 c for the three feature points are given in Figure 6. Three curves, shown in red, green, and black colors, denote the true, EKF-based, and UKF-based estimated values, respectively. For better clarity, the estimation errors for the three feature points are shown in Figure 7, which illustrates the advantage of UKF. Figure 8 gives the estimation accuracy for the shape parameters k p , k q and k r . The EKF is not working very well whereas the UKF demonstrates its good capability for capturing the true trajectories. Comparison of RMSE (in the unit of mm) of the three feature points on the image plane using the EKF and UKF is summarized in Table 1. Comparison of RMSE (in the unit of mm) for the feature points of the scene point using the EKF and UKF is summarized in Table 2.     . Figure 10 shows the estimation results for parameters 1 c , 2 c and 3 c for the three feature points; Figure 11 provides the estimation errors for the three feature points; and Figure 12 gives the estimation accuracy for the shape parameters k p , k q and k r . Comparison of RMSE (in the unit of mm) of the three feature points on the image plane using the EKF and UKF is summarized in Table 3. Comparison of RMSE (in the unit of mm) for the feature points of the scene point using the EKF and UKF is summarized in Table 4.  In general, utilization of an adequate nonlinear model with suitable filter makes it possible to achieve improved estimation performance. For the problem of single camera based motion and shape estimation, the UKF-based recursive estimation algorithm is a good alternative adopted for implementing the estimation of motion and planar surface parameters. The states and the dynamic process are related nonlinearly. The nonlinearity/uncertainty in the state estimate is suitably taken care of in the UKF, which has therefore demonstrated substantial state estimation accuracy improvement as compared to the EKF based approach. When compared with EKF, the UKF method exhibits superior performance since the series approximations in the EKF algorithm can lead to poor representations of the nonlinear functions and probability distributions of interest.

Conclusions
Various engineering applications, such as robotics and machine vision, require the estimation of positions and velocities of moving features in space, leading to the problem of estimating motion and shape parameters of moving features from their corresponding image data observed over time. To alleviate the noise and obtain better estimation accuracy in feature points on the moving objects, the filtering/estimation approach can be used. A variety of estimation techniques have been adopted to reduce the noise. One of the most important ones is the extended Kalman filter (EKF).
As compared to the EKF's linear approximation, the unscented transformation is accurate to the second order for any nonlinear function. In light of unscented Kalman filter's superiority over the extended Kalman filter, this paper has presented a deterministic sampling of UKF approach for estimating motion and shape parameters of feature points on the moving object. Such a motion is described by the nonlinear model with skew symmetric matrix Ω , which is widely used in the theory of machine vision. The reason is due to the fact that the UKF is able to deal with the nonlinear formulation, which will ensure better accurate parameter estimation. For the nonlinear estimation problem, alternatives for the classical model-based extended Kalman filter (EKF) can be employed. The UKF is a nonlinear distribution approximation method, which uses a finite number of sigma points to propagate the probability of state distribution through the nonlinear dynamics of system. The UKF exhibits superior performance when compared with conventional EKF since the series approximations in the EKF algorithm can lead to poor representations of the nonlinear functions and probability distributions of interest.
The analyses were confirmed by simulation studies. For both cases, Ω ∈ Im b and Ω ∉ Im b , motion and shape parameters were recovered successfully with remarkable accuracy improvement. The results obtained shows that the proposed UKF method have been compared to the EKF and have demonstrated substantial improvement in obtaining the motion and shape of moving objects.