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§
fn as_raw_mut_KalmanFilter(&mut self) -> *mut c_void
Provided Methods§
Sourcefn set_state_pre(&mut self, val: Mat)
fn set_state_pre(&mut self, val: Mat)
predicted state (x’(k)): x(k)=Ax(k-1)+Bu(k)
Sourcefn set_state_post(&mut self, val: Mat)
fn set_state_post(&mut self, val: Mat)
corrected state (x(k)): x(k)=x’(k)+K(k)(z(k)-Hx’(k))
Sourcefn set_transition_matrix(&mut self, val: Mat)
fn set_transition_matrix(&mut self, val: Mat)
state transition matrix (A)
Sourcefn set_control_matrix(&mut self, val: Mat)
fn set_control_matrix(&mut self, val: Mat)
control matrix (B) (not used if there is no control)
Sourcefn set_measurement_matrix(&mut self, val: Mat)
fn set_measurement_matrix(&mut self, val: Mat)
measurement matrix (H)
Sourcefn set_process_noise_cov(&mut self, val: Mat)
fn set_process_noise_cov(&mut self, val: Mat)
process noise covariance matrix (Q)
Sourcefn set_measurement_noise_cov(&mut self, val: Mat)
fn set_measurement_noise_cov(&mut self, val: Mat)
measurement noise covariance matrix (R)
Sourcefn set_error_cov_pre(&mut self, val: Mat)
fn set_error_cov_pre(&mut self, val: Mat)
priori error estimate covariance matrix (P’(k)): P’(k)=A*P(k-1)*At + Q)
Sourcefn set_error_cov_post(&mut self, val: Mat)
fn set_error_cov_post(&mut self, val: Mat)
posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P’(k)
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)
Sourcefn init(
&mut self,
dynam_params: i32,
measure_params: i32,
control_params: i32,
typ: i32,
) -> Result<()>
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
Sourcefn init_def(&mut self, dynam_params: i32, measure_params: i32) -> Result<()>
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
Sourcefn predict(&mut self, control: &impl MatTraitConst) -> Result<Mat>
fn predict(&mut self, control: &impl MatTraitConst) -> Result<Mat>
Sourcefn predict_def(&mut self) -> Result<Mat>
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()
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.