summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-30 15:40:24 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-30 15:40:24 +0100
commitb7eb4245fe6dc261a926d31331b2af3fec959401 (patch)
tree19517bd146ae25a10c45ab0878f67ea38cc4a92b /FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h
parent6adbfba397237340a2db9d1b0b4c7726cc5df94c (diff)
pt: use new settings framework, cleanup
Diffstat (limited to 'FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h')
-rw-r--r--FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h137
1 files changed, 69 insertions, 68 deletions
diff --git a/FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h b/FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h
index 91a7a8d5..8c590db2 100644
--- a/FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h
+++ b/FTNoIR_Tracker_PT/ftnoir_tracker_pt_settings.h
@@ -11,80 +11,81 @@
#include <opencv2/opencv.hpp>
#include "point_tracker.h"
+#include "facetracknoir/options.hpp"
+using namespace options;
-//-----------------------------------------------------------------------------
-// Tracker settings and their ini-IO
-struct TrackerSettings
-{
- // camera
- int cam_index;
- float cam_f;
- int cam_res_x;
- int cam_res_y;
- int cam_fps;
- int cam_roll;
- int cam_pitch;
- int cam_yaw;
-
- // point extraction
- int threshold;
- int threshold_secondary;
-
- int min_point_size;
- int max_point_size;
-
- // point tracking
- cv::Vec3f M01;
- cv::Vec3f M02;
- bool dyn_pose_res;
-
- // head to model translation
- cv::Vec3f t_MH;
-
- int sleep_time; // in ms
- int reset_time; // in ms
- bool video_widget;
+struct settings
+{
+ pbundle b;
+ value<int> cam_index,
+ cam_res_x,
+ cam_res_y,
+ cam_fps,
+ cam_roll,
+ cam_pitch,
+ cam_yaw,
+ threshold,
+ threshold_secondary,
+ min_point_size,
+ max_point_size;
+ value<double> cam_f;
- bool bEnableRoll;
- bool bEnablePitch;
- bool bEnableYaw;
- bool bEnableX;
- bool bEnableY;
- bool bEnableZ;
+ value<int> m01_x, m01_y, m01_z;
+ value<int> m02_x, m02_y, m02_z;
+ value<bool> dyn_pose_res, video_widget;
- void load_ini();
- void save_ini() const;
-};
+ value<int> t_MH_x, t_MH_y, t_MH_z;
+ value<int> sleep_time, reset_time;
-//-----------------------------------------------------------------------------
-// Settings specific to the tracker dialog and their ini-IO
-struct TrackerDialogSettings
-{
- enum
- {
- MODEL_CLIP,
- MODEL_CAP,
- MODEL_CUSTOM
- };
- int active_model_panel;
+ value<bool> bEnableYaw, bEnablePitch, bEnableRoll;
+ value<bool> bEnableX, bEnableY, bEnableZ;
- int M01x;
- int M01y;
- int M01z;
- int M02x;
- int M02y;
- int M02z;
- int clip_ty;
- int clip_tz;
- int clip_by;
- int clip_bz;
- int cap_x;
- int cap_y;
- int cap_z;
+ value<int> clip_ty, clip_tz, clip_by, clip_bz;
+ value<int> active_model_panel, cap_x, cap_y, cap_z;
- void load_ini();
- void save_ini() const;
+ settings() :
+ b(bundle("tracker-pt")),
+ cam_index(b, "camera-index", 0),
+ cam_res_x(b, "camera-res-width", 640),
+ cam_res_y(b, "camera-res-height", 480),
+ cam_fps(b, "camera-fps", 30),
+ cam_roll(b, "camera-roll", 1),
+ cam_pitch(b, "camera-pitch", 0),
+ cam_yaw(b, "camera-yaw", 0),
+ threshold(b, "threshold-primary", 128),
+ threshold_secondary(b, "threshold-secondary", 128),
+ min_point_size(b, "min-point-size", 10),
+ max_point_size(b, "max-point-size", 50),
+ cam_f(b, "camera-focal-length", 1),
+ m01_x(b, "m_01-x", 0),
+ m01_y(b, "m_01-y", 0),
+ m01_z(b, "m_01-z", 0),
+ m02_x(b, "m_02-x", 0),
+ m02_y(b, "m_02-y", 0),
+ m02_z(b, "m_02-z", 0),
+ dyn_pose_res(b, "dynamic-pose-resolution", false),
+ video_widget(b, "video-widget", true),
+ t_MH_x(b, "model-centroid-x", 0),
+ t_MH_y(b, "model-centroid-y", 0),
+ t_MH_z(b, "model-centroid-z", 0),
+ sleep_time(b, "sleep-time", 0),
+ reset_time(b, "reset-time", 0),
+ bEnableYaw(b, "enable-yaw", true),
+ bEnablePitch(b, "enable-pitch", true),
+ bEnableRoll(b, "enable-roll", true),
+ bEnableX(b, "enable-x", true),
+ bEnableY(b, "enable-y", true),
+ bEnableZ(b, "enable-z", true),
+ clip_ty(b, "clip-ty", 0),
+ clip_tz(b, "clip-tz", 0),
+ clip_by(b, "clip-by", 0),
+ clip_bz(b, "clip-bz", 0),
+ active_model_panel(b, "active-model-panel", 0),
+ cap_x(b, "cap-x", 0),
+ cap_y(b, "cap-y", 0),
+ cap_z(b, "cap-z", 0)
+ {}
};
-#endif //FTNOIR_TRACKER_PT_SETTINGS_H \ No newline at end of file
+#endif //FTNOIR_TRACKER_PT_SETTINGS_H