Video Analysis底层库拆分,sdk的go封装
zhangzengfei
2020-01-11 8464662ccdff684afeeee3356d838e838a0a5d11
update vehicle sdk libs
15个文件已删除
7个文件已添加
4个文件已修改
6202 ■■■■■ 已修改文件
gosdk.go 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/include/ItsVehicleTypeRec.h 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/include/PlateType.h 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libDetection.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libExtractor.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libFeatureExtraction.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libRockey6SmartPlus.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libVehicleTypeRecognition.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libopenblas.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libopenblas.so.0 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libprotobuf.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libprotobuf.so.8 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/lib/libvehicleFeatureExt.so 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/headClassNameIndexCnn_blue.txt 2388 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/headClassNameIndexCnn_yellow.txt 280 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/model1 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/model2 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/model3 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/name.bin 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vd.model 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vd1.model 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vdClassNameIndexCnn.txt 3325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vtr_net_blue.model 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vtr_net_yellow.model 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/model/vtr_vd_net.model 补丁 | 查看 | 原始文档 | blame | 历史
sdk/plate/vehicle/vtr.key 补丁 | 查看 | 原始文档 | blame | 历史
gosdk.go
@@ -9,7 +9,7 @@
#cgo LDFLAGS: -L${SRCDIR}/sdk/plate/eparking/lib -L${SRCDIR}/sdk/plate/cloud/lib -L${SRCDIR}/sdk/plate/vehicle/lib
#cgo LDFLAGS: -Wl,-rpath,${SRCDIR}/sdk/face/lib/gpu:${SRCDIR}/sdk/darknet/lib:${SRCDIR}/sdk/plate/cloud/lib:${SRCDIR}/sdk/plate/vehicle/lib
#cgo LDFLAGS: -ldarknet -lTHFaceImage -lTHFeature -lTHFaceProperty -lTHFaceTracking -lcudart -lcublas -lcurand -lrt -ldl -lpthread -lthplateid -lLPRecognition
#cgo LDFLAGS: -lVehicleTypeRecognition -lDetection -lExtractor -lvehicleFeatureExt -lopenblas -lprotobuf
#cgo LDFLAGS: -lVehicleTypeRecognition -lFeatureExtraction
#include <stdlib.h>
#include "csdk.h"
*/
sdk/plate/vehicle/include/ItsVehicleTypeRec.h
@@ -1,6 +1,7 @@
#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)
@@ -8,36 +9,79 @@
#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 
@@ -45,7 +89,7 @@
    E_RGB,
    E_BGR,
    E_YUV420,  
}V_ImageType;  //图片格式
}V_ImageType;  //图片格式
typedef struct
{
@@ -53,7 +97,7 @@
    int       iImageWidth;
    V_ImageType eType;
    unsigned char *pImageData;
}V_Image; //图像格式
}V_Image; //图像格式
typedef struct  
@@ -67,29 +111,29 @@
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;
@@ -105,34 +149,25 @@
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);
sdk/plate/vehicle/include/PlateType.h
File was deleted
sdk/plate/vehicle/lib/libDetection.so
Binary files differ
sdk/plate/vehicle/lib/libExtractor.so
Binary files differ
sdk/plate/vehicle/lib/libFeatureExtraction.so
Binary files differ
sdk/plate/vehicle/lib/libRockey6SmartPlus.so
Binary files differ
sdk/plate/vehicle/lib/libVehicleTypeRecognition.so
Binary files differ
sdk/plate/vehicle/lib/libopenblas.so
Binary files differ
sdk/plate/vehicle/lib/libopenblas.so.0
Binary files differ
sdk/plate/vehicle/lib/libprotobuf.so
Binary files differ
sdk/plate/vehicle/lib/libprotobuf.so.8
Binary files differ
sdk/plate/vehicle/lib/libvehicleFeatureExt.so
Binary files differ
sdk/plate/vehicle/model/headClassNameIndexCnn_blue.txt
File was deleted
sdk/plate/vehicle/model/headClassNameIndexCnn_yellow.txt
File was deleted
sdk/plate/vehicle/model/model1
Binary files differ
sdk/plate/vehicle/model/model2
Binary files differ
sdk/plate/vehicle/model/model3
Binary files differ
sdk/plate/vehicle/model/name.bin
Binary files differ
sdk/plate/vehicle/model/vd.model
Binary files differ
sdk/plate/vehicle/model/vd1.model
Binary files differ
sdk/plate/vehicle/model/vdClassNameIndexCnn.txt
File was deleted
sdk/plate/vehicle/model/vtr_net_blue.model
Binary files differ
sdk/plate/vehicle/model/vtr_net_yellow.model
Binary files differ
sdk/plate/vehicle/model/vtr_vd_net.model
Binary files differ
sdk/plate/vehicle/vtr.key
Binary files differ