diff options
Diffstat (limited to 'tracker-easy/tracker-easy-api.cpp')
-rw-r--r-- | tracker-easy/tracker-easy-api.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tracker-easy/tracker-easy-api.cpp b/tracker-easy/tracker-easy-api.cpp index 49e11759..32663a6a 100644 --- a/tracker-easy/tracker-easy-api.cpp +++ b/tracker-easy/tracker-easy-api.cpp @@ -3,24 +3,8 @@ using namespace numeric_types; -pt_camera_info::pt_camera_info() = default; -f pt_camera_info::get_focal_length(f fov, int res_x, int res_y) -{ - const f diag_len = std::sqrt(f(res_x*res_x + res_y*res_y)); - const f aspect_x = res_x / diag_len; - //const double aspect_y = res_y / diag_len; - const f diag_fov = fov * pi/180; - const f fov_x = 2*std::atan(std::tan(diag_fov*f{.5}) * aspect_x); - //const double fov_y = 2*atan(tan(diag_fov*.5) * aspect_y); - const f fx = f{.5} / std::tan(fov_x * f{.5}); - return fx; - //fy = .5 / tan(fov_y * .5); - //static bool once = false; if (!once) { once = true; qDebug() << "f" << ret << "fov" << (fov * 180/M_PI); } -} -pt_camera::pt_camera() = default; -pt_camera::~pt_camera() = default; pt_runtime_traits::pt_runtime_traits() = default; pt_runtime_traits::~pt_runtime_traits() = default; pt_point_extractor::pt_point_extractor() = default; @@ -49,6 +33,3 @@ std::tuple<f, f> pt_pixel_pos_mixin::to_screen_pos(f px, f py, int w, int h) return std::make_tuple((px - w/f{2})/w, -(py - h/f{2})/w); } -pt_frame::pt_frame() = default; - -pt_frame::~pt_frame() = default; |