summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/point_tracker.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-26 05:19:37 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-26 05:19:37 +0200
commit8513bdeba2f6380554963d97aa93654e2a2c554e (patch)
tree9dcb5d747a29e701a3c816e7b81cd22421afe2f7 /ftnoir_tracker_pt/point_tracker.h
parent9bcde553cb7d4b8f53399f0999d4b9cca3751410 (diff)
trackhat pt: style changes
Diffstat (limited to 'ftnoir_tracker_pt/point_tracker.h')
-rw-r--r--ftnoir_tracker_pt/point_tracker.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index 96a448de..2379de41 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -84,21 +84,28 @@ public:
P = 1.0/(s11*s22-s12*s12) * cv::Matx22f(s22, -s12, -s12, s11);
}
- enum { Cap = 0, Clip = 1 };
+ enum { Cap = 0, ClipRight = 1, ClipLeft = 2 };
void set_model(settings_pt& s)
{
- if (s.model_used == Cap)
+ switch (s.model_used)
+ {
+ default:
+ case Cap:
{
const double z = 100, x = 120, y = 60;
M01 = cv::Vec3f(-x, -y, -z);
M02 = cv::Vec3f(x, -y, -z);
+ break;
}
- else
+ case ClipLeft:
+ case ClipRight:
{
const double a = 27, b = 43, c = 62, d = 74;
M01 = cv::Vec3f(0, b, -a);
- M02 = cv::Vec3f(0, -c, -d);
+ M02 = cv::Vec3f(0, -c, -d);
+ break;
+ }
}
}