diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-26 23:25:39 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-27 01:05:52 +0200 |
commit | e5712bbc76b2f970169a7778edd0d8c9e84bae9e (patch) | |
tree | 1c1bb829774b1ee36f9d0fc9ae05d2aa77e8ef6a | |
parent | 5f643fa61aa4b5701de758010531ae227c6a202c (diff) |
aruco fix reprojection not showing
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 7ad80b46..1a638198 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -243,7 +243,7 @@ void Tracker::run() 3); } - cv::circle(frame, last_centroid, 4, cv::Scalar(0, 0, 0), -1); + cv::circle(frame, last_centroid, 7, cv::Scalar(255, 255, 0), -1); auto time = cv::getTickCount(); @@ -321,13 +321,12 @@ void Tracker::run() error += std::sqrt(x * x + y * y); } - reprojection.clear(); - reprojection.resize(1); + std::vector<cv::Point2f> repr2; std::vector<cv::Point3f> centroid; centroid.push_back(cv::Point3f(0, 0, 0)); - cv::projectPoints(centroid, rvec, tvec, intrinsics, dist_coeffs, reprojection); + cv::projectPoints(centroid, rvec, tvec, intrinsics, dist_coeffs, repr2); - last_centroid = reprojection[0]; + last_centroid = repr2[0]; //pose[Yaw] -= atan(pose[TX] / pose[TZ]) * 180 / HT_PI; //pose[Pitch] -= atan(pose[TY] / pose[TZ]) * 180 / HT_PI; |