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

📄 configdlg.h

📁 本程序是2005年参加中国机器人大赛的比赛程序
💻 H
字号:
#if !defined(AFX_CONFIGDLG_H__1C959569_C436_4D41_8258_95DEB22594D1__INCLUDED_)
#define AFX_CONFIGDLG_H__1C959569_C436_4D41_8258_95DEB22594D1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ConfigDlg.h : header file
//

class CVideoDlg;
/////////////////////////////////////////////////////////////////////////////
// CConfigDlg dialog

class CConfigDlg : public CDialog
{
// Construction
public:
	CConfigDlg(CWnd* pParent = NULL);   // standard constructor
	bool isSample;
	int now_low_y;
	int now_low_u;
	int now_low_v;
	int now_high_y;
	int now_high_u;
	int now_high_v;

	//阈值上限,三分量依次是:red, green, total
	byte m_upper_MyTeam[5][3];//我队队员相互间色彩标示
	byte m_upper_TheirTeam[5][3];//对方队员相互间色彩标示
	byte m_upper_Ball[3];//球的色彩标示
	byte m_upper_Field[3];//场地的色彩标示
	byte m_upper_MyTeamLable[3];//我队区别于他队的色彩标示
	byte m_upper_TheirTeamLable[3];//他队区别于我队的色彩标示
	//阈值下限
	byte m_lower_MyTeam[5][3];
	byte m_lower_TheirTeam[5][3];
	byte m_lower_Ball[3];
	byte m_lower_Field[3];
	byte m_lower_MyTeamLable[3];
	byte m_lower_TheirTeamLable[3];
	/////////////////输出量/////////////////////////////
	//三分量依次是:x, y, 运动方向角
	double m_MyTeam[5][3];
	double m_TheirTeam[5][3];
	double m_Ball[2];
	////////////////////////////////////////////////////
	int  m_red;//每像素点红分量比例
	int m_green;//每像素点绿分量比例
	int    m_blue;
//	double m_RGBTotal;//每像素点RGB三分量和
//	BOOL m_bIsDisplayResult;//是否开始显示辨析结果
	int m_ObjectDia;//目标物体直径
	double m_ObjectPercent;//识别像素点达到该比例,则认为目标物体已被识别
	int m_Zoom;//焦距
	CVideoDlg* m_pVideoDlg;

	void Init_Upper_Lower();
	void SetVideoDlg(CVideoDlg* pVideoDlg);
	double ReadFile(FILE* pFile);
	

// Dialog Data
	//{{AFX_DATA(CConfigDlg)
	enum { IDD = IDD_CONFIG_DIALOG };
	CButton	m_sample;
	CStatic	m_ZoomInfo;
	CButton	m_GetResultButton;
	CStatic	m_MeanRGBInfo;
	CStatic	m_CoorInfo;
	CStatic	m_ColorInfo;
	BOOL	m_bCheckGetFieldRect;
	BOOL	m_bCheckDisplayField;
	int		m_RadioSelectObject;
	BOOL	m_bCheckCapRect;
	BOOL	m_rect_sample;
	BOOL	m_bMY_door;
	BOOL	m_bTh_door;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConfigDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
public:
	void SaveYuzhi();
	int yuzhi;
	void GetYuzhi();
	void rbnsample();
	void showcolour(int r, int g, int b);
	// Generated message map functions
	//{{AFX_MSG(CConfigDlg)
	afx_msg void OnCheckFieldrect();
	afx_msg void OnCheckDisplayfield();	
	virtual BOOL OnInitDialog();
	afx_msg void OnCheckTest();
	afx_msg void OnCustomdrawSliderDia(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCustomdrawSliderPercent(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnGetresultButton();	
	afx_msg void OnSave();
	afx_msg void OnLoad();
	afx_msg void OnButtonClearsample();
	afx_msg void OnCheckCaprect();
	afx_msg void Onrbsample();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONFIGDLG_H__1C959569_C436_4D41_8258_95DEB22594D1__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -