| | |
| | | #ifndef GLOBAL_DEFINE_H |
| | | #ifndef GLOBAL_DEFINE_H |
| | | #define GLOBAL_DEFINE_H |
| | | |
| | | #include <map> |
| | |
| | | #define CHKMAX(a,b) (((a) > (b)) ? (a) : (b)) |
| | | #define CHKMIN(a,b) (((a) < (b)) ? (a) : (b)) |
| | | |
| | | #define MAX_PANEL_SIDE 4 // 搁 荐 |
| | | #define UPDN_TYPE 2 // 惑窍 鞍捞 乐绰版快 2 窍唱父 乐绰版快 1 |
| | | #define MAX_PANEL_SIDE 4 // 搁 荐 |
| | | #define UPDN_TYPE 2 // 惑窍 鞍捞 乐绰版快 2 窍唱父 乐绰版快 1 |
| | | #define MAX_SIDE_COUNT 8 |
| | | #define MAX_CORNER_DIMENSION_MEASURE_COUNT 5 |
| | | #define MAX_SIDE_DIMENSION_MEASURE_COUNT 16 // 弥措 Frame 荐 父怒 |
| | | #define MAX_SIDE_DIMENSION_MEASURE_COUNT 16 // 弥措 Frame 荐 父怒 |
| | | |
| | | #define MAX_SIDE_EXCEPTION_AREA_COUNT 32 |
| | | #define MAX_SIDE_USER_DEFECT_AREA_COUNT 32 |
| | |
| | | |
| | | enum EmSplashCmd {emShow=0, emHide, emText}; |
| | | |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass 扁霖 Scan 规氢. |
| | | enum ScanDirectionIns { SD_Forward = 0, SD_Backward, SD_Unknown }; // Glass 扁霖 Scan 规氢. |
| | | enum DimensionDir { DIMENSION_A=0, DIMENSION_B, DIMENSION_C, DIMENSION_D,DIMENSION_A_DN, DIMENSION_B_DN, DIMENSION_C_DN, DIMENSION_D_DN, DIMENSION_NONE}; |
| | | enum EM_CORNER_JUDGE {A_ZONE_CRACK=0,B_ZONE_CRACK,B_ZONE_BURR,C_ZONE_CRACK,C_ZONE_BURR, D_ZONE_CRACK, EDGE_THINCRACK, CHIP_WHITE}; |
| | | |
| | |
| | | #define IMAGE_WIDTH 4096 // 8192//2048 |
| | | #define IMAGE_HEIGHT 1024 |
| | | #define MAX_IMAGE_FRAME 160//100 |
| | | #define MAX_IMAGE_FRAME_SHORT 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_LONG 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_SHORT 160//100 // 弥措 橇饭烙 荐 |
| | | #define MAX_IMAGE_FRAME_LONG 160//100 // 弥措 橇饭烙 荐 |
| | | |
| | | #define MAX_SIDE_INSPECT_AREA_COUNT 12 |
| | | |
| | | #define MAX_IMAGE_LINE_SHORT MAX_IMAGE_FRAME_SHORT * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_LONG MAX_IMAGE_FRAME_LONG * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_SHORT MAX_IMAGE_FRAME_SHORT * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_LONG MAX_IMAGE_FRAME_LONG * IMAGE_HEIGHT // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE MAX_IMAGE_LINE_LONG |
| | | #define MAX_LIMIT_LINE (MAX_IMAGE_FRAME - 1) * IMAGE_HEIGHT |
| | | |
| | | #define MAX_IMAGE_LINE_MARGIN ((MAX_IMAGE_FRAME+50) * IMAGE_HEIGHT) //(150 * IMAGE_HEIGHT) // 弥措 扼牢荐 |
| | | #define MAX_IMAGE_LINE_MARGIN ((MAX_IMAGE_FRAME+50) * IMAGE_HEIGHT) //(150 * IMAGE_HEIGHT) // 弥措 扼牢荐 |
| | | |
| | | #define ALIGN_4BYTE(width) (width + 3)/4*4 |
| | | #define PI 3.14159265358979323846 |
| | |
| | | #define MAX_SIDE_INSPECT_TYPE 8 |
| | | |
| | | struct WSSendData { |
| | | //=======================待定========================== |
| | | //uint8_t operation; // 操作符 (1字节) |
| | | //uint8_t operand; // 操作数 (1字节) |
| | | //uint16_t blockNumber; // 图像块编号 (2字节无符号整数) |
| | | //uint32_t dataOffset; // 数据偏移 (4字节无符号整数) |
| | | //=======================待定========================== |
| | | //uint8_t operation; // 操作符 (1字节) |
| | | //uint8_t operand; // 操作数 (1字节) |
| | | //uint16_t blockNumber; // 图像块编号 (2字节无符号整数) |
| | | //uint32_t dataOffset; // 数据偏移 (4字节无符号整数) |
| | | //===================================================== |
| | | |
| | | uint8_t nCheckType = 0; // 检测类型 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint8_t nPosition = 0; // 位置 |
| | | uint8_t nState = 0; // ״̬ |
| | | uint16_t nEdgeX = 0; // X方向边缘坐标 |
| | | uint16_t nEdgeY = 0; // X方向边缘坐标 |
| | | uint16_t nNPointY = 0; // Y方向NG区域坐标 |
| | | uint16_t nWidth = 0; // 图像宽度 |
| | | uint16_t nHeight = 0; // 图像高度 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | std::string strSN = ""; // 序列号 |
| | | std::vector<char> image = {}; // 图像数据 (二进制数据) |
| | | uint8_t nCheckType = 0; // 检测类型 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint8_t nPosition = 0; // 位置 |
| | | uint8_t nState = 0; // 状态 |
| | | uint16_t nEdgeX = 0; // X方向边缘坐标 |
| | | uint16_t nEdgeY = 0; // X方向边缘坐标 |
| | | uint16_t nNPointY = 0; // Y方向NG区域坐标 |
| | | uint16_t nWidth = 0; // 图像宽度 |
| | | uint16_t nHeight = 0; // 图像高度 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | std::string strSN = ""; // 序列号 |
| | | std::vector<char> image = {}; // 图像数据 (二进制数据) |
| | | }; |
| | | |
| | | struct WSReceiveData { |
| | | // 定义一个表示NG位置的结构体 |
| | | // 定义一个表示NG位置的结构体 |
| | | struct NGPosition { |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | uint16_t nRight = 0; // 在原图的位置 |
| | | uint16_t nBottom = 0; // 在原图的位置 |
| | | uint8_t nNGType = 0; // NG 类型 |
| | | uint16_t nLeft = 0; // 在原图的位置 |
| | | uint16_t nTop = 0; // 在原图的位置 |
| | | uint16_t nRight = 0; // 在原图的位置 |
| | | uint16_t nBottom = 0; // 在原图的位置 |
| | | }; |
| | | |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | std::string strSN = ""; // 序列号 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint8_t nGNum = 0; // NG 数量 |
| | | std::vector<NGPosition> ngPosArray = {}; // NG 位置数组 |
| | | uint8_t nRecipe = 0; // 配方 |
| | | uint8_t nLineType = 0; // 线别类型 |
| | | uint8_t nIndex = 0; // 图片序号 |
| | | uint8_t nFrameIdx = 0; // 帧序号 |
| | | uint8_t nScanIdx = 0; // 侧别 |
| | | std::string strSN = ""; // 序列号 |
| | | double dTimeStamp = 0.0; // 时间戳 |
| | | uint8_t nGNum = 0; // NG 数量 |
| | | std::vector<NGPosition> ngPosArray = {}; // NG 位置数组 |
| | | }; |
| | | |
| | | #endif // GLOBAL_DEFINE_H |