Emgu.CV.Kalman.Correct C# (CSharp) Method

Correct() public method

Adjusts stochastic model state on the basis of the given measurement of the model state
The function stores adjusted state at kalman->state_post and returns it on output
public Correct ( Matrix measurement ) : Matrix
measurement Matrix The measurement data
return Matrix
        public Matrix<float> Correct(Matrix<float> measurement)
        {
            CvInvoke.cvKalmanCorrect(ref _kalman, measurement.Ptr);
             return CorrectedState;
        }

Usage Example

 public Matrix<float> FilterPoints(Kalman kalman, float x, float y, float z)
 {
     Matrix<float> prediction = kalman.Predict();
     Matrix<float> estimated = kalman.Correct(new Matrix<float>(new[] { x, y, z }));
     Matrix<float> results = new Matrix<float>(new[,]
     {
         { prediction[0, 0], prediction[1, 0], prediction[2, 0] },
         { estimated[0, 0], estimated[1, 0], estimated[2, 0] }
     });
     return results;
 }
All Usage Examples Of Emgu.CV.Kalman::Correct