diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-21 12:01:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-21 12:01:43 +0200 |
commit | 107570e6288d266825724010a6f0149eaaac40db (patch) | |
tree | ab357889f6cd009e6e6a89e89657c377d4bb05ab /tracker-aruco | |
parent | 1c22f4a19a0cfa6b593b72754acb9ea97fbded13 (diff) |
many: remove compat/pi-constant.hpp
With -D_USE_MATH_DEFINES MSVC defines the standard M_PI and
friends.
Since this preprocessor definition is now always passed as part
of the build system for MSVC. We can use M_PI as if on a
mission.
Diffstat (limited to 'tracker-aruco')
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp index 81a2e176..18e6a9bf 100644 --- a/tracker-aruco/ftnoir_tracker_aruco.cpp +++ b/tracker-aruco/ftnoir_tracker_aruco.cpp @@ -9,7 +9,6 @@ #include "api/plugin-api.hpp" #include "compat/camera-names.hpp" #include "compat/sleep.hpp" -#include "compat/pi-constant.hpp" #include "cv/video-property-page.hpp" #include <opencv2/core.hpp> @@ -89,7 +88,7 @@ void Tracker::start_tracker(QFrame* videoframe) layout = layout_; } -#define HT_PI OPENTRACK_PI +#define HT_PI M_PI void Tracker::getRT(cv::Matx33d& r_, cv::Vec3d& t_) { @@ -186,9 +185,8 @@ bool Tracker::open_camera() void Tracker::set_intrinsics() { - static constexpr double pi = OPENTRACK_PI; const int w = grayscale.cols, h = grayscale.rows; - const double diag_fov = static_cast<int>(s.fov) * pi / 180.; + const double diag_fov = static_cast<int>(s.fov) * M_PI / 180.; const double fov_w = 2.*atan(tan(diag_fov/2.)/sqrt(1. + h/(double)w * h/(double)w)); const double fov_h = 2.*atan(tan(diag_fov/2.)/sqrt(1. + w/(double)h * w/(double)h)); const double focal_length_w = .5 * w / tan(.5 * fov_w); |