summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module/module.cpp
diff options
context:
space:
mode:
authorStéphane Lenclud <github@lenclud.com>2019-03-10 17:10:02 +0100
committerStéphane Lenclud <github@lenclud.com>2019-03-10 17:10:02 +0100
commit8a9d143523fddbf8ee9cb1c58cb281ac380d3ae0 (patch)
treeae5cabae1134456eff8260ff6e7c30639c9ef42c /tracker-pt/module/module.cpp
parentc90f8fbd1a83ffeed6b0bb9d55e91f4a4a9b8641 (diff)
Kinect Point Tracker: Working on basic architecture.
Diffstat (limited to 'tracker-pt/module/module.cpp')
-rw-r--r--tracker-pt/module/module.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tracker-pt/module/module.cpp b/tracker-pt/module/module.cpp
index f665face..db3e8fac 100644
--- a/tracker-pt/module/module.cpp
+++ b/tracker-pt/module/module.cpp
@@ -2,6 +2,7 @@
#include "module.hpp"
#include "camera.h"
+#include "compat/camera-names.hpp"
#include "frame.hpp"
#include "point_extractor.h"
#include "ftnoir_tracker_pt_dialog.h"
@@ -18,6 +19,7 @@ static const QString module_name = "tracker-pt";
namespace pt_module {
+// Traits for OpenCV VideoCapture camera
struct pt_module_traits final : pt_runtime_traits
{
pointer<pt_camera> make_camera() const override
@@ -48,9 +50,22 @@ struct pt_module_traits final : pt_runtime_traits
struct tracker_pt : Tracker_PT
{
- tracker_pt() : Tracker_PT(pointer<pt_runtime_traits>(new pt_module_traits))
+ tracker_pt() : Tracker_PT(module_name)
{
}
+
+ pointer<pt_runtime_traits> create_traits() override
+ {
+ // Create different traits according to settings
+ if (s.camera_name().compare(KKinectIRSensor) == 0)
+ {
+ // Use Kinect IR trait
+ return pointer<pt_runtime_traits>(new pt_module_traits);
+ }
+
+ return pointer<pt_runtime_traits>(new pt_module_traits);
+ }
+
};
struct dialog_pt : TrackerDialog_PT