summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-26 15:54:58 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-26 15:54:58 +0200
commit829b046649d3de6a37dd0983f3e3beb8f033e19e (patch)
treebf35f0f82263fec7e3b69520ede4178621c29be3 /tracker-pt
parent36d52b1d84f057712b0be1791a9b7981ee455495 (diff)
gui: remove several user-visible settings
- dynamic pose is now enable iff current model is cap - dynamic pose timeout is now always 500 ms - fov is now always 75
Diffstat (limited to 'tracker-pt')
-rwxr-xr-xtracker-pt/ftnoir_tracker_pt.cpp16
-rw-r--r--tracker-pt/ftnoir_tracker_pt_settings.h8
-rw-r--r--tracker-pt/point_tracker.h4
3 files changed, 6 insertions, 22 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 8b0075d1..04d5b526 100755
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -58,17 +58,7 @@ void Tracker_PT::reset_command(Command command)
bool Tracker_PT::get_focal_length(double& ret)
{
- int fov_;
- switch (s.fov)
- {
- default:
- case 0:
- fov_ = 56;
- break;
- case 1:
- fov_ = 75;
- break;
- }
+ static constexpr const double fov_ = 75;
QMutexLocker l(&camera_mtx);
CamInfo info;
@@ -135,8 +125,8 @@ void Tracker_PT::run()
point_tracker.track(points,
PointModel(s),
fx,
- s.dynamic_pose,
- s.init_phase_timeout,
+ s.model_used == PointModel::Cap,
+ 500,
info.res_x,
info.res_y);
ever_success = true;
diff --git a/tracker-pt/ftnoir_tracker_pt_settings.h b/tracker-pt/ftnoir_tracker_pt_settings.h
index d2f19276..72816f98 100644
--- a/tracker-pt/ftnoir_tracker_pt_settings.h
+++ b/tracker-pt/ftnoir_tracker_pt_settings.h
@@ -18,11 +18,8 @@ struct settings_pt : opts
value<double> min_point_size, max_point_size;
value<int> t_MH_x, t_MH_y, t_MH_z;
- value<int> fov, camera_mode;
- value<int> model_used;
+ value<int> camera_mode, model_used;
- value<bool> dynamic_pose;
- value<int> init_phase_timeout;
value<bool> auto_threshold;
settings_pt() :
@@ -33,11 +30,8 @@ struct settings_pt : opts
t_MH_x(b, "model-centroid-x", 0),
t_MH_y(b, "model-centroid-y", 0),
t_MH_z(b, "model-centroid-z", 0),
- fov(b, "camera-fov", 1),
camera_mode(b, "camera-mode", 0),
model_used(b, "model-used", 0),
- dynamic_pose(b, "dynamic-pose-resolution", true),
- init_phase_timeout(b, "init-phase-timeout", 500),
auto_threshold(b, "automatic-threshold", false)
{}
};
diff --git a/tracker-pt/point_tracker.h b/tracker-pt/point_tracker.h
index 77c07125..e3ad81b6 100644
--- a/tracker-pt/point_tracker.h
+++ b/tracker-pt/point_tracker.h
@@ -55,6 +55,8 @@ class PointModel
{
friend class PointTracker;
public:
+ enum { Cap = 0, ClipRight = 1, ClipLeft = 2 };
+
static constexpr int N_POINTS = 3;
cv::Vec3d M01; // M01 in model frame
@@ -80,8 +82,6 @@ public:
void set_model(settings_pt& s)
{
- enum { Cap = 0, ClipRight = 1, ClipLeft = 2 };
-
switch (s.model_used)
{
default: