#ifndef Side_Detect_H_ #define Side_Detect_H_ #include "BaseInclude.h" #include "AI_Moudel.hpp" #include "BlobBase.h" class Side_Detect : public ImgCheckBase { public: Side_Detect(); ~Side_Detect(); // 初始化参数 pconfig 参数指针 返回:0 成功 其他异常 int RunStart(void *pconfig1 = NULL); // 阻塞式检测 int CheckImg(std::shared_ptr p, std::shared_ptr &pResult); // 更新参数 pconfig 参数指针,nConfigType 需要更新的参数类型 返回:0 成功 其他异常 int UpdateConfig(void *pconfig, int nConfigType); public: private: // 检测 int CheckRun(); // 初始化数据 int CheckImgInit(); // 初始化模型 int InitModel(); int Thread_Run(const cv::Mat &img); int Draw(const cv::Mat &img, cv::Mat &resultimg); int GetBlob(cv::Mat maskImg); int ImgAlinRotate(const cv::Mat &img, cv::Mat &alignImg); int DetectImg(const cv::Mat &img); private: int m_nErrorCode; // 错误代码 std::shared_ptr DetImgInfo_shareP; std::shared_ptr m_CheckResult_shareP; std::shared_ptr m_AIModelConfigList; std::shared_ptr m_CheckBaseConfig; RunInfoST m_pRunConfig; ERROR_DOTS_BLOBS m_blob; bool bwriteImg; bool m_Update_config; std::vector m_resultList; cv::Rect m_AlignMaxRoi; cv::Mat m_resultImg; cv::Mat m_reconstructImg; }; #endif