Facemorph
Class Kalman

java.lang.Object
  extended by Facemorph.Kalman

public class Kalman
extends java.lang.Object

Kalman filter implementation


Constructor Summary
Kalman(BigMat A, BigMat P, BigMat Q, BigMat R, BigMat H, double[] x)
          Creates a new instance of Kalman
 
Method Summary
static void main(java.lang.String[] args)
          Main method used for testing
 double[] predict()
          Method to predict the expected value at the next time point
 double[] update(double[] z)
          Update the estimate and model in light of the new observation z
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Kalman

public Kalman(BigMat A,
              BigMat P,
              BigMat Q,
              BigMat R,
              BigMat H,
              double[] x)
Creates a new instance of Kalman

Parameters:
A - the dynamic matrix that multiplies the previous time state
H - the state-to-measurement matrix
Q - process noise covariance matrix
R - measurement noise covariance
P - the error estimate covariance matrix
x - the initial measurement
Method Detail

predict

public double[] predict()
                 throws BigMatException
Method to predict the expected value at the next time point

Returns:
returns the predicted value
Throws:
BigMatException

update

public double[] update(double[] z)
                throws BigMatException
Update the estimate and model in light of the new observation z

Parameters:
z - the next measurement
Returns:
returns the updated current estimate
Throws:
BigMatException

main

public static void main(java.lang.String[] args)
                 throws BigMatException
Main method used for testing

Parameters:
args -
Throws:
BigMatException