summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp2
-rw-r--r--tracker-pt/ftnoir_tracker_pt_dialog.cpp10
-rw-r--r--tracker-pt/module/camera.cpp2
-rw-r--r--tracker-pt/module/point_extractor.cpp2
-rw-r--r--tracker-pt/point_tracker.cpp11
-rw-r--r--tracker-pt/pt-api.cpp2
-rw-r--r--tracker-pt/pt-settings.hpp1
7 files changed, 22 insertions, 8 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index cafc973a..7589242d 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -108,7 +108,7 @@ void Tracker_PT::run()
video_widget->get_preview_size(w, h);
if (w != preview_width || h != preview_height)
{
- preview_width = w, preview_height = h;
+ preview_width = w; preview_height = h;
preview_frame = traits->make_preview(w, h);
}
}
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
index 2a156cbc..d900b78d 100644
--- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp
+++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp
@@ -123,10 +123,16 @@ QString TrackerDialog_PT::threshold_display_text(int threshold_value)
int w = s.cam_res_x, h = s.cam_res_y;
if (w * h <= 0)
- w = 640, h = 480;
+ {
+ w = 640;
+ h = 480;
+ }
if (tracker && tracker->get_cam_info(&info) && info.res_x * info.res_y != 0)
- w = info.res_x, h = info.res_y;
+ {
+ w = info.res_x;
+ h = info.res_y;
+ }
double value = pt_point_extractor::threshold_radius_value(w, h, threshold_value);
diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp
index f9d9ff48..86cffd72 100644
--- a/tracker-pt/module/camera.cpp
+++ b/tracker-pt/module/camera.cpp
@@ -88,7 +88,7 @@ bool Camera::start(int idx, int fps, int res_x, int res_y)
if (idx >= 0 && fps >= 0 && res_x >= 0 && res_y >= 0)
{
if (cam_desired.idx != idx ||
- cam_desired.fps != fps ||
+ (int)cam_desired.fps != fps ||
cam_desired.res_x != res_x ||
cam_desired.res_y != res_y ||
!cap || !cap->isOpened() || !cap->grab())
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index c0756a40..80d9dfc2 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -285,7 +285,7 @@ void PointExtractor::extract_points(const pt_frame& frame_, pt_preview& preview_
// XXX we could go to the next scanline unless the points are really small.
// i'd expect each point being present on at least one unique scanline
// but it turns out some people are using 2px points -sh 20180110
-#if BROKEN && 0
+#if defined BROKEN && 0
break;
#endif
}
diff --git a/tracker-pt/point_tracker.cpp b/tracker-pt/point_tracker.cpp
index 103228f5..e295a4c9 100644
--- a/tracker-pt/point_tracker.cpp
+++ b/tracker-pt/point_tracker.cpp
@@ -182,7 +182,7 @@ bool PointTracker::maybe_use_old_point_order(const PointOrder& order, const pt_c
if (cnt1 + cnt2)
{
qDebug() << "old-order" << ((cnt1 * 100) / f(cnt1 + cnt2)) << "nsamples" << (cnt1 + cnt2);
- cnt1 = 0, cnt2 = 0;
+ cnt1 = 0; cnt2 = 0;
}
}
if (validp)
@@ -248,6 +248,11 @@ PointTracker::PointOrder PointTracker::find_correspondences(const vec2* points,
return p;
}
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wfloat-equal"
+#endif
+
int PointTracker::POSIT(const PointModel& model, const PointOrder& order, f focal_length)
{
// POSIT algorithm for coplanar points as presented in
@@ -399,6 +404,10 @@ int PointTracker::POSIT(const PointModel& model, const PointOrder& order, f foca
return i;
}
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
+
vec2 PointTracker::project(const vec3& v_M, f focal_length)
{
return project(v_M, focal_length, X_CM);
diff --git a/tracker-pt/pt-api.cpp b/tracker-pt/pt-api.cpp
index d137a60a..128dcaea 100644
--- a/tracker-pt/pt-api.cpp
+++ b/tracker-pt/pt-api.cpp
@@ -45,7 +45,7 @@ std::tuple<double, double> pt_pixel_pos_mixin::to_pixel_pos(double x, double y,
std::tuple<double, double> pt_pixel_pos_mixin::to_screen_pos(double px, double py, int w, int h)
{
- px *= w/(w-1.), py *= h/(h-1.);
+ px *= w/(w-1.); py *= h/(h-1.);
return std::make_tuple((px - w/2.)/w, -(py - h/2.)/w);
}
diff --git a/tracker-pt/pt-settings.hpp b/tracker-pt/pt-settings.hpp
index 2027302b..df45b499 100644
--- a/tracker-pt/pt-settings.hpp
+++ b/tracker-pt/pt-settings.hpp
@@ -62,7 +62,6 @@ struct pt_settings final : options::opts
value<slider_value> threshold_slider { b, "threshold-slider", { 128, 0, 255 } };
explicit pt_settings(const QString& name) : opts(name) {}
- ~pt_settings() override = default;
};
#ifdef __clang__