diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-18 15:20:09 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-18 15:20:09 +0100 |
commit | 5023b54ba76325bb0b5598d59714bdad2d55d81e (patch) | |
tree | 15cc639eff7dbfa12eeccaa52d7fd251f18969e6 /tracker-wii | |
parent | 3aababf6fd53a7b0312c2c1492bab6b43584b613 (diff) |
video: add support for camera modules
Issue: #910
Diffstat (limited to 'tracker-wii')
-rw-r--r-- | tracker-wii/wii_camera.cpp | 7 | ||||
-rw-r--r-- | tracker-wii/wii_camera.h | 3 | ||||
-rw-r--r-- | tracker-wii/wii_point_extractor.cpp | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/tracker-wii/wii_camera.cpp b/tracker-wii/wii_camera.cpp index 90ad6385..97a32b9f 100644 --- a/tracker-wii/wii_camera.cpp +++ b/tracker-wii/wii_camera.cpp @@ -16,13 +16,10 @@ #include "wii_frame.hpp" #include "compat/sleep.hpp" -#include "compat/camera-names.hpp" #include "compat/math-imports.hpp" #include <opencv2/imgproc.hpp> -#include "cv/video-property-page.hpp" - #include <bluetoothapis.h> using namespace pt_module; @@ -33,7 +30,7 @@ WIICamera::WIICamera(const QString& module_name) : s { module_name } cam_info.res_x = 1024; cam_info.res_y = 768; cam_info.fov = 42.0f; - cam_info.idx = 0; + cam_info.name = "Wii"; } WIICamera::~WIICamera() @@ -86,7 +83,7 @@ WIICamera::result WIICamera::get_frame(pt_frame& frame_) return result(true, cam_info); } -bool WIICamera::start(int idx, int fps, int res_x, int res_y) +bool WIICamera::start(const QString& name, int fps, int res_x, int res_y) { m_pDev = std::make_unique<wiimote>(); m_pDev->ChangedCallback = on_state_change; diff --git a/tracker-wii/wii_camera.h b/tracker-wii/wii_camera.h index 05f5436c..7bc74559 100644 --- a/tracker-wii/wii_camera.h +++ b/tracker-wii/wii_camera.h @@ -17,7 +17,6 @@ #include <tuple> #include <opencv2/core.hpp> -#include <opencv2/videoio.hpp> #include <QString> @@ -31,7 +30,7 @@ struct WIICamera final : pt_camera WIICamera(const QString& module_name); ~WIICamera() override; - bool start(int idx, int fps, int res_x, int res_y) override; + bool start(const QString& name, int fps, int res_x, int res_y) override; void stop() override; result get_frame(pt_frame& Frame) override; diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp index a23e0e5b..89e4b41b 100644 --- a/tracker-wii/wii_point_extractor.cpp +++ b/tracker-wii/wii_point_extractor.cpp @@ -14,8 +14,6 @@ #include "cv/numeric.hpp" #include "compat/math.hpp" -#include <opencv2/videoio.hpp> - #undef PREVIEW //#define PREVIEW |