summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_aruco
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-12 19:49:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-12 19:49:57 +0100
commitb83a47cb32443981ce9998b2015f7d310fb72821 (patch)
tree6365555893a07a82dd9a95c600fb8eaf98d1c7a5 /ftnoir_tracker_aruco
parent6e822bf3984270ead48249714f2cd77747fc2383 (diff)
Revert "correct focal length equation"
This reverts commit 4312ef4098a449d38209c4f20ed573e9deb1713c.
Diffstat (limited to 'ftnoir_tracker_aruco')
-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 9d484775..fc641ef1 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -217,8 +217,8 @@ void Tracker::run()
const int scale = frame.cols > 480 ? 2 : 1;
detector.setThresholdParams(scale > 1 ? 11 : 7, 4);
- const float focal_length_w = 0.5 * grayscale.cols / tan(0.5 * s.fov * HT_PI / 180);
- const float focal_length_h = 0.5 * grayscale.rows / tan(0.5 * s.fov * grayscale.rows / grayscale.cols * HT_PI / 180.0);
+ const float focal_length_w = 0.5 * grayscale.cols / tan(s.fov * HT_PI / 180);
+ const float focal_length_h = 0.5 * grayscale.rows / tan(s.fov * grayscale.rows / grayscale.cols * HT_PI / 180.0);
cv::Mat intrinsics = cv::Mat::eye(3, 3, CV_32FC1);
intrinsics.at<float> (0, 0) = focal_length_w;
intrinsics.at<float> (1, 1) = focal_length_h;
@@ -286,7 +286,7 @@ void Tracker::run()
cv::TermCriteria(cv::TermCriteria::MAX_ITER | cv::TermCriteria::EPS,
20,
1e-2));
- const float size = 3.5;
+ const float size = 7;
const double p = s.marker_pitch;
const double sq = sin(p * HT_PI / 180);