#pragma once #include "Global_Define.h" // 弥措 橇饭烙 160, 1橇饭烙 1024, 256栏肺 唱床辑 八荤窍搁 1橇饭烙俊 4 = 640俺 沥档 #define MAX_INSPECT_AREA_LIST 1024 class CSide_Data { public: CSide_Data(void); ~CSide_Data(void); void Reset(); void SetFrameProc(int nFrameIdx); BOOL GetFrameProc(int nFrameIdx); public: // Pixel Size.. double m_dPixelSizeX; double m_dPixelSizeY; BOOL m_bInspection_Complete; // 八荤 肯丰 犬牢 // Start Line BOOL m_bFindGlassStartLine; int m_nGlassStartLine; int m_nGlassStartFrame; // Pre End Line int m_nPreGlassEndLine; // 抗惑登绰 End Line int m_nPreGlassEndFrame; // End Line BOOL m_bFindGlassEndLine; int m_nGlassEndLine; // Find End Line int m_nGlassEndFrame; // Judge Line int m_nCenterJudgeArea_Start; int m_nCenterJudgeArea_End; // Top / Bottom Corner Area BOOL m_bTopCorner_Find; CRect m_rtTopCornerArea; CRect m_rtTopCornerArea_Offset; CRect m_rtTopCornerArea_Ins; int m_nTopCornerShape; // 0 : None, 1 : CCut, 2 : RCut BOOL m_bTopCorner_Measure; BOOL m_bBotCorner_Find; CRect m_rtBotCornerArea; CRect m_rtBotCornerArea_Offset; CRect m_rtBotCornerArea_Ins; int m_nBotCornerShape; BOOL m_bBotCorner_Measure; // Top Mark Info BOOL m_bTopMark_Find; CRect m_rtTopMark_SearchArea; CPoint m_ptTopMark_FindResult; CRect m_rtTopMark_FindResult; int m_nTopMarkToEdge_X_pxl; int m_nTopMarkToEdge_Y_pxl; // Bottom Mark Info BOOL m_bBotMark_Find; CRect m_rtBotMark_SearchArea; CPoint m_ptBotMark_FindResult; CRect m_rtBotMark_FindResult; int m_nBotMarkToEdge_X_pxl; int m_nBotMarkToEdge_Y_pxl; // Scan Start锭 固府 拌魂秦辑 静磊.. double m_dCamResolutionX; double m_dCamResolutionY; // Frame 喊 茫篮 Side Line... double m_nSideLineFrame[MAX_IMAGE_FRAME]; // Frame Side Line double m_nSide_Chamfer_LineFrame[MAX_IMAGE_FRAME]; // Frame Side Line int m_nSideLinePosY[MAX_IMAGE_FRAME]; // Frame Side Real Y BOOL m_bSideLine_NG[MAX_IMAGE_FRAME]; // OK, NG CRect m_rtInspectArea[MAX_IMAGE_FRAME]; int m_nSideInspectAreaCount[MAX_IMAGE_FRAME]; CRect m_rtSideInspectArea[MAX_IMAGE_FRAME][MAX_SIDE_INSPECT_AREA_COUNT]; CRect m_rtInspectArea_InsType[MAX_SIDE_INSPECT_TYPE][MAX_IMAGE_FRAME]; // 八荤 康开 int m_nSideFilterLine_InsType[MAX_SIDE_INSPECT_TYPE][MAX_IMAGE_FRAME]; // Side Filter Line // Measure Dimension BOOL m_bSideMeasureLine[MAX_SIDE_DIMENSION_MEASURE_COUNT]; CPoint m_ptSideMeasure_Start[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // Measure Align Line.. int m_nSideMeasure_CutLine_Status[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptSideMeasure_CutLine[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // Measure Glass Cut Line.. double m_dSideMeasrue_CutLine_Result_mm[MAX_SIDE_DIMENSION_MEASURE_COUNT]; double m_dSideMeasrue_CutLine_Offset_mm[MAX_SIDE_DIMENSION_MEASURE_COUNT]; int m_nSideMeasure_ChamferLine_Status[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptSideMeasure_ChamferLine[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // Measure Chamfer Line.. double m_dSideMeasrue_Chamfer_Result_mm[MAX_SIDE_DIMENSION_MEASURE_COUNT]; // Top Corner Measure Dimension int m_nTopCornerMeasure_CutLine_Status[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptTopCornerMeasure_CutLine[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // Measure Chamfer Line.. double m_dTopCornerMeasrue_CutLine_Result_mm[MAX_CORNER_DIMENSION_MEASURE_COUNT]; int m_nTopCornerMeasure_Chamfer_Status[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptTopCornerMeasure_Chamfer[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // Measure Chamfer Line.. double m_dTopCornerMeasrue_Chamfer_Result_mm[MAX_CORNER_DIMENSION_MEASURE_COUNT]; BOOL m_bTopCornerMeasureResult; CRect m_rtTopCornerResult[2]; int m_nTopCornerWidth; int m_nTopCornerHeight; // Bot Corner Measure Dimension int m_nBotCornerMeasure_CutLine_Status[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptBotCornerMeasure_CutLine[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // Measure Chamfer Line.. double m_dBotCornerMeasrue_CutLine_Result_mm[MAX_CORNER_DIMENSION_MEASURE_COUNT]; int m_nBotCornerMeasure_Chamfer_Status[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : ng CPoint m_ptBotCornerMeasure_Chamfer[MAX_CORNER_DIMENSION_MEASURE_COUNT]; // Measure Chamfer Line.. double m_dBotCornerMeasrue_Chamfer_Result_mm[MAX_CORNER_DIMENSION_MEASURE_COUNT]; BOOL m_bBottomMeasureResult; CRect m_rtBottomCornerResult[2]; int m_nBottomCornerWidth; int m_nBottomCornerHeight; // Notch BOOL m_bNotchInspection_Complete; int m_nNotchCount; CRect m_rtNotchArea_pxl[MAX_SIDE_NOTCH_COUNT]; char m_strNotchMeasure_Comment[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT][256]; CPoint m_ptNotch_Reference[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; CPoint m_ptNotch_Dimension_Edge[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; int m_nNotch_Dimension_Edge_Judge[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : over, 3 : under double m_dNotch_Dimension_Edge_Result_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Dimension_Edge_Result_Diff_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Dimension_Edge_Judge_Std_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Dimension_Edge_Judge_Min_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Dimension_Edge_Judge_Max_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; CPoint m_ptNotch_Chamfer_Edge[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; int m_nNotch_Chamfer_Edge_Judge[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; // 0 : None, 1 : ok, 2 : over, 3 : under double m_dNotch_Chamfer_Edge_Result_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Chamfer_Edge_Result_Diff_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Chamfer_Edge_Judge_Std_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Chamfer_Edge_Judge_Min_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; double m_dNotch_Chamfer_Edge_Judge_Max_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_MEASURE_COUNT]; // Notch Circle int m_nNotchCircleCount[MAX_SIDE_NOTCH_COUNT]; int m_nNotchCircle_Radius_Judge[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; // 0 : None, 1 : ok, 2 : over, 3 : under CRect m_rtNotchCircleArea_pxl[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; CPoint m_ptNotchCircle_Center_pxl[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Result_X_pxl[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Result_Y_pxl[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Result_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Result_Diff_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Judge_Std_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Judge_Min_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; double m_ptNotchCircle_Radius_Judge_Max_um[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT]; char m_strNotchCircle_Radius_Comment[MAX_SIDE_NOTCH_COUNT][MAX_SIDE_NOTCH_CIRCLE_COUNT][256]; // Exception int m_nExceptionAreaCount; CRect m_rtExceptionArea_pxl[MAX_SIDE_EXCEPTION_AREA_COUNT]; // User Defect int m_nUserDefectAreaCount; CRect m_rtUserDefectArea_pxl[MAX_SIDE_USER_DEFECT_AREA_COUNT]; // Defect int m_nTotalDefectCount; int m_nNgDefectCount; // Thread Processing.. BOOL m_nFrameThreadProc[MAX_IMAGE_FRAME]; // Thread啊 瘤唱埃 Frame阑 眉农窍磊.. CCriticalSection m_csFrameThread; };