mrDarker
2025-07-14 1c0ac1c7924efb8a2cb6962d3eda4126533a5ac8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Defect.h: interface for the CInspectDefect class.
//
//////////////////////////////////////////////////////////////////////
 
#if !defined(AFX_DEFECT_H__DD976308_A5AC_4A1B_AF4D_BE22406E7973__INCLUDED_)
#define AFX_DEFECT_H__DD976308_A5AC_4A1B_AF4D_BE22406E7973__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
#define MAX_DEFECT_COUNT    1000
 
#include <map>
#include <vector>
 
class CInspectDefect : public CObject
{
public:
    CInspectDefect();
    virtual ~CInspectDefect();
    CInspectDefect(const CInspectDefect& rhs);
    CInspectDefect& operator=(const CInspectDefect& rhs);
    CInspectDefect& operator+(const CInspectDefect &rhs);
 
    void            Merge(const CInspectDefect& rhs);
 
    void            ResetDefect();
 
    void            SetPixelConv(int nValue)        { m_nPixelAccumConv = nValue; }
    void            SetPixelScan(int nValue)        { m_nPixelAccumScan = nValue; }
 
    int                GetPixelScan()                    { return m_nPixelAccumScan; }
    int                GetPixelConv()                    { return m_nPixelAccumConv; }
 
    int                m_nGlassDefectIdx;            // Glass Áß¿¡¼­ÀÇ À妽º.
    int                m_nRawDefectIdx;            // °á°úÆÄÀÏ À妽º.
    // ¼ö½Å °á°ú
    short            m_nCameraIP;
    short            m_nCameraID;
    short            m_nScanIdx;
    short            m_nDir;
    short            m_nDefectIdx;                // Ä«¸Þ¶ó¿¡¼­ÀÇ °áÇÔ À妽º
    BOOL            m_bJudgeDefect;
    short            m_nProfileIdx;
 
public:
    int                m_nPixelConv;                // pixel ´ÜÀ§ ÁÂÇ¥
    int                m_nPixelScan;                // pixel ´ÜÀ§ ÁÂÇ¥
    int                m_nPixelAccumConv;            // pixel ¹«°ÔÁֽɠÁÂÇ¥
    int                m_nPixelAccumScan;            // pixel ¹«°ÔÁֽɠÁÂÇ¥
 
public:
    short            m_nPixelSize;                // °áÇÔÅ©±â        ---------------------------------PS    
    short            m_sPixelWidth;                // Çȼ¿´ÜÀ§ °áÇÔ ³Êºñ
    short            m_sPixelHeight;                // Çȼ¿´ÜÀ§ °áÇÔ ³ôÀÌ
    short            m_nLevelSrcMin;                // °áÇÔ ¹à±â Min    -----------------------------SN
    short            m_nLevelSrcMax;                // °áÇÔ ¹à±â Max    -----------------------------SX
    short            m_nLevelSrcAvg;                // °áÇÔ ¹à±â Avg    -----------------------------SA
    short            m_nLevelRefMin;                // ºñ±³´ë»ó ¹à±â Min    -------------------------RN
    short            m_nLevelRefMax;                // ºñ±³´ë»ó ¹à±â Max    -------------------------RX
    short            m_nLevelRefAvg;                // ºñ±³´ë»ó ¹à±â Avg    -------------------------RA
    short            m_nLevelDiffMin;            // ºñ±³Â÷ Min    ---------------------------------DN
    short            m_nLevelDiffMax;            // ºñ±³Â÷ Max    ---------------------------------DX
    short            m_nLevelDiffAvg;            // ºñ±³Â÷ Avg    ---------------------------------DA
 
    int                m_nDefectRScale;            // Çȼ¿´ÜÀ§ °áÇÔ ³ôÀÌ    -------------------------RS
    short            m_sThreshold;                // °áÇÔÀ» °ËÃâÇÒ ¶§ÀÇ Threshold
    short            m_sDefectPeak;                // °áÇÔÀÇ Peak.
    short            m_sDefectType;                // °áÇԠŸÀÔ
 
    int                m_nPixelGlassStart;            // Glass ½ÃÀÛ Çȼ¿
    short            m_sDefectLoc;
    short            m_sSplineLoc;
    DWORD            m_dwTickCount;
    int                m_nSideLoc;
    int                m_nCameraDir;
 
    // ¿¬»ê °á°ú.
    int                m_nUMOriginX;                // um´ÜÀ§ xÁÂÇ¥ (¿øÁ¡±âÁØ)
    int                m_nUMOriginY;                // um´ÜÀ§ yÁ¶Ç¥ (¿øÁ¡±âÁØ)
    int                m_nUMSizeX;                    // um´ÜÀ§ X Å©±â    -----------------------------UX
    int                m_nUMSizeY;                    // um´ÜÀ§ Y Å©±â    -----------------------------UY
    int                m_nUMSize;                    // um´ÜÀ§ Å©±â.    
 
    CString            m_strDefectPath;
};
 
typedef std::multimap<int, CInspectDefect*>            MapDefect;
typedef std::multimap<int, CInspectDefect*>::iterator    MapDefectIt;
 
#endif // !defined(AFX_DEFECT_H__DD976308_A5AC_4A1B_AF4D_BE22406E7973__INCLUDED_)