⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlgclusterpatternrecog.h

📁 模式识别的作业代码
💻 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 + -