summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT
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_PT
parent6e822bf3984270ead48249714f2cd77747fc2383 (diff)
Revert "correct focal length equation"
This reverts commit 4312ef4098a449d38209c4f20ed573e9deb1713c.
Diffstat (limited to 'FTNoIR_Tracker_PT')
-rw-r--r--FTNoIR_Tracker_PT/point_tracker.cpp4
-rw-r--r--FTNoIR_Tracker_PT/point_tracker.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/FTNoIR_Tracker_PT/point_tracker.cpp b/FTNoIR_Tracker_PT/point_tracker.cpp
index 885b327a..96d9d972 100644
--- a/FTNoIR_Tracker_PT/point_tracker.cpp
+++ b/FTNoIR_Tracker_PT/point_tracker.cpp
@@ -250,8 +250,8 @@ void PointTracker::POSIT(float fov, int w, int h)
const float HT_PI = 3.1415926535;
- const float focal_length_w = 0.5 * w / tan(0.5 * fov * HT_PI / 180);
- const float focal_length_h = 0.5 * h / tan(0.5 * fov * h / w * HT_PI / 180.0);
+ const float focal_length_w = 0.5 * w / tan(fov * HT_PI / 180);
+ const float focal_length_h = 0.5 * h / tan(fov * h / w * HT_PI / 180.0);
cv::Mat intrinsics = cv::Mat::eye(3, 3, CV_32FC1);
intrinsics.at<float> (0, 0) = focal_length_w;
diff --git a/FTNoIR_Tracker_PT/point_tracker.h b/FTNoIR_Tracker_PT/point_tracker.h
index 69eb9bba..741d5af4 100644
--- a/FTNoIR_Tracker_PT/point_tracker.h
+++ b/FTNoIR_Tracker_PT/point_tracker.h
@@ -104,8 +104,8 @@ protected:
if (!rvec.empty() && !tvec.empty() && fov > 0)
{
const float HT_PI = 3.1415926535;
- const float focal_length_w = 0.5 * w / tan(0.5 * fov * HT_PI / 180);
- const float focal_length_h = 0.5 * h / tan(0.5 * fov * h / w * HT_PI / 180.0);
+ const float focal_length_w = 0.5 * w / tan(fov * HT_PI / 180);
+ const float focal_length_h = 0.5 * h / tan(fov * h / w * HT_PI / 180.0);
cv::Mat intrinsics = cv::Mat::eye(3, 3, CV_32FC1);
intrinsics.at<float> (0, 0) = focal_length_w;