summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/math.hpp6
-rw-r--r--tracker-pt/module/point_extractor.cpp2
2 files changed, 1 insertions, 7 deletions
diff --git a/compat/math.hpp b/compat/math.hpp
index 1387324e..f05ebdc8 100644
--- a/compat/math.hpp
+++ b/compat/math.hpp
@@ -11,12 +11,6 @@ inline auto iround(t val) -> std::enable_if_t<std::is_floating_point_v<remove_cv
return (int)std::round(val);
}
-template<typename t>
-inline auto uround(t val) -> std::enable_if_t<std::is_floating_point_v<remove_cvref_t<t>>, unsigned>
-{
- return (unsigned)std::fmax(0, std::round(val));
-}
-
template <typename t>
force_inline
constexpr int signum(const t& x)
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index 2f84bf86..05af99a1 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -221,7 +221,7 @@ void PointExtractor::threshold_image(const cv::Mat& frame_gray, cv::Mat1b& outpu
const f radius = threshold_radius_value(frame_gray.cols, frame_gray.rows, threshold_slider_value);
float const* const __restrict ptr = hist.ptr<float>(0);
- const unsigned area = uround(3 * pi * radius*radius);
+ const unsigned area = unsigned(iround(3 * pi * radius*radius));
const unsigned sz = unsigned(hist.cols * hist.rows);
constexpr unsigned min_thres = 64;
unsigned thres = min_thres;