summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp12
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++)