diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-28 05:48:10 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-12-28 05:48:10 +0100 |
commit | 5df8a8cc2869b0eab009841a684b6ee0d4ca390e (patch) | |
tree | ff5d641851b7c8fafbecd193fe910992ed15a5eb /ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | |
parent | c4bd08796aa00a8a70cbbb8caec947494a39432c (diff) |
simplify ewma logic
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 077bb0d9..c24c233f 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -242,14 +242,14 @@ void Tracker::run() color_.copyTo(color); cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); - if (first_run) - { - first_run = false; - for (int i = 0; i < N_hyst; i++) - lasts[i] = grayscale; - } if (N_hyst > 0) { + if (first_run) + { + first_run = false; + for (int i = 0; i < N_hyst; i++) + lasts[i] = grayscale; + } cv::Mat hyst(grayscale.rows, grayscale.cols, CV_32F); hyst.setTo(0); for (int i = 0; i < N_hyst-1; i++) |