/* * @Author: xiewenji 527774126@qq.com * @Date: 2025-09-25 16:25:30 * @LastEditors: xiewenji 527774126@qq.com * @LastEditTime: 2025-09-25 17:16:49 * @FilePath: /BOE_POL_ET_Detect/AlgorithmModule/include/AI_Mark_Det.h * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ /* //实现对部分缺陷 需要进行 数量 和距离上分析的 */ #ifndef AI_ZF_Det_H_ #define AI_ZF_Det_H_ #include #include "CheckUtil.hpp" #include "OtherDetect.h" #include "OtherDetBaseDefine.h" #include "CheckErrorCodeDefine.hpp" #include "ImageDetConfig.h" #include "CheckConfigDefine.h" #include "ImageStorage.h" #include "AI_Factory.h" using namespace std; using namespace cv; // 二次分割求面积 class AI_ZF_Det { public: // 检测参数和结果 struct DetConfigResult { std::string strCamName; int nresult; std::shared_ptr pZF_Result; bool bDebugsaveimg; bool bDetSaveImg; std::shared_ptr pdetlog; DetConfigResult() { nresult = -1; strCamName = ""; bDebugsaveimg = false; bDetSaveImg = false; } }; public: AI_ZF_Det(/* args */); ~AI_ZF_Det(); int Detect(const cv::Mat &img, DetConfigResult *pDetConfig); private: int Det_img(const cv::Mat &img, DetConfigResult *pDetConfig); // 分析结果 int Analysisy(const cv::Mat &maskImg, DetConfigResult *pDetConfig); // 存储过程图片 int SaveProcessImg(const cv::Mat &inImg, const cv::Mat &outImg, const cv::Mat &oldmask, DetConfigResult *pDetConfig); private: bool m_bModelSucc; cv::Mat detimg123; ImageStorage *m_pImageStorage; std::shared_ptr AI_Factory; std::shared_ptr m_pdetlog; int m_Show_Area; float m_Show_Len; cv::Point m_Len_P1; cv::Point m_Len_P2; private: /* data */ }; #endif