tracking an object using kalman filter

hi all, i'm using kalman filter for prediction of a path. suppose i have a ball in an image. now if the ball is falling vertically downwards without any lateral movement, my matrix B=[0 0 0 g]' , but if along with gravitational force, i apply a force at an angle to ball the ball will move in the opposite direction to the applied force. now my question is what will happen to my matrix B?
your help will be very much appreciated and thanks in advance.

댓글 수: 4

Zeeshan
Zeeshan 2015년 1월 8일
편집: Geoff Hayes 2015년 1월 9일
also i.m using this code:
clear,clc
% compute the background image
Imzero = zeros(240,320,3);
for i = 1:5
Im{i} = double(imread(['DATA/',int2str(i),'.jpg']));
Imzero = Im{i}+Imzero;
end
Imback = Imzero/5;
[MR,MC,Dim] = size(Imback);
but it is show me an error:
Undefined function or variable 'Imzero'.
Error in extractball (line 8)
Imback = Imzero/5;
i don't know what to do here.. please help me out.. thanks in advance
Geoff Hayes
Geoff Hayes 2015년 1월 9일
Zeeshan - it isn't clear to me how the observed error is generated from the code that you gave provided. Could you please attach the extractball.m file that has all the code?
As for using the Kalman Filter, how does your B matrix fit into the algorithm?
Zeeshan
Zeeshan 2015년 1월 9일
the state equation for the kalman filter is x(t+1) = Ax(t) + Bu(t) + Gw(t). where x(t+1) is the present estimate of the ball. x(t) is the previous position of the ball. A is the state matrix. B is the control matirx and u(t) is the control vactor.
Geoff Hayes
Geoff Hayes 2015년 1월 10일
Zeeshan - are you still observing the same error message? If so, please post your code to the extractball function.

댓글을 달려면 로그인하십시오.

질문:

2015년 1월 8일

댓글:

2015년 1월 10일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by