15 #include "opencv2/core.hpp"
16 #include "opencv2/imgproc.hpp"
24 float unclip_ratio,
float &distance);
26 cv::RotatedRect
UnClip(std::vector<std::vector<float>> box,
27 const float &unclip_ratio);
32 std::vector<std::vector<int>> pts);
37 float BoxScoreFast(std::vector<std::vector<float>> box_array, cv::Mat pred);
41 const cv::Mat pred,
const cv::Mat bitmap,
const float &box_thresh,
42 const float &det_db_unclip_ratio,
const std::string &det_db_score_mode);
45 std::vector<std::vector<std::vector<int>>> boxes,
46 const std::array<int, 4> &det_img_info);
49 static bool XsortInt(std::vector<int> a, std::vector<int> b);
51 static bool XsortFp32(std::vector<float> a, std::vector<float> b);
53 std::vector<std::vector<float>> Mat2Vector(cv::Mat mat);
55 inline int _max(
int a,
int b) {
return a >= b ? a : b; }
57 inline int _min(
int a,
int b) {
return a >= b ? b : a; }
60 inline T clamp(T x, T min, T max) {
61 if (x > max)
return max;
62 if (x < min)
return min;
66 inline float clampf(
float x,
float min,
float max) {
67 if (x > max)
return max;
68 if (x < min)
return min;
cv::RotatedRect UnClip(std::vector< std::vector< float >> box, const float &unclip_ratio)
std::vector< std::vector< std::vector< int > > > FilterTagDetRes(std::vector< std::vector< std::vector< int >>> boxes, const std::array< int, 4 > &det_img_info)
std::vector< std::vector< std::vector< int > > > BoxesFromBitmap(const cv::Mat pred, const cv::Mat bitmap, const float &box_thresh, const float &det_db_unclip_ratio, const std::string &det_db_score_mode)
float BoxScoreFast(std::vector< std::vector< float >> box_array, cv::Mat pred)
std::vector< std::vector< int > > OrderPointsClockwise(std::vector< std::vector< int >> pts)
float PolygonScoreAcc(std::vector< cv::Point > contour, cv::Mat pred)
float ** Mat2Vec(cv::Mat mat)
void GetContourArea(const std::vector< std::vector< float >> &box, float unclip_ratio, float &distance)
std::vector< std::vector< float > > GetMiniBoxes(cv::RotatedRect box, float &ssid)
#define NNDEPLOY_CC_API
api