diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-09 05:33:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-07-09 05:35:08 +0200 |
commit | 793cea587159a0ba01fec6af28e899697ef4da79 (patch) | |
tree | b4ec4477862ed74dc2c180d2b002915f8df040e8 /tracker-pt | |
parent | 841e163ae4b86317cca29748cf0f2730418e4fa5 (diff) |
cleanup only
Diffstat (limited to 'tracker-pt')
-rw-r--r-- | tracker-pt/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tracker-pt/module/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tracker-pt/point_tracker.h | 4 | ||||
-rw-r--r-- | tracker-pt/pt-api.cpp | 41 | ||||
-rw-r--r-- | tracker-pt/pt-settings.cpp | 8 | ||||
-rw-r--r-- | tracker-pt/pt-settings.hpp | 12 |
6 files changed, 33 insertions, 41 deletions
diff --git a/tracker-pt/CMakeLists.txt b/tracker-pt/CMakeLists.txt index 326f345c..4010b6c1 100644 --- a/tracker-pt/CMakeLists.txt +++ b/tracker-pt/CMakeLists.txt @@ -1,7 +1,8 @@ find_package(OpenCV QUIET) if(OpenCV_FOUND) otr_module(tracker-pt-base STATIC) - target_include_directories(opentrack-tracker-pt-base SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS}) - target_link_libraries(opentrack-tracker-pt-base opentrack-cv opencv_core opencv_imgproc opencv_videoio) + target_include_directories(${self} SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS}) + target_link_libraries(${self} opentrack-cv opencv_core opencv_imgproc opencv_videoio) + set_property(TARGET ${self} PROPERTY OUTPUT_NAME "pt-base") endif() add_subdirectory(module) diff --git a/tracker-pt/module/CMakeLists.txt b/tracker-pt/module/CMakeLists.txt index f0f90f8a..22b725c9 100644 --- a/tracker-pt/module/CMakeLists.txt +++ b/tracker-pt/module/CMakeLists.txt @@ -1,8 +1,6 @@ find_package(OpenCV QUIET) if(OpenCV_FOUND) - otr_module(tracker-pt-static STATIC) + otr_module(tracker-pt) target_link_libraries(${self} opentrack-tracker-pt-base) target_include_directories(${self} PUBLIC "${CMAKE_SOURCE_DIR}/tracker-pt") - otr_module(tracker-pt) - target_link_libraries(${self} opentrack-tracker-pt-static) endif() diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h index 5e741c75..cfe3735c 100644 --- a/tracker-pt/point_tracker.h +++ b/tracker-pt/point_tracker.h @@ -84,5 +84,5 @@ private: } // ns pt_impl -using pt_module::PointTracker; -using pt_module::PointModel; +using PointTracker = pt_module::PointTracker; +using PointModel = pt_module::PointModel; diff --git a/tracker-pt/pt-api.cpp b/tracker-pt/pt-api.cpp index 596590dc..d137a60a 100644 --- a/tracker-pt/pt-api.cpp +++ b/tracker-pt/pt-api.cpp @@ -3,9 +3,7 @@ using namespace types; -pt_camera_info::pt_camera_info() -{ -} +pt_camera_info::pt_camera_info() = default; double pt_camera_info::get_focal_length(f fov, int res_x, int res_y) { @@ -21,29 +19,12 @@ double pt_camera_info::get_focal_length(f fov, int res_x, int res_y) //static bool once = false; if (!once) { once = true; qDebug() << "f" << ret << "fov" << (fov * 180/M_PI); } } -pt_camera::pt_camera() -{ -} - -pt_camera::~pt_camera() -{ -} - -pt_runtime_traits::pt_runtime_traits() -{ -} - -pt_runtime_traits::~pt_runtime_traits() -{ -} - -pt_point_extractor::pt_point_extractor() -{ -} - -pt_point_extractor::~pt_point_extractor() -{ -} +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; +pt_point_extractor::~pt_point_extractor() = default; double pt_point_extractor::threshold_radius_value(int w, int h, int threshold) { @@ -68,10 +49,6 @@ std::tuple<double, double> pt_pixel_pos_mixin::to_screen_pos(double px, double p return std::make_tuple((px - w/2.)/w, -(py - h/2.)/w); } -pt_frame::pt_frame() -{ -} +pt_frame::pt_frame() = default; -pt_frame::~pt_frame() -{ -} +pt_frame::~pt_frame() = default; diff --git a/tracker-pt/pt-settings.cpp b/tracker-pt/pt-settings.cpp new file mode 100644 index 00000000..5e9e1e1a --- /dev/null +++ b/tracker-pt/pt-settings.cpp @@ -0,0 +1,8 @@ +#include "pt-settings.hpp" + +namespace pt_settings_detail { + +pt_settings::pt_settings(const QString& name) : opts(name) {} +pt_settings::~pt_settings() = default; + +} // ns pt_settings_detail diff --git a/tracker-pt/pt-settings.hpp b/tracker-pt/pt-settings.hpp index a35c248b..62297713 100644 --- a/tracker-pt/pt-settings.hpp +++ b/tracker-pt/pt-settings.hpp @@ -14,12 +14,16 @@ enum pt_color_type pt_color_blue_only = 6, }; +namespace pt_settings_detail { + +using namespace options; + struct pt_settings final : options::opts { using slider_value = options::slider_value; - explicit pt_settings(const QString& name) : opts(name) {} - ~pt_settings() override = default; + explicit pt_settings(const QString& name); + ~pt_settings() override; value<QString> camera_name { b, "camera-name", "" }; value<int> cam_res_x { b, "camera-res-width", 640 }, @@ -54,3 +58,7 @@ struct pt_settings final : options::opts value<slider_value> threshold_slider { b, "threshold-slider", { 128, 0, 255 } }; }; + +} // ns pt_settings_detail + +using pt_settings = pt_settings_detail::pt_settings; |