You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.2 KiB

/*
//其他类的检测
*/
#ifndef OtherDetect_H_
#define OtherDetect_H_
#include <opencv2/opencv.hpp>
#include "CheckUtil.hpp"
#include "OtherDetBaseDefine.h"
#include "CheckErrorCodeDefine.hpp"
using namespace std;
using namespace cv;
// 基础类
class AIDetectBase
{
public:
AIDetectBase(/* args */);
~AIDetectBase();
int Init(OtherDet_Config *pOtherDet_Config);
protected:
OtherDet_Config *m_pOtherDet_Config;
bool m_bInitialized;
bool m_bModelSucc;
};
// 缺pol 检测
class LackPolDet : public AIDetectBase
{
public:
/// @brief 检测过程的参数
struct DetConfig
{
float fImgage_Scale_X;
float fImgage_Scale_Y;
bool bSaveResultImg; // 保存结果图片
std::string strChannel; // 通道名称
cv::Mat detMaskImg; // 检测区域图片
DetConfig()
{
Init();
}
void Init()
{
fImgage_Scale_X = 0.03f;
fImgage_Scale_Y = 0.03f;
bSaveResultImg = false;
strChannel = "";
}
void Print()
{
printf("bSaveResultImg %s strChannel %s\n",
BOOL_TO_STR(bSaveResultImg), strChannel.c_str());
}
};
public:
LackPolDet(/* args */);
~LackPolDet();
int InitModel_ALL();
int Detect(const cv::Mat &img, DetConfig *pDetConfig, cv::Mat &outMask);
private:
int Init_LackPol();
public:
private:
};
#endif