?? dlgclusterpatternrecog.h
字號:
#if !defined(AFX_DLGCLUSTERPATTERNRECOG_H__ABF672C9_CA52_4CE5_B651_EA64B47B417F__INCLUDED_)
#define AFX_DLGCLUSTERPATTERNRECOG_H__ABF672C9_CA52_4CE5_B651_EA64B47B417F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgClusterPatternRecog.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDlgClusterPatternRecog dialog
class CDlgClusterPatternRecog : public CDialog
{
// Construction
public:
CDlgClusterPatternRecog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDlgClusterPatternRecog)
enum { IDD = IDD_DIALOG_PATTERNRECOG_C3 };
CTabCtrl m_tabctlPRCoordinate;
int m_nClassNumber;
int m_nThreshold;
int m_nIterativeNumber;
int m_nCurrentIterate;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgClusterPatternRecog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDlgClusterPatternRecog)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnButtonPrExit();
afx_msg void OnRadioCoordinateB();
afx_msg void OnRadioCoordinateG();
afx_msg void OnRadioCoordinateR();
afx_msg void OnButtonPrUpdate();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMenuPr3KmeanBeginsample();
afx_msg void OnMenuPr3KmeanEndsample();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnButtonPrAccept();
afx_msg void OnButtonPrRecognize();
afx_msg void OnButtonPrRestore();
afx_msg void OnRadioRandom();
afx_msg void OnRadioSequent();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public: //自定義成員函數
void DrawImage();
void DrawCurSamplePoint(tagRGBVal rgb);
void Draw2DimetionAxis(CDC* pDC,int nWhichNoUse);
public: //成員變量
void DrawCCenterDisplayInfo();
void DrawClusterCnterWhenUpdate();
void DrawDataPoint(CDC* pDC,int nWhichNoUse);
void DrawRecognizedImage();
void SetImageColorValue(long Index,tagRGBVal rgb);
void ModifyImageWithClassInfo();
long GetTwoSamplePointDistance(tagRGBVal P1,tagRGBVal P2);
int JudgeSampleClass(tagRGBVal rgb);
void GetPrimitiveImageColorValue(long Index,tagRGBVal& rgb);
bool SetInitialClusterCenter(RGBValArray& arrClusterCenter);//設置初始聚類中心
int m_nWhichColorNoUse;
// BYTE m_lColorValR;
// BYTE m_lColorValG;
// BYTE m_lColorValB;
int m_nTabPosY;
int m_nTabPosX;
int m_nImageShowWidth; //用于顯示圖象的寬度
int m_nImageShowHeight;//用于顯示圖象的高度
CRect m_rectImage;//顯示圖象的區域
CRect m_TabRect;
CDC* m_lpTabDC;
LONG m_lImagePixelNumber;//當前圖象像素數量
CPoint m_ptFigureXY0;
CPoint m_ptCurRButtonDown;
LONG m_lClusterSampleStatus;
RGBValArray m_arrClusterSampleData; //用于保存聚類算法的采樣數據點列
RGBValArray m_arrClusterCenterBackup; //聚類中心的備份,用于下次迭代時優化
RGBValArray m_arrClusterCenter; //聚類中心,用于每次迭代時調整
CMatrix m_matrixClassTag; //分類矩陣
LPSTR m_lImageData;//用于指向實際的圖象數據(跳過其他信息)
RGBValArray m_arrCenterColor; //用于顯示聚類中心的顏色
LONG m_lCenterInitialMethod;
bool m_bFirst;//標志第一次執行
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGCLUSTERPATTERNRECOG_H__ABF672C9_CA52_4CE5_B651_EA64B47B417F__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -