/* //图片基本处理 */ #ifndef AIClassify_H_ #define AIClassify_H_ #include using namespace std; struct AI_PIECE_INFO { int num; int len; int abs_L; int long_num; int short_num; AI_PIECE_INFO() { num = 0; len = 0; abs_L = 0; long_num = 0; short_num = 0; } void print(std::string str) { printf("%s>> num %d len %d abs_L %d long_num %d short_num %d\n", str.c_str(), num, len, abs_L, long_num, short_num); } }; struct AI_Classify_Info { int num; // 数量 float score; // 得分 float avgScore; // 平均得分 AI_Classify_Info() { Init(); } void Init() { num = 0; score = 0; avgScore = 0; } void print(std::string str) { printf("%s==== num %d score %f avgScore %f\n", str.c_str(), num, score, avgScore); } }; class AIClassify { public: AIClassify(); ~AIClassify(); // 分类 int GetDetRoiList(const cv::Mat &src_Img, cv::Rect qx_roi, std::vector &samllRoiList,int nwidth,int nheight); private: cv::Rect GetCutRoi(cv::Rect roi, const cv::Mat &img,int nwidth,int nheight); // 获取检测roi list private: }; #endif