summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco/ftnoir_tracker_aruco.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-27 14:44:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-27 14:44:35 +0200
commit10c47b159d5ea0e3888318d801be065b6d921b9d (patch)
treefbb4ef46125beb83915c5cfcf5e9d1df9a1b9a03 /tracker-aruco/ftnoir_tracker_aruco.h
parent460e418f0aa83063ff222296782364a07be9f97e (diff)
tracker/aruco: fix #375
The height was zero on the test video. The ROI check only saw if width is at least zero. Check for both to be greater than one. Video provided by: @kblomster Issue: #375 Also, fix minor issues: - nix vars that can be const static in function scope - don't call solvepnp twice where obj_points shift will do - don't do bounds checking on vector elt access - respect sprintf varargs type size; change to snprintf for no reason - fix clamp-to-image logic - set proper alpha for fps estimation
Diffstat (limited to 'tracker-aruco/ftnoir_tracker_aruco.h')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.h b/tracker-aruco/ftnoir_tracker_aruco.h
index fb207f6f..94a96e4c 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.h
+++ b/tracker-aruco/ftnoir_tracker_aruco.h
@@ -70,7 +70,7 @@ private:
void clamp_last_roi();
void set_points();
void draw_centroid();
- bool set_last_roi();
+ void set_last_roi();
void set_rmat();
void set_roi_from_projection();
@@ -90,10 +90,9 @@ private:
aruco::MarkerDetector detector;
std::vector<aruco::Marker> markers;
cv::Vec3d t;
- cv::Vec3d rvec, tvec, rvec_, tvec_;
+ cv::Vec3d rvec, tvec;
std::vector<cv::Point2f> roi_projection;
std::vector<cv::Point2f> repr2;
- std::vector<cv::Point3f> centroid;
cv::Matx33d m_r, m_q, rmat;
cv::Vec3d euler;
std::vector<cv::Point3f> roi_points;
@@ -104,7 +103,7 @@ private:
static constexpr float size_min = 0.05f;
static constexpr float size_max = 0.3f;
- static constexpr double alpha_ = .985;
+ static constexpr double alpha_ = .95;
};
class TrackerControls : public ITrackerDialog, protected camera_dialog