This action might not be possible to undo. Are you sure you want to continue?
TARGET TRACKING USING KALMAN FILTER
SUBMITTED BY DEVENDER BUDHWAR(4411) SAHIL SANDHU(4455) AMIT KUMAR KARNA (04403)
INTRODUCTION TO KALMAN FILTER PROBLEM DEFINITION APPROACH CODE RESULT CONCLUSION
The Kalman filter is an efficient recursive filter which estimates the state of a dynamic system from a series of incomplete and noisy measurements, developed by Rudolf Kalman. Kalman filters are an important technique for building faulttolerance into a wide range of systems, including real-time imaging. In the field of motion estimation for video coding many techniques have been applied . It is now quite common to see the Kalman filtering technique and some of its extensions to be used for the estimation of motion within image sequences. In control theory, the Kalman filter is most commonly referred to as linear quadratic estimation (LQE)
2D TARGET TRACKING. The state of the system is represented as a vector of real numbers. At each discrete time increment, a linear operator is applied to the state to generate the new state, with some noise mixed in, and optionally some information from the controls on the system if they are known. This Problem proposes a ball based motion estimation using Kalman filtering to improve the motion vector estimates.
In order to use the Kalman filter to estimate the internal state of a process given only a sequence of noisy observations, one must model the process in accordance with the framework of the Kalman filter. This means specifying the matrices Fk, Hk, Qk, Rk, and sometimes Bk for each time-step k as described below.
Model underlying the Kalman filter.
Circles are vectors, squares are matrices, and stars represent Gaussian noise with the associated covariance matrix at the lower right. The Kalman filter model assumes the true state at time k is evolved from the state at (k − 1) according to where Fk is the state transition model which is applied to the previous state xk−1; Bk is the control-input model which is applied to the control vector uk; wk is the process noise which is assumed to be drawn from a zero mean multivariate normal distribution with covariance Qk.
V(k+ 1 )=F(k)V(k) + W(k) where V(k) is the motion
Motion vector prediction V( k+ 1 / k ) = F( k ) V( k / k ) Prediction error P(k+ 1/ k ) = F ( k ) P ( k / k ) F ' ( k ) + Q ( k ) where p( k )denotes the transpose matrix of F(k).
extracts the center (cc,cr) and radius of the largest blob (cc,cr) function [cc,cr,radius,flag]=extractball(Imwork,Imback,index)%,fig1,fig2,fig3,fig15,index) [cc,cr,radius,flag]=extractball(Imwork,Imback,index)%,fig1,fig2,fig3,fig15,index) cc = 0; cr = 0; radius = 0; flag = 0; [MR,MC,Dim] = size(Imback); MR,MC,Dim] size(Imback); % subtract background & select pixels with a big difference fore = zeros(MR,MC); %image subtracktion zeros(MR,MC); fore = (abs(Imwork(:,:,1)-Imback(:,:,1)) > 10) ... (abs(Imwork(:,:,1)| (abs(Imwork(:,:,2) - Imback(:,:,2)) > 10) ... | (abs(Imwork(:,:,3) - Imback(:,:,3)) > 10); % Morphology Operation erode to remove small noise foremm = bwmorph(fore,'erode',2); %2 time % select largest object labeled = bwlabel(foremm,4); stats = regionprops(labeled,['basic']);%basic mohem nist [N,W] = size(stats); size(stats); if N < 1 return end
% do bubble sort (large to small) on regions in case there are more than 1 id = zeros(N); zeros(N); for i = 1 : N id(i) = i; id(i) end for i = 1 : N-1 Nfor j = i+1 : N if stats(i).Area < stats(j).Area tmp = stats(i); stats(i); stats(i) = stats(j); stats(i) stats(j); stats(j) = tmp; stats(j) tmp; tmp = id(i); id(i); id(i) = id(j); id(i) id(j); id(j) = tmp; id(j) tmp; end end end % make sure that there is at least 1 big region if stats(1).Area < 100 return end selected = (labeled==id(1)); % get center of mass and radius of largest centroid = stats(1).Centroid; radius = sqrt(stats(1).Area/pi); cc = centroid(1); cr = centroid(2); flag = 1;
RESULT AND CONCLUSIONS
As we have seen in the videos 2D Tracking is possible using kalman filter. Although some errors(prediction errors) are there but this method is widely used. The above presented results are encouraging, in the sense that with the appropriate state model and assumptions close to the real motion vector behaviour, we are able through Kalman filtering to have a greater SNR than the other techniques for any frame of the sequence.