
#ifndef _LOGO_COLOR_H_
#define _LOGO_COLOR_H_


//#ifdef MICRO_LOGO_COLOR


#ifdef WIN32
#include <Windows.h>
#endif


#include "ErrCode.h"

#ifdef __cplusplus
extern "C" {
#endif

#define ALPRSDK_API __declspec(dllexport)




	typedef enum zkta_logo_enum
	{
		ZKTAA_LOGO_OTHRE_0,	 // 0 其他
		ZKTA_LOGO_OTHRE_1,	 //1 未知(已知类别但显示为未知)
		ZKTA_LOGO_DS,		 //2 DS
		ZKTA_LOGO_JAC,		 //3 JAC
		ZKTA_LOGO_Jeep,		 //4 Jeep
		ZKTA_LOGO_MG,		 // 5 MG
		ZKTA_LOGO_MINI,		 // 6 MINI
		ZKTA_LOGO_CNHTC,		 // 7 cnhtc
		ZKTA_LOGO_SANLING,		 // 8 三菱
		ZKTA_LOGO_SHANGHAIHUIZHONG,		 // 9 上海汇众
		ZKTA_LOGO_DONGNAN,		 // 10 东南
		ZKTA_LOGO_DONGFENG,		 // 11 东风
		ZKTA_LOGO_ZHONGXIQICHE,		 // 12 中兴汽车
		ZKTA_LOGO_ZHONGHUA,		 // 13 中华
		ZKTA_LOGO_FENGTIAN,		 // 14 丰田
		ZKTA_LOGO_FENGTIANMARK,		 // 15 丰田mark
		ZKTA_LOGO_FENGTIANHUANGGUAN,		 // 16 丰田皇冠
		ZKTA_LOGO_WUSHILING,		 // 17 五十铃
		ZKTA_LOGO_WULING,		 // 18 五菱
		ZKTA_LOGO_ZHONGTAI,		 // 19 众泰
		ZKTA_LOGO_YIWEIKE,		 // 20 依维柯
		ZKTA_LOGO_HX,		 // 21 Hx
		ZKTA_LOGO_OTHER_2,		 // 22 未知
		ZKTA_LOGO_OTHER_3,		 // 23 未知
		ZKTA_LOGO_OTHER_4,		 // 24 未知
		ZKTA_LOGO_OTHER_5,		 // 25 未知
		ZKTA_LOGO_HENGTONG,		 // 26 恒通客车
		ZKTA_LOGO_ZHENGTENG,		 // 27 征腾
		ZKTA_LOGO_WANGPAI,		 // 28 王牌
		ZKTA_LOGO_NANJUN,		 // 29 南骏
		ZKTA_LOGO_OTHER_6,		 // 30 未知
		ZKTA_LOGO_HUAPU,		 // 31 华普
		ZKTA_LOGO_YOUYIPAI,		 // 32 友谊牌
		ZKTA_LOGO_SHAHUANGSHITONG,		 // 33 三环十通
		ZKTA_LOGO_YUTONG,		 // 34 宇通
		ZKTA_LOGO_CHANGCHENGJINDIER,		 // 35 长城金迪尔
		ZKTA_LOGO_QUANQIUYING,		 // 36 全球鹰
		ZKTA_LOGO_KAIDILAKE,		 // 37 凯迪拉克
		ZKTA_LOGO_BIEKE,		 // 38 别克
		ZKTA_LOGO_LIFAN,		 // 39 力帆
		ZKTA_LOGO_BEIJINGFUTIAN,		 // 40 北京福田
		ZKTA_LOGO_BEIQI,		 // 41 北汽
		ZKTA_LOGO_BEIQIZIZAO,		 // 42 北汽制造
		ZKTA_LOGO_BEIQIHUANSU,		 // 43 北汽幻速
		ZKTA_LOGO_SHUANGHUANG,		 // 44 双环
		ZKTA_LOGO_JILI,		 // 45 吉利
		ZKTA_LOGO_JILIDIHAO,		 // 46 吉利帝豪
		ZKTA_LOGO_QICHEN,			 // 47 启辰
		ZKTA_LOGO_HAFU,		 // 48 哈弗
		ZKTA_LOGO_HAFEI,		 // 49 哈飞
		ZKTA_LOGO_XIALI,		 // 50 夏利
		ZKTA_LOGO_DAZHONG,		 // 51 大众
		ZKTA_LOGO_QIRUI,		 // 52 奇瑞
		ZKTA_LOGO_BENTENG,		 // 53 奔腾
		ZKTA_LOGO_BENCHI,		 // 54 奔驰
		ZKTA_LOGO_AODI,		 // 55 奥迪
		ZKTA_LOGO_WEIWAN,		 // 56 威旺
		ZKTA_LOGO_BAOWO,		 // 57 宝沃
		ZKTA_LOGO_BAOMA,		 // 58 宝马
		ZKTA_LOGO_BAOJUN,		 // 59 宝骏
		ZKTA_LOGO_CHUANQIYEMA,		 // 60 川汽野马
		ZKTA_LOGO_GUANGQI,		 // 61 广汽
		ZKTA_LOGO_AKIRUI,		 // 62 开瑞Karry
		ZKTA_LOGO_SIMING,		 // 63 思铭
		ZKTA_LOGO_SIBALU,		 // 64 斯巴鲁
		ZKTA_LOGO_SIKEDA,		 // 65 斯柯达
		ZKTA_LOGO_RICHAGN,		 // 66 日产
		ZKTA_LOGO_CHANGHE,		 // 67 昌河
		ZKTA_LOGO_BENTIAN,		 // 68 本田
		ZKTA_LOGO_BIAOZHI,		 //69 标致
		ZKTA_LOGO_OUBAO,		 //70 欧宝
		ZKTA_LOGO_BIYADI,		 //71 比亚迪
		ZKTA_LOGO_JIANGHUAI,		 //72 江淮
		ZKTA_LOGO_JIANGLING,		 //73 江铃
		ZKTA_LOGO_JIANGLINGJIASHENG,		 //74 江铃驭胜
		ZKTA_LOGO_WOERWO,		 //75 沃尔沃
		ZKTA_LOGO_HAIMA,		 //76 海马
		ZKTA_LOGO_HIAMAZHENGZHOU,		 //77 海马郑州
		ZKTA_LOGO_MASHALADI,		 //78 玛莎拉蒂
		ZKTA_LOGO_XIANDAI,		 //79 现代
		ZKTA_LOGO_FUTE,		 //80 福特
		ZKTA_LOGO_FUTIAN,		 // 81 福田
		ZKTA_LOGO_FUDI,		 // 82 福迪
		ZKTA_LOGO_HONGQI,		 // 83 红旗
		ZKTA_LOGO_NAZHIJIE,		 // 84 纳智捷
		ZKTA_LOGO_YANGCHENGQICHE,		 // 85 羊城汽车
		ZKTA_LOGO_YINGLUNQICHE,		 // 86 英伦汽车
		ZKTA_LOGO_YINGFEINIDI,		 //  英菲尼迪
		ZKTA_LOGO_RONGWEI,		 // 88 荣威
		ZKTA_LOGO_YAFEITE,		 // 89 菲亚特
		ZKTA_LOGO_OUGE,		 // 90 讴歌
		ZKTA_LOGO_QIYA,		 // 91 起亚
		ZKTA_LOGO_YUEJIN,		 // 92 跃进
		ZKTA_LOGO_LUHU,		 // 93 路虎
		ZKTA_LOGO_JINLUKECHE,		 // 94 金旅客车
		ZKTA_LOGO_JINBEI,		 // 95 金杯
		ZKTA_LOGO_JINNIU,		 // 96 金牛
		ZKTA_LOGO_JINLONGKECHE,		 // 97 金龙客车
		ZKTA_LOGO_LINGMU,		 // 98 铃木
		ZKTA_LOGO_CHANGCHENG,		 // 99 长城
		ZKTA_LOGO_CHANGANSHANGYONG,		 // 100 长安商用
		ZKTA_LOGO_CHANGANXIN,		 // 101 长安新
		ZKTA_LOGO_CHANGANJIU,		 // 102 长安旧
		ZKTA_LOGO_LUFENG,		 // 103 陆风
		ZKTA_LOGO_XUEFULAN,		 // 104 雪佛兰
		ZKTA_LOGO_XUETIELONG,		 // 105 雪铁龙
		ZKTA_LOGO_LEIKESASI,			 // 106 雷克萨斯
		ZKTA_LOGO_LEILUO,		 // 107 雷诺
		ZKTA_LOGO_MAZIDA,		 //108 马自达
		ZKTA_LOGO_HUANGHAI		 //109 黄海

	} ZKTA_Logo_Enum;

	typedef enum zkta_color_enum
	{
		ZKTA_COLOR_White,  //0 white
		ZKTA_COLOR_Gray,  //1 gray
		ZKTA_COLOR_Golden,  //2 golden
		ZKTA_COLOR_Pink,  //3 pink
		ZKTA_COLOR_Red,  //4 red
		ZKTA_COLOR_Purple,  //5 purple
		ZKTA_COLOR_Green,  //6 green
		ZKTA_COLOR_Blue,  //7 blue
		ZKTA_COLOR_Brown,  //8 brown
		ZKTA_COLOR_Black,  //9 black
		ZKTA_COLOR_Silvery,  //10 silvery
		ZKTA_COLOR_Yellow,  //11 yellow
		ZKTA_COLOR_Other  //12 other

	}ZKTA_Color_Enum;


	typedef enum zkta_type_enum
	{

		ZKTA_TYPE_HOUCHUOHEZHEKECHE, //0 货车或客车(无车盖)
		ZKTA_TYPE_XIAOXINGCHE //1 小型车(有车盖)

	}ZKTA_Type_Enum;




	typedef enum cIMAGE_DATA_FORMAT
	{
		E_YUV_PLANAR_422 = 0x01,   				    //!<  YYY UUU VVV	
		E_YUV_SEMIPLANAR_422,    					//!<  [Y0 Y1 Y2] [U0V0 U1V1 U2V2] 
		E_YUV_SEMIPLANAR_420,	                    //!<  [Y0 Y1 /Y2 Y3] [U0V0 U1V1...] 
		E_YUV_PLANAR_420,                        //!<  [Y0 Y1 ...] [U0U1..] [V0V1...] 
		E_BGR_DATA,                        //!<  BGR BGR BGR... 
		E_YUV_SEMIPLANAR_420_NV21,					    //!<  [Y0 Y1 /Y2 Y3] [V0U0 V1U1] 
		E_YUV_PLANAR_420_YV12,                        //!<  [Y0 Y1 ...] [V0V1...] [U0U1..]
		E_MAX_IMG_FORMAT,
	};


	typedef struct
	{
		cIMAGE_DATA_FORMAT  enPixelFormat;     //!< pixel format of the Yuv image
		int Width;					 //!< width of the image
		int Height;					 //!< height of the image
		//uint8 *pu8YData;					 //!< Y data buffer of the image
		//uint8 *pu8UData;					 //!< U data buffer of the image
		//uint8 *pu8VData;				     //!< V data buffer of the image
		//uint8 *pu8UVData;					 //!< UV data buffer of the image
		unsigned char *pu8BGRData;                   //!< BGR data buffer of the image
	} cCOLOR_IMAGE_I;


	typedef struct _tagLogoResult
	{
		char            szLogoDescr[24];//车标信息预留 
		int             s32LetterCount; //字符数量
		//string           label;
		char             label[24];
		int             index;
		float           score;  //车标的可信度,取值范围[0,100]. 值越大，可信度越高
		XRect           rtPos;        //Logo位置信息
		unsigned char   u8Color;   //车牌颜色，取值请参考ePlateColor
		unsigned char   u8Reserve[3]; //预留字段
	} stLogoResult;

	typedef struct _tagColorResult
	{
		//string           label;
		char             label[24];
		int              index;
		float            score;  //车标的可信度,取值范围[0,100]. 值越大，可信度越高
		unsigned char            u8Color;   //车牌颜色，取值请参考ePlateColor
		unsigned char            u8Reserve[3]; //预留字段
	} stColorResult;










	//ALPRSDK_API OS_Error WINAPI AlprSDK_CarInfoRecogInit();
	ALPRSDK_API OS_Error WINAPI AlprSDK_CarInfoRecogInit(int nHandleID);

	ALPRSDK_API OS_Error WINAPI AlprSDK_CreateColorImageI(const char *filename, cCOLOR_IMAGE_I *pstImageData);
	ALPRSDK_API OS_Error WINAPI AlprSDK_DestroyColorImageI(const cCOLOR_IMAGE_I *pstImageData);


	//ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogColor(const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stColorResult *pColorResult);
	//ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogCarType(const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stLogoResult *pTypeResult);
	//ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogLogo(const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stLogoResult *pLogoResult);

	ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogCarType(int nHandleID, const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stLogoResult *pTypeResult);
	ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogLogo(int nHandleID, const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stLogoResult *pLogoResult);
	ALPRSDK_API OS_Error WINAPI AlprSDK_SmartALPR_RecogColor(int nHandleID, const cCOLOR_IMAGE_I *pstImageData, const XRect *pPlatePos, stColorResult *pColorResult);


	//ALPRSDK_API OS_Error WINAPI AlprSDK_SwitchJpgToRGB(const unsigned char *pJpg, cCOLOR_IMAGE_I *pstImageData);
	ALPRSDK_API OS_Error WINAPI AlprSDK_SwitchJpgToRGB(char *szTime, const unsigned char *pJpg, int datalen, cCOLOR_IMAGE_I *pstImageData);

	ALPRSDK_API OS_Error WINAPI AlprSDK_SwitchJpgToRGBTest(char *szTime, const unsigned char *pJpg, int datalen, cCOLOR_IMAGE_I *pstImageData);
#ifdef __cplusplus
}
#endif


//#endif

#endif

