diff --git a/deploy/lite/db_post_process.h b/deploy/lite/db_post_process.h index 20710af2..06dbcb2c 100644 --- a/deploy/lite/db_post_process.h +++ b/deploy/lite/db_post_process.h @@ -20,22 +20,22 @@ #include #include +#include "clipper.hpp" #include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" -#include "utils/clipper.hpp" -template -T clamp(T x, T min, T max) { - if (x > max) return max; - if (x < min) return min; +template T clamp(T x, T min, T max) { + if (x > max) + return max; + if (x < min) + return min; return x; } std::vector> Mat2Vector(cv::Mat mat); -void GetContourArea(std::vector> box, - float unclip_ratio, +void GetContourArea(std::vector> box, float unclip_ratio, float &distance); cv::RotatedRect Unclip(std::vector> box, float unclip_ratio); @@ -46,20 +46,17 @@ bool XsortFp32(std::vector a, std::vector b); bool XsortInt(std::vector a, std::vector b); -std::vector> OrderPointsClockwise( - std::vector> pts); +std::vector> +OrderPointsClockwise(std::vector> pts); std::vector> GetMiniBoxes(cv::RotatedRect box, float &ssid); float BoxScoreFast(std::vector> box_array, cv::Mat pred); -std::vector>> BoxesFromBitmap( - const cv::Mat pred, - const cv::Mat bitmap, - std::map Config); +std::vector>> +BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap, + std::map Config); -std::vector>> FilterTagDetRes( - std::vector>> boxes, - float ratio_h, - float ratio_w, - cv::Mat srcimg); +std::vector>> +FilterTagDetRes(std::vector>> boxes, float ratio_h, + float ratio_w, cv::Mat srcimg);