From d6663fe7b71db340b3c7a1d069c473f725caa3a8 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 29 Aug 2022 12:19:25 -0400 Subject: Trying to support the superior operating system. Also reformat a bit of legacy code. Smells like mold. --- imageutil.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'imageutil.hpp') diff --git a/imageutil.hpp b/imageutil.hpp index 15be98b..d453311 100644 --- a/imageutil.hpp +++ b/imageutil.hpp @@ -2,6 +2,7 @@ #define IMAGEUTIL_HPP #include +#include #include #include @@ -9,13 +10,15 @@ #define sqr(x) ((x) * (x)) -class image_util + + +namespace image_util { -public: - static cv::Mat crop(cv::InputArray s, double contrast_threshold, double max_crop_ratio); - static cv::Range crop_axis(cv::InputArray s, int axis, double contrast_threshold, double max_crop_ratio); - static double median(std::vector &v); - static cv::Mat blend_white(cv::Mat m); + cv::Mat crop(cv::InputArray s, double contrast_threshold, double max_crop_ratio); + cv::Range crop_axis(cv::InputArray s, int axis, double contrast_threshold, double max_crop_ratio); + double median(std::vector &v); + cv::Mat blend_white(cv::Mat m); + cv::Mat imread_path(const std::filesystem::path &p, int flags); template static double length(const compressed_vector &v, T center) -- cgit v1.2.3