KalmanFilterTrait

Trait KalmanFilterTrait 

Source
pub trait KalmanFilterTrait: KalmanFilterTraitConst {
Show 21 methods // Required method fn as_raw_mut_KalmanFilter(&mut self) -> *mut c_void; // Provided methods fn set_state_pre(&mut self, val: Mat) { ... } fn set_state_post(&mut self, val: Mat) { ... } fn set_transition_matrix(&mut self, val: Mat) { ... } fn set_control_matrix(&mut self, val: Mat) { ... } fn set_measurement_matrix(&mut self, val: Mat) { ... } fn set_process_noise_cov(&mut self, val: Mat) { ... } fn set_measurement_noise_cov(&mut self, val: Mat) { ... } fn set_error_cov_pre(&mut self, val: Mat) { ... } fn set_gain(&mut self, val: Mat) { ... } fn set_error_cov_post(&mut self, val: Mat) { ... } fn set_temp1(&mut self, val: Mat) { ... } fn set_temp2(&mut self, val: Mat) { ... } fn set_temp3(&mut self, val: Mat) { ... } fn set_temp4(&mut self, val: Mat) { ... } fn set_temp5(&mut self, val: Mat) { ... } fn init( &mut self, dynam_params: i32, measure_params: i32, control_params: i32, typ: i32, ) -> Result<()> { ... } fn init_def(&mut self, dynam_params: i32, measure_params: i32) -> Result<()> { ... } fn predict(&mut self, control: &impl MatTraitConst) -> Result<Mat> { ... } fn predict_def(&mut self) -> Result<Mat> { ... } fn correct(&mut self, measurement: &impl MatTraitConst) -> Result<Mat> { ... }
}
Expand description

Mutable methods for crate::video::KalmanFilter

Required Methods§

Provided Methods§

Source

fn set_state_pre(&mut self, val: Mat)

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

Source

fn set_state_post(&mut self, val: Mat)

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

Source

fn set_transition_matrix(&mut self, val: Mat)

state transition matrix (A)

Source

fn set_control_matrix(&mut self, val: Mat)

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

Source

fn set_measurement_matrix(&mut self, val: Mat)

measurement matrix (H)

Source

fn set_process_noise_cov(&mut self, val: Mat)

process noise covariance matrix (Q)

Source

fn set_measurement_noise_cov(&mut self, val: Mat)

measurement noise covariance matrix (R)

Source

fn set_error_cov_pre(&mut self, val: Mat)

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

Source

fn set_gain(&mut self, val: Mat)

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

Source

fn set_error_cov_post(&mut self, val: Mat)

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

Source

fn set_temp1(&mut self, val: Mat)

Source

fn set_temp2(&mut self, val: Mat)

Source

fn set_temp3(&mut self, val: Mat)

Source

fn set_temp4(&mut self, val: Mat)

Source

fn set_temp5(&mut self, val: Mat)

Source

fn init( &mut self, dynam_params: i32, measure_params: i32, control_params: i32, typ: i32, ) -> Result<()>

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

§Parameters
  • dynamParams: Dimensionality of the state.
  • measureParams: Dimensionality of the measurement.
  • controlParams: Dimensionality of the control vector.
  • type: Type of the created matrices that should be CV_32F or CV_64F.
§C++ default parameters
  • control_params: 0
  • typ: CV_32F
Source

fn init_def(&mut self, dynam_params: i32, measure_params: i32) -> Result<()>

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

§Parameters
  • dynamParams: Dimensionality of the state.
  • measureParams: Dimensionality of the measurement.
  • controlParams: Dimensionality of the control vector.
  • type: Type of the created matrices that should be CV_32F or CV_64F.
§Note

This alternative version of KalmanFilterTrait::init function uses the following default values for its arguments:

  • control_params: 0
  • typ: CV_32F
Source

fn predict(&mut self, control: &impl MatTraitConst) -> Result<Mat>

Computes a predicted state.

§Parameters
  • control: The optional input control
§C++ default parameters
  • control: Mat()
Source

fn predict_def(&mut self) -> Result<Mat>

Computes a predicted state.

§Parameters
  • control: The optional input control
§Note

This alternative version of KalmanFilterTrait::predict function uses the following default values for its arguments:

  • control: Mat()
Source

fn correct(&mut self, measurement: &impl MatTraitConst) -> Result<Mat>

Updates the predicted state from the measurement.

§Parameters
  • measurement: The measured system parameters

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§