www.pudn.com > try2LPR-1.0.rar > types.h


/* 
* Copyright (c) 2003, try2it.com 
* All rights reserved. 
* 
* This program is free software; you can redistribute it and/or modify it under 
* the terms of the GNU General Public License as published by the Free Software 
* Foundation; either version 2 of the License, or (at your option) any later 
* version. 
*  
* This program is distributed in the hope that it will be useful, but WITHOUT 
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
* details. 
*  
* You should have received a copy of the GNU General Public License along with 
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple 
* Place - Suite 330, Boston, MA 02111-1307, USA. 
* 
* 文件名称:types.h 
* 文件标识:LPR-02-03 
* 摘要:车牌识别系统结构定义公共文件 
* 
* 当前版本:1.0 
* 作者:try2it.com 
* 开始日期:2003年09月16日 
* 完成日期:2003年09月20日 
*/ 
 
#ifndef _TYPES_H_ 
#define _TYPES_H_ 
 
#if (defined(__cplusplus) || defined(c_plusplus)) 
extern  "C" { 
#endif 
 
#define MAX_LPCHAR_COUNT 16     // 最大的车牌字符个数 
#define MAX_LPCHAR_CURRENT_COUNT 7 
 
struct _GrayImg; 
typedef _GrayImg TGrayImg; 
typedef _GrayImg *PGrayImg; 
 
struct _ColorImg; 
typedef _ColorImg TColorImg; 
typedef _ColorImg *PColorImg; 
 
struct _LPInfo; 
typedef _LPInfo TLPInfo; 
typedef _LPInfo *PLPInfo; 
 
// 灰度图像存放结构 
struct _GrayImg 
{ 
	BYTE *pImg;            // 图像数据 
	int Width;             // 图像宽度 
	int Height;            // 图像高度 
}; 
 
// 彩色图像存放结构 
struct _ColorImg 
{ 
	int BitCount;          // 彩色图像位数 
	BYTE *pYImg;           // 灰度图 
	BYTE *pRImg;           // R分量 
	BYTE *pGImg;           // G分量 
	BYTE *pBImg;           // B分量 
	int Width;             // 图像的宽度 
	int Height;            // 图像高度 
}; 
 
// 颜色 
enum TColorID 
{ 
	LP_BLACK=0, 
	LP_BLUE, 
	LP_YELLOW, 
	LP_WHITE 
}; 
 
typedef struct _MYRECT 
{ 
	int left;    
	int right; 
	int top; 
	int bottom; 
}TMyRect, *PMyRect; 
 
// 返回牌照信息 
struct _LPInfo 
{ 
	char LPNum[MAX_LPCHAR_COUNT];      // 车牌号码 
	TColorID  LPColor;                 // 车牌颜色 
	TMyRect LPRect;                    // 车牌在图像中的位置 
}; 
 
// 车牌字符类型 
enum TLPNumType 
{ 
	LPNUM_CHN,             // 汉字 
	LPNUM_ENNUM,           // 字母和数字  
	LPNUM_NUM,             // 数字 
	LPNUM_EN               // 字母 
}; 
 
#if (defined(__cplusplus) || defined(c_plusplus)) 
} 
#endif 
 
#endif /* _TYPES_H_ */