Basic Image AlgorithmS Library
2.8.0
|
Classical Kalman filter. More...
#include <StateEstimator/Kalman.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
void | GetCovariance (Matrix< double > &cov) const |
Returns the system state covariance. More... | |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
void | GetState (Vector< double > &state) const |
Returns the system state. More... | |
void | Init (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance) |
Kalman () | |
Kalman (const Matrix< double > &SystemMatrix, const Matrix< double > &MeasurementMatrix, const Vector< double > &InitialSystemState, const Matrix< double > &InitialSystemCovariance) | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
void | Predict (const Matrix< double > &ProcessCovariance) |
Calculates the prediction using the system matrix A. More... | |
void | Predict (const Matrix< double > &SystemMatrix, const Matrix< double > &ProcessCovariance) |
Use this prediction function system in case of varying system matrix A. More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
void | Update (const Vector< double > &Measurement, const Matrix< double > &MeasurementCovariance) |
Calculates the update step. More... | |
~Kalman () | |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
Matrix< double > | A_ |
measurement matrix and transposed More... | |
Matrix< double > | AT_ |
Matrix< double > | Covariance_ |
The covariance matrix corresponding to State_. More... | |
Matrix< double > | H_ |
measurement matrix and transposed More... | |
Matrix< double > | HT_ |
Matrix< double > | Identity_ |
identity matrix More... | |
int | MeasurementDim_ |
Vector< double > | State_ |
Contains either the prediction (prior) or Bayes optimal system estimate (posterior) depending what function (Predict()/Update()) wascalled last. More... | |
SVD | svd_ |
needed for matrix inversion More... | |
int | SystemStateDim_ |
dimensions of system space and measurement space More... | |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
Classical Kalman filter.
See http://www.cs.unc.edu/~welch/kalman/ for details.
Initialize it by either
Use it by consecutively call
Extract the prediction (prior) by calling GetState() and GetCovariance() after the Predict() step.
Extract the estimated system state by calling GetState() and GetCovariance() after the Update() step.
Kalman::Kalman | ( | ) |
Definition at line 10 of file Kalman.cpp.
Kalman::Kalman | ( | const Matrix< double > & | SystemMatrix, |
const Matrix< double > & | MeasurementMatrix, | ||
const Vector< double > & | InitialSystemState, | ||
const Matrix< double > & | InitialSystemCovariance | ||
) |
Definition at line 15 of file Kalman.cpp.
Kalman::~Kalman | ( | ) |
Definition at line 24 of file Kalman.cpp.
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inline |
Returns the system state covariance.
It could be the covariance of the prediction, if called after the predict step or the covariance of the posterior, if GetState is called after the update step.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inline |
Returns the system state.
It could be the prediction, if called after the predict step or the posterior, if GetState is called after the update step.
void Kalman::Init | ( | const Matrix< double > & | SystemMatrix, |
const Matrix< double > & | MeasurementMatrix, | ||
const Vector< double > & | InitialSystemState, | ||
const Matrix< double > & | InitialSystemCovariance | ||
) |
Definition at line 27 of file Kalman.cpp.
References TNT::Matrix< T >::newsize(), TNT::Matrix< T >::num_rows(), TNT::Vector< T >::size(), and BIAS::Matrix< T >::Transpose().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
void Kalman::Predict | ( | const Matrix< double > & | ProcessCovariance | ) |
Calculates the prediction using the system matrix A.
Definition at line 51 of file Kalman.cpp.
void Kalman::Predict | ( | const Matrix< double > & | SystemMatrix, |
const Matrix< double > & | ProcessCovariance | ||
) |
Use this prediction function system in case of varying system matrix A.
Definition at line 59 of file Kalman.cpp.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
void Kalman::Update | ( | const Vector< double > & | Measurement, |
const Matrix< double > & | MeasurementCovariance | ||
) |
Calculates the update step.
Definition at line 72 of file Kalman.cpp.
References TNT::Matrix< T >::num_cols(), TNT::Matrix< T >::num_rows(), and TNT::Vector< T >::size().
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protected |
|
protected |
|
staticprotectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |