summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 02b1f830..f89b1e7d 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -214,25 +214,7 @@ void aruco_tracker::draw_ar(bool ok)
void aruco_tracker::clamp_last_roi()
{
- if (last_roi.x < 0)
- last_roi.x = 0;
- if (last_roi.y < 0)
- last_roi.y = 0;
- if (last_roi.width < 1)
- last_roi.width = 1;
- if (last_roi.height < 1)
- last_roi.height = 1;
- if (last_roi.x >= color.cols-1)
- last_roi.x = color.cols-1;
- if (last_roi.width >= color.cols-1)
- last_roi.width = color.cols-1;
- if (last_roi.y >= color.rows-1)
- last_roi.y = color.rows-1;
- if (last_roi.height >= color.rows-1)
- last_roi.height = color.rows-1;
-
- last_roi.width -= last_roi.x;
- last_roi.height -= last_roi.y;
+ last_roi &= cv::Rect(0, 0, color.cols, color.rows);
}
void aruco_tracker::set_points()