target tracking using kalman ppt
-
Upload
amit-kumar-karna -
Category
Documents
-
view
6.089 -
download
1
Transcript of target tracking using kalman ppt
DSP PROJECTDSP PROJECT
TARGET TRACKING USING TARGET TRACKING USING KALMAN FILTERKALMAN FILTER
SUBMITTED BYSUBMITTED BYDEVENDER BUDHWAR(44DEVENDER BUDHWAR(4411)11)SAHIL SANDHU(4455)SAHIL SANDHU(4455)AMIT KUMAR KARNA (04403)AMIT KUMAR KARNA (04403)
INDEXINDEX
INTRODUCTION TO KALMAN FILTERINTRODUCTION TO KALMAN FILTERPROBLEM DEFINITIONPROBLEM DEFINITIONAPPROACHAPPROACHCODECODERESULTRESULTCONCLUSIONCONCLUSION
INTRODUCTIONINTRODUCTION
The The KalmanKalman filterfilter is an efficient is an efficient recursive filterrecursive filter which estimates which estimates the state of a the state of a dynamic systemdynamic system from a series of incomplete and from a series of incomplete and noisynoisymeasurementsmeasurements, developed by , developed by Rudolf Rudolf KalmanKalman. . KalmanKalman filters are an important technique for building faultfilters are an important technique for building fault--tolerance into a wide range of systems, including realtolerance into a wide range of systems, including real--time imaging.time imaging.In the field of motion estimation for video codingmany techniques have been applied . It is now quitecommon to see the Kalman filtering technique and someof its extensions to be used for the estimation of motionwithin image sequences.In In control theorycontrol theory, the , the KalmanKalman filter is most commonly referred to as filter is most commonly referred to as
linear quadratic estimationlinear quadratic estimation (LQE) (LQE)
PROBLEM DEFINITIONPROBLEM DEFINITION
2D TARGET TRACKING.2D TARGET TRACKING.The The statestate of the system is represented as a of the system is represented as a vectorvector of of real numbersreal numbers. . At each At each discrete timediscrete time increment, a linear operator is applied to the increment, a linear operator is applied to the state to generate the new state, with some noise mixed in, and state to generate the new state, with some noise mixed in, and optionally some information from the controls on the system if toptionally some information from the controls on the system if they hey are known. are known. This Problem proposes a ball based motion estimation using Kalmanfiltering to improve the motion vector estimates.
APPROACHAPPROACHIn order to use the In order to use the KalmanKalman filter to estimate the internal state of a filter to estimate the internal state of a process given only a sequence of noisy observations, one must process given only a sequence of noisy observations, one must model the process in accordance with the framework of the model the process in accordance with the framework of the KalmanKalmanfilter. This means specifying the filter. This means specifying the matricesmatrices FFkk, , HHkk, , QQkk, , RRkk, and , and sometimes sometimes BBkk for each timefor each time--step step kk as described below. as described below.
Model underlying the Model underlying the KalmanKalman filter. filter.
APPROACHAPPROACHCircles are Circles are vectorsvectors, squares are , squares are matricesmatrices, and stars represent , and stars represent Gaussian noiseGaussian noise with the associated with the associated covariance matrixcovariance matrix at the lower at the lower right. right. The The KalmanKalman filter model assumes the true state at time filter model assumes the true state at time kk is is evolved from the state at (evolved from the state at (kk −− 1) according to1) according to
wherewhereFFkk is the state transition model which is applied to the previous is the state transition model which is applied to the previous state state xxkk−−1; 1; BBkk is the controlis the control--input model which is applied to the control input model which is applied to the control vector vector uukk; ; wwkk is the process noise which is assumed to be drawn from a is the process noise which is assumed to be drawn from a zero mean zero mean multivariate normal distributionmultivariate normal distribution with with covariancecovariance QQkk. .
APPROACHAPPROACH
V(k+ 1 )=F(k)V(k) + W(k) where V(k) is the motionvector.Prediction:Motion vector predictionV( k+ 1 / k ) = F( k ) V( k / k ) Prediction errorP(k+ 1/ k ) = F ( k ) P ( k / k ) F ' ( k ) + Q ( k )where p( k )denotes the transpose matrix of F(k).
CODECODE
extracts the center (extracts the center (cc,crcc,cr) and radius of the largest blob) and radius of the largest blobfunction [function [cc,cr,radius,flagcc,cr,radius,flag]=extractball(Imwork,Imback,index)%,fig1,fig2,fig3,fig15,index)]=extractball(Imwork,Imback,index)%,fig1,fig2,fig3,fig15,index)
cc = 0;cc = 0;crcr = 0;= 0;radius = 0;radius = 0;flag = 0;flag = 0;[[MR,MC,DimMR,MC,Dim] = ] = size(Imbacksize(Imback););
% subtract background & select pixels with a big difference% subtract background & select pixels with a big differencefore = fore = zeros(MR,MCzeros(MR,MC); %image ); %image subtracktionsubtracktionfore = (abs(Imwork(:,:,1)fore = (abs(Imwork(:,:,1)--Imback(:,:,1)) > 10) ...Imback(:,:,1)) > 10) ...
| (abs(Imwork(:,:,2) | (abs(Imwork(:,:,2) -- Imback(:,:,2)) > 10) ...Imback(:,:,2)) > 10) ...| (abs(Imwork(:,:,3) | (abs(Imwork(:,:,3) -- Imback(:,:,3)) > 10); Imback(:,:,3)) > 10);
% Morphology Operation erode to remove small noise% Morphology Operation erode to remove small noiseforemmforemm = bwmorph(fore,'erode',2); %2 time= bwmorph(fore,'erode',2); %2 time
% select largest object% select largest objectlabeled = bwlabel(foremm,4);labeled = bwlabel(foremm,4);stats = stats = regionprops(labeled,['basic']);%basicregionprops(labeled,['basic']);%basic mohemmohem nistnist[N,W] = [N,W] = size(statssize(stats););if N < 1if N < 1return return
endend
CODECODE% do bubble sort (large to small) on regions in case there are % do bubble sort (large to small) on regions in case there are more than 1more than 1id = id = zeros(Nzeros(N););for i = 1 : Nfor i = 1 : Nid(iid(i) = i;) = i;
endendfor i = 1 : Nfor i = 1 : N--11for j = i+1 : Nfor j = i+1 : Nif if stats(i).Areastats(i).Area < < stats(j).Areastats(j).Areatmptmp = = stats(istats(i););stats(istats(i) = ) = stats(jstats(j););stats(jstats(j) = ) = tmptmp;;tmptmp = = id(iid(i););id(iid(i) = ) = id(jid(j););id(jid(j) = ) = tmptmp;;
endendendend
endend
% make sure that there is at least 1 big region% make sure that there is at least 1 big regionif stats(1).Area < 100 if stats(1).Area < 100 returnreturn
endendselected = (labeled==id(1));selected = (labeled==id(1));
% get center of mass and radius of largest% get center of mass and radius of largestcentroidcentroid = stats(1).Centroid;= stats(1).Centroid;radius = sqrt(stats(1).Area/pi);radius = sqrt(stats(1).Area/pi);cc = centroid(1);cc = centroid(1);crcr = centroid(2);= centroid(2);flag = 1;flag = 1;
RESULT AND CONCLUSIONSRESULT AND CONCLUSIONS
As we have seen in the videos 2D Tracking is possible using As we have seen in the videos 2D Tracking is possible using kalmankalmanfilter.filter.Although some Although some errors(predictionerrors(prediction errors) are there but this method is errors) are there but this method is widely used.widely used.The above presented results are encouraging, in thesense that with the appropriate state model and assumptions close to the real motion vector behaviour, we are able through Kalmanfiltering to have a greater SNR than the other techniques for any frame of the sequence.
THANK YOUTHANK YOU