From 8d0dae4cec928c67145574d5865d9ac4eb346b55 Mon Sep 17 00:00:00 2001 From: Chen Jun Date: Wed, 27 Apr 2022 18:13:57 +0800 Subject: [PATCH] Fix KalmanFilter comment error If there will be measurement before the next predict, `statePost` would be assigned to updated value. So I guess these steps are meant to handle when no measurement and KF only do the predict step. ```cpp statePre.copyTo(statePost); errorCovPre.copyTo(errorCovPost); ``` --- modules/video/src/kalman.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/video/src/kalman.cpp b/modules/video/src/kalman.cpp index f90f9f7b9e..10e7ffbe02 100644 --- a/modules/video/src/kalman.cpp +++ b/modules/video/src/kalman.cpp @@ -96,7 +96,7 @@ const Mat& KalmanFilter::predict(const Mat& control) // P'(k) = temp1*At + Q gemm(temp1, transitionMatrix, 1, processNoiseCov, 1, errorCovPre, GEMM_2_T); - // handle the case when there will be measurement before the next predict. + // handle the case when there will be no measurement before the next predict. statePre.copyTo(statePost); errorCovPre.copyTo(errorCovPost);