88 lines
2.4 KiB
C++
88 lines
2.4 KiB
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
class RecoatCheckCfg
|
|
{
|
|
public:
|
|
enum CheckType
|
|
{
|
|
WHOLE_PERCENTAGE = 0,
|
|
OVERLAP
|
|
};
|
|
|
|
RecoatCheckCfg();
|
|
~RecoatCheckCfg();
|
|
void GetUpdateSql(vector<string>& ups);
|
|
|
|
public:
|
|
bool m_Enable;
|
|
bool m_CheckOnPowderTest;
|
|
unsigned int m_MaskTopLeftX;
|
|
unsigned int m_MaskTopLeftY;
|
|
unsigned int m_MaskTopRightX;
|
|
unsigned int m_MaskTopRightY;
|
|
unsigned int m_MaskBottomLeftX;
|
|
unsigned int m_MaskBottomLeftY;
|
|
unsigned int m_MaskBottomRightX;
|
|
unsigned int m_MaskBottomRightY;
|
|
float m_TransformTopLeftX;
|
|
float m_TransformTopLeftY;
|
|
float m_TransformTopRightX;
|
|
float m_TransformTopRightY;
|
|
float m_TransformBottomLeftX;
|
|
float m_TransformBottomLeftY;
|
|
float m_TransformBottomRightX;
|
|
float m_TransformBottomRightY;
|
|
// 每个岛包含的未铺粉区域数目的阈值
|
|
unsigned int m_PerIslandCntThreshold;
|
|
// 单个未铺粉区域的面积阈值等于以层厚为半径的圆的面积乘以m_AreaThresholdFactor
|
|
float m_AreaThresholdFactor;
|
|
// 单个未铺粉区域的轮廓长度阈值等于层厚乘以m_LengthThresholdFactor
|
|
float m_LengthThresholdFactor;
|
|
// 重新铺粉尝试次数
|
|
unsigned int m_RetryTimes;
|
|
// 图像二值化阈值
|
|
unsigned int m_BinaryThreshold;
|
|
|
|
int m_CheckType;
|
|
float m_UncoverPercentage;
|
|
|
|
bool m_IsUpPartNotLight; //上部亮度不足
|
|
int m_ImageScale;
|
|
int m_GrayOffset;
|
|
public:
|
|
static string CONFIG_NAME;
|
|
static string FIELD_ENABLE;
|
|
static string FIELD_MASK_TOP_LEFT_X;
|
|
static string FIELD_MASK_TOP_LEFT_Y;
|
|
static string FIELD_MASK_TOP_RIGHT_X;
|
|
static string FIELD_MASK_TOP_RIGHT_Y;
|
|
static string FIELD_MASK_BOTTOM_LEFT_X;
|
|
static string FIELD_MASK_BOTTOM_LEFT_Y;
|
|
static string FIELD_MASK_BOTTOM_RIGHT_X;
|
|
static string FIELD_MASK_BOTTOM_RIGHT_Y;
|
|
static string FIELD_TRANSFORM_TOP_LEFT_X;
|
|
static string FIELD_TRANSFORM_TOP_LEFT_Y;
|
|
static string FIELD_TRANSFORM_TOP_RIGHT_X;
|
|
static string FIELD_TRANSFORM_TOP_RIGHT_Y;
|
|
static string FIELD_TRANSFORM_BOTTOM_LEFT_X;
|
|
static string FIELD_TRANSFORM_BOTTOM_LEFT_Y;
|
|
static string FIELD_TRANSFORM_BOTTOM_RIGHT_X;
|
|
static string FIELD_TRANSFORM_BOTTOM_RIGHT_Y;
|
|
static string FIELD_ISLAND_THRESHOLD;
|
|
static string FIELD_AREA_FACTOR;
|
|
static string FIELD_LENGTH_FACTOR;
|
|
static string FIELD_RETRY_TIMES;
|
|
static string FIELD_BINARY_THRESHOLD;
|
|
static string FIELD_CHECK_ON_POWDER_TEST;
|
|
static string FIELD_CHECK_TYPE;
|
|
static string FIELD_UNCOVER_PERCENTAGE;
|
|
static string FIELD_IS_UP_PART_NOT_LIGHT;
|
|
static string FIELD_IMAGE_SCALE;
|
|
static string FIELD_GRAY_OFFSET;
|
|
};
|
|
|