-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkalmanPredict.sci
51 lines (44 loc) · 1.81 KB
/
kalmanPredict.sci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright (C) 2015 - IIT Bombay - FOSSEE
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Author: Gursimar Singh
// Organization: FOSSEE, IIT Bombay
// Email: [email protected]
function [kalmanFilter,plocation]=kalmanPredict(KalmanFilter)
//This function predicts the state of the object based on the previous states.
//
//Calling Sequence
//[plocation]=kalmanPredict(KalmanFilter);
//
//Parameters
//plocation - It is the predicted state or location of the object.It is a row vector of size same as dimensionality of state in KalmanFilter.
//KalmanFilter:Output of the function configKalmanFilter.It is a structure specifying parameters of the KalmanFilter.For more details see configKalmanFilter.
//
//Description
//The function is commonly used for object tracking in videos.The trajectory of the object to be tracked can be predicted based on the previous states of the object.
//
//Examples
//
//Authors
//Gursimar Singh
//
//See also
//kalmanCorrect
//configKalmanFilter
[lhs rhs]=argn(0);
if lhs>2
error(msprintf(" Too many output arguments\n"));
elseif rhs>1
error(msprintf(" Too many input arguments\n"));
elseif rhs<1
error(msprintf("Too few input arguments\n"));
end
kalman_list=kalmanStructToList(KalmanFilter);
[kalmanl,plocation]=raw_kalmanPredict(kalman_list);
//plocation=kalman_list;
kalmanFilter=struct("StateTransitionModel",kalmanl(1),"MeasurementModel",kalmanl(2),"ControlModel",kalmanl(3),"State",kalmanl(4),"StateCovariance",kalmanl(5),"ProcessNoise",kalmanl(6),"MeasurementNoise",kalmanl(7));
endfunction