Show / Hide Table of Contents

Class KalmanFilter

Kalman filter. The class implements standard Kalman filter \url{http://en.wikipedia.org/wiki/Kalman_filter}. However, you can modify KalmanFilter::transitionMatrix, KalmanFilter::controlMatrix and KalmanFilter::measurementMatrix to get the extended Kalman filter functionality.

Inheritance
System.Object
DisposableObject
DisposableCvObject
KalmanFilter
Implements
ICvPtrHolder
Inherited Members
DisposableCvObject.ptr
DisposableCvObject.CvPtr
DisposableObject.DataHandle
DisposableObject.IsDisposed
DisposableObject.IsEnabledDispose
DisposableObject.AllocatedMemory
DisposableObject.AllocatedMemorySize
DisposableObject.Dispose()
DisposableObject.Dispose(Boolean)
DisposableObject.DisposeManaged()
DisposableObject.AllocGCHandle(Object)
DisposableObject.AllocMemory(Int32)
DisposableObject.NotifyMemoryPressure(Int64)
DisposableObject.ThrowIfDisposed()
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public class KalmanFilter : DisposableCvObject, ICvPtrHolder

Constructors

| Improve this Doc View Source

KalmanFilter()

the default constructor

Declaration
public KalmanFilter()
| Improve this Doc View Source

KalmanFilter(Int32, Int32, Int32, Int32)

the full constructor taking the dimensionality of the state, of the measurement and of the control vector

Declaration
public KalmanFilter(int dynamParams, int measureParams, int controlParams = 0, int type = default(int))
Parameters
Type Name Description
System.Int32 dynamParams
System.Int32 measureParams
System.Int32 controlParams
System.Int32 type

Properties

| Improve this Doc View Source

ControlMatrix

control matrix (B) (not used if there is no control)

Declaration
public Mat ControlMatrix { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

ErrorCovPost

posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)

Declaration
public Mat ErrorCovPost { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

ErrorCovPre

priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)At + Q)/

Declaration
public Mat ErrorCovPre { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

Gain

Kalman gain matrix (K(k)): K(k)=P'(k)Htinv(H*P'(k)*Ht+R)

Declaration
public Mat Gain { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

MeasurementMatrix

measurement matrix (H)

Declaration
public Mat MeasurementMatrix { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

MeasurementNoiseCov

measurement noise covariance matrix (R)

Declaration
public Mat MeasurementNoiseCov { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

ProcessNoiseCov

process noise covariance matrix (Q)

Declaration
public Mat ProcessNoiseCov { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

StatePost

corrected state (x(k)): x(k)=x'(k)+K(k)(z(k)-Hx'(k))

Declaration
public Mat StatePost { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

StatePre

predicted state (x'(k)): x(k)=Ax(k-1)+Bu(k)

Declaration
public Mat StatePre { get; set; }
Property Value
Type Description
Mat
| Improve this Doc View Source

TransitionMatrix

state transition matrix (A)

Declaration
public Mat TransitionMatrix { get; set; }
Property Value
Type Description
Mat

Methods

| Improve this Doc View Source

Correct(Mat)

updates the predicted state from the measurement

Declaration
public Mat Correct(Mat measurement)
Parameters
Type Name Description
Mat measurement
Returns
Type Description
Mat
| Improve this Doc View Source

DisposeUnmanaged()

Releases unmanaged resources

Declaration
protected override void DisposeUnmanaged()
Overrides
DisposableCvObject.DisposeUnmanaged()
| Improve this Doc View Source

Init(Int32, Int32, Int32, Int32)

re-initializes Kalman filter. The previous content is destroyed.

Declaration
public void Init(int dynamParams, int measureParams, int controlParams = 0, int type = default(int))
Parameters
Type Name Description
System.Int32 dynamParams
System.Int32 measureParams
System.Int32 controlParams
System.Int32 type
| Improve this Doc View Source

Predict(Mat)

computes predicted state

Declaration
public Mat Predict(Mat control = null)
Parameters
Type Name Description
Mat control
Returns
Type Description
Mat

Implements

ICvPtrHolder
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX