?? getfeature.h
字號:
// GetFeature.h: interface for the GetFeature class.
// 2005.1.13-16:02 By Superman
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GETFEATURE_H__F4AF6FFD_5056_4E03_8774_096D222CD072__INCLUDED_)
#define AFX_GETFEATURE_H__F4AF6FFD_5056_4E03_8774_096D222CD072__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Cdib.h"
struct pattern//pattern結構體,保存某個數字類別(0~9)的所有樣品特征
{
int number;//該手寫數字樣品個數
double feature[200][25];//各樣品特征,每類手寫數字最多有200個樣品,每個樣品有25個特征
};
class GetFeature : public CDib
{
public:
pattern pattern[10];//手寫數字樣品特征庫
double testsample[25];//待測的手寫數字
int width;//手寫數字的寬
int height;//手寫數字的高
int LineBytes;
void Save(int cls);//將手寫的數字保存到cls(0~9)類別中
BOOL Saveable(int cls);//判斷手寫的數字能否保存到cls(0~9)類別中,因為各類別中樣品特征不能重復
double Cal(int row, int col);//計算分割好的5×5小區域中,黑像素所占的比例
void SetFeature();//計算手寫數字的特征,賦值給testsample
void GetPosition();//獲得手寫數字的位置
GetFeature();
virtual ~GetFeature();
protected:
int bottom;//手寫數字的底部
int top;//手寫數字的頂部
int left;//手寫數字的左邊
int right;//手寫數字的右邊
};
#endif // !defined(AFX_GETFEATURE_H__F4AF6FFD_5056_4E03_8774_096D222CD072__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -