| | |
| | | #ifndef _ITS_VEHICLE_TYPE_REC_H_ |
| | | #define _ITS_VEHICLE_TYPE_REC_H_ |
| | | #include "PlateType.h" |
| | | |
| | | #define VTR_API extern "C" __attribute__((visibility("default"))) |
| | | |
| | | #define MAX_VEHICLE_NUM (5) |
| | | |
| | |
| | | |
| | | #define MAX_CHAR_NUM (10) |
| | | |
| | | #define OK (0) //初始化正确 |
| | | #define DATA_OUT (-1) //SDK过期 |
| | | #define KEY_ERROR (-2) //未找到加密狗 |
| | | #define MODE_PATH_ERROR (-3) //mode文件错误 |
| | | #define MAC_KEY_ERROR (-4) //mac地址加密文件错误 |
| | | #define THREAD_ERROR (-5) //超过线程授权数目 |
| | | #define OK (0) //初始化正确 |
| | | #define DATA_OUT (-1) //SDK过期 |
| | | #define KEY_ERROR (-2) //未找到加密狗 |
| | | #define MODE_PATH_ERROR (-3) //mode文件错误 |
| | | #define MAC_KEY_ERROR (-4) //mac地址加密文件错误 |
| | | #define THREAD_ERROR (-5) //超过线程授权数目 |
| | | |
| | | |
| | | #define VTR_API extern "C" __attribute__((visibility("default"))) |
| | | |
| | | /***************车身颜色******************/ |
| | | /***************车牌颜色******************/ |
| | | typedef enum |
| | | { |
| | | E_VEHICLE_COLOR_NOT,//未知 |
| | | E_VEHICLE_RED, //红色 |
| | | E_VEHICLE_GREEN, //绿色 |
| | | E_VEHICLE_BLUE, //蓝色 |
| | | E_VEHICLE_PINK, //粉色 |
| | | E_VEHICLE_BROWN, //棕色 |
| | | E_VEHICLE_YELLOW, //黄色 |
| | | E_VEHICLE_WHITE, //白色 |
| | | E_VEHICLE_BLACK, //黑色 |
| | | E_VEHICLE_GRAY, //灰色(银色) |
| | | E_VEHICLE_CYAN, //青色 |
| | | E_PLATE_COLOR_NOT, //δ֪ |
| | | E_PLATE_COLOR_BLUE, |
| | | E_PLATE_COLOR_BLACK, |
| | | E_PLATE_COLOR_YELLOW, |
| | | E_PLATE_COLOR_WHITE, |
| | | E_PLATE_COLOR_GREEN, |
| | | E_PLATE_COLOR_GREEN_YELLOW |
| | | }E_Plate_Color; |
| | | |
| | | |
| | | |
| | | /***************车牌类型******************/ |
| | | typedef enum |
| | | { |
| | | E_PLATE_TYPE_NOT = 0, //δ֪ |
| | | E_PLATE_TYPE_NORMAL_BLUE, //普通蓝牌 |
| | | E_PLATE_TYPE_NORMAL_BLACK, //普通黑牌 |
| | | E_PLATE_TYPE_NORMAL_YELLOW,//普通单层黄牌 |
| | | E_PLATE_TYPE_DOUBLE_YELLOW,//双层黄牌 |
| | | E_PLATE_TYPE_POLICE, //白色警牌 |
| | | E_PLATE_TYPE_WJ, //白色武警 |
| | | E_PLATE_TYPE_ARMY, //白色军牌 |
| | | E_PLATE_TYPE_GANG, //港牌 |
| | | E_PLATE_TYPE_NONG, //农用车牌 |
| | | E_PLATE_TYPE_ENERGY, //新能源车牌--纯绿色 |
| | | E_PLATE_TYPE_ENERGY_Y, //新能源车----黄绿色 |
| | | E_PLATE_TYPE_INDIVI, //个性化车牌 |
| | | E_PLATE_TYPE_EMBASSY, //使馆车 |
| | | }E_Plate_Type; |
| | | |
| | | |
| | | typedef struct |
| | | { |
| | | E_Plate_Color ePlateColor; |
| | | E_Plate_Type ePlateType; |
| | | char platenumber[20]; //车牌号码 |
| | | int iPlateConfidence; |
| | | int iCharNum; |
| | | int iCharConfidence[20]; |
| | | }PlateInfor; |
| | | |
| | | |
| | | /***************车身颜色******************/ |
| | | typedef enum |
| | | { |
| | | E_VEHICLE_COLOR_NOT,//δ֪ |
| | | E_VEHICLE_RED, //红色 |
| | | E_VEHICLE_GREEN, //绿色 |
| | | E_VEHICLE_BLUE, //蓝色 |
| | | E_VEHICLE_PINK, //粉色 |
| | | E_VEHICLE_BROWN, //棕色 |
| | | E_VEHICLE_YELLOW, //黄色 |
| | | E_VEHICLE_WHITE, //白色 |
| | | E_VEHICLE_BLACK, //黑色 |
| | | E_VEHICLE_GRAY, //灰色(银色) |
| | | E_VEHICLE_CYAN, //青色 |
| | | }E_Vehicle_Color; |
| | | |
| | | typedef enum |
| | | { |
| | | E_VEHICLE_DARK, //深色 |
| | | E_VEHICLE_LIGHT, //浅色 |
| | | E_VEHICLE_DARK, //深色 |
| | | E_VEHICLE_LIGHT, //dzɫ |
| | | }E_Vehicle_Bright; |
| | | |
| | | typedef enum |
| | |
| | | E_RGB, |
| | | E_BGR, |
| | | E_YUV420, |
| | | }V_ImageType; //图片格式 |
| | | }V_ImageType; //图片格式 |
| | | |
| | | typedef struct |
| | | { |
| | |
| | | int iImageWidth; |
| | | V_ImageType eType; |
| | | unsigned char *pImageData; |
| | | }V_Image; //图像格式 |
| | | }V_Image; //图像格式 |
| | | |
| | | |
| | | typedef struct |
| | |
| | | |
| | | typedef struct |
| | | { |
| | | int iPlateFlag; //是否识别到车牌 |
| | | PlateInfor plateInfor; //车牌信息 |
| | | S_Rect plateRect; //车牌位置 |
| | | S_Rect tempVehicleRect; //车辆位置 |
| | | int iPlateFlag; //是否识别到车牌 |
| | | PlateInfor plateInfor; //车牌信息 |
| | | S_Rect plateRect; //车牌位置 |
| | | S_Rect tempVehicleRect; //车辆位置 |
| | | |
| | | char tempVehicleType[1024]; //车辆类型--总名称 jeep-大切诺基-2004 |
| | | char tempVehicleBrand[1024]; //车辆品牌 jeep |
| | | char tempVehicleSub[1024]; //车辆子型号 大切诺基 |
| | | char tempVehicleType1[1024]; //车辆类型 轿车 货车 客车 面包车 |
| | | char tempVehicleType[1024]; //车辆类型--总名称 jeep-大切诺基-2004 |
| | | char tempVehicleBrand[1024]; //车辆品牌 jeep |
| | | char tempVehicleSub[1024]; //车辆子型号 大切诺基 |
| | | char tempVehicleType1[1024]; //车辆类型 轿车 货车 客车 面包车 |
| | | |
| | | float fVDConf; //车辆检测置信度 |
| | | float fVDConf; //车辆检测置信度 |
| | | |
| | | float fConfdence; //车辆类型置信度 |
| | | int iVehicleSubModel; //车型名称索引 |
| | | E_Vehicle_Bright eVehicleBright; //车辆深浅色 |
| | | E_Vehicle_Color eVehicleColor1;//车身主颜色 |
| | | E_Vehicle_Color eVehicleColor2;//车身辅颜色 |
| | | float fConfdence; //车辆类型置信度 |
| | | int iVehicleSubModel; //车型名称索引 |
| | | E_Vehicle_Bright eVehicleBright; //车辆深浅色 |
| | | E_Vehicle_Color eVehicleColor1;//车身主颜色 |
| | | E_Vehicle_Color eVehicleColor2;//车身辅颜色 |
| | | |
| | | unsigned char*pCaptureImage; //视频模式识别下抓拍的图片数据,必须调用时开辟,图片识别模式下不必开辟 |
| | | //开辟大小为输入图片宽高乘积的3倍,且视频模式下每次只输出一个识别结果 |
| | | //(注:此抓拍结果图的存储顺若输入图像是YUV格式,则为RGBRGB,否则与输如图像顺序相同) |
| | | int iImageWidth; //视频模式下抓拍图像宽度 |
| | | int iImageHeight; //视频模式下抓拍图像高度 |
| | | unsigned char*pCaptureImage; //视频模式识别下抓拍的图片数据,必须调用时开辟,图片识别模式下不必开辟 |
| | | //开辟大小为输入图片宽高乘积的3倍,且视频模式下每次只输出一个识别结果 |
| | | //(注:此抓拍结果图的存储顺若输入图像是YUV格式,则为RGBRGB,否则与输如图像顺序相同) |
| | | int iImageWidth; //视频模式下抓拍图像宽度 |
| | | int iImageHeight; //视频模式下抓拍图像高度 |
| | | |
| | | }ITS_Vehicle_Result_Single; |
| | | |
| | |
| | | |
| | | typedef struct |
| | | { |
| | | int iSceneMode; //场景模式: 0---顶装 1----侧装 2---顶装路径 3---停车场 4----公安 |
| | | int iModelMode; //读取模型方式:0---原始模型 1---修改模型 |
| | | int iSceneMode; //场景模式: 0---顶装 1----侧装 2---顶装路径 3---停车场 4----公安 |
| | | int iModelMode; //读取模型方式:0---原始模型 1---修改模型 |
| | | }ITS_Rec_Param; |
| | | |
| | | |
| | | |
| | | //利用车牌识别,车辆检测进行车型识别 |
| | | //利用车牌识别,车辆检测进行车型识别 |
| | | VTR_API int ITS_ThreadInit(char* fullKeyPath); |
| | | |
| | | VTR_API int ITS_GetThreadNum(); //获得加密锁支持的线程数目 |
| | | VTR_API int ITS_GetThreadNum(); //获得加密锁支持的线程数目 |
| | | |
| | | VTR_API void * ITS_VehicleRecInit(char* modePath, int& iInitFlag, ITS_Rec_Param its_param);//modePath为model文件夹的路径名 |
| | | VTR_API void * ITS_VehicleRecInit(char* modePath, int& iInitFlag, ITS_Rec_Param its_param);//modePath为model文件夹的路径名 |
| | | |
| | | VTR_API int ITS_VehicleTypeRec_new_1(void* pInstance,V_Image* pVImage,S_Rect* roi,ITS_Vehicle_Result* pResult, char plateResult[64]); |
| | | |
| | | |
| | | VTR_API int ITS_VehicleTypeRec(void* pInstance,V_Image* pVImage,S_Rect* roi,ITS_Vehicle_Result* pResult); |
| | | |
| | | VTR_API void ITS_VehicleRecRelease(void* pInstance); |
| | | |
| | | VTR_API void ITS_BinPlate(V_Image* pSrcPlate, V_Image* pBinPlate, int plateType); |
| | | |
| | | |
| | | VTR_API void*FeatureExt_Init(char* modePath,int& iFeatureLen); |
| | | |
| | | VTR_API void FeatureExt_Extract(void* pInstance, V_Image* pImage, S_Rect* vehicleRoi,float* fFeature); |
| | | |
| | | VTR_API void FeatureExt_Release(void* pInstance); |
| | | |
| | | |
| | | |
| | | |