summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-22 06:50:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-22 06:50:58 +0200
commit9ad67c655e1746231f02ef2a238b7886dda4316b (patch)
tree8ec7f062844c7a33870d333e5c13eb0fdba1164d
parenta664f1e0bd8dc6f24ce7bf25406bf9c4bfda7ecd (diff)
parentcf8a8bb0c196b095f0ee2fddd0a2952f568eacf9 (diff)
Merge branch 'unstable' into trackhat-ui
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index 2e488486..05f3e3a4 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -132,7 +132,6 @@ void Tracker::run()
double failed = 0;
const double max_failed = 1.25;
cv::Vec3d rvec, tvec;
- int last_fov = -1;
cv::Mat intrinsics = cv::Mat::eye(3, 3, CV_32FC1);
cv::Mat dist_coeffs = cv::Mat::zeros(5, 1, CV_32FC1);
@@ -158,14 +157,10 @@ void Tracker::run()
const float focal_length_w = .5 * w / tan(.5 * fov);
const float focal_length_h = focal_length_w;
- if (last_fov != s.fov)
- {
- last_fov = s.fov;
- intrinsics.at<float> (0, 0) = focal_length_w;
- intrinsics.at<float> (1, 1) = focal_length_h;
- intrinsics.at<float> (0, 2) = grayscale.cols/2;
- intrinsics.at<float> (1, 2) = grayscale.rows/2;
- }
+ intrinsics.at<float> (0, 0) = focal_length_w;
+ intrinsics.at<float> (1, 1) = focal_length_h;
+ intrinsics.at<float> (0, 2) = grayscale.cols/2;
+ intrinsics.at<float> (1, 2) = grayscale.rows/2;
std::vector< aruco::Marker > markers;