summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-12 00:10:25 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-12 00:10:25 +0100
commitbffc54d3b7f3fae018db7e371b7ee8f4e3d57f6a (patch)
treee902a8899abcafa61498e6d5d44398a3c768f673
parent5ac13932342530b68708c202d1227267bd4733bf (diff)
fix aruco ROI bug
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index f00c8bfc..be5d0f32 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -238,7 +238,7 @@ void Tracker::run()
{
detector.setMinMaxSize(std::max(0.01, size_min * grayscale.cols / last_roi.width),
std::min(1.0, size_max * grayscale.cols / last_roi.width));
- auto m = markers.at(0);
+ auto& m = markers.at(0);
for (int i = 0; i < 4; i++)
{
auto& p = m.at(i);
@@ -253,7 +253,7 @@ void Tracker::run()
}
if (markers.size() == 1 && markers[0].size() == 4) {
- const aruco::Marker& m = markers.at(0);
+ const auto& m = markers.at(0);
for (int i = 0; i < 4; i++)
cv::line(color, m[i], m[(i+1)%4], cv::Scalar(0, 0, 255), scale, 8);
}
@@ -279,7 +279,7 @@ void Tracker::run()
cv::putText(frame, buf, cv::Point(10, 54), cv::FONT_HERSHEY_PLAIN, scale, cv::Scalar(80, 255, 0), scale);
if (markers.size() == 1 && markers[0].size() == 4) {
- const auto m = static_cast<std::vector<cv::Point2f>>(markers.at(0));
+ const auto& m = markers.at(0);
cv::cornerSubPix(grayscale,
m,
cv::Size(5, 5), cv::Size(-1, -1),