Video Analysis底层库拆分,sdk的go封装
zhangmeng
2019-11-27 8e01cb7623bfb2ef37358181c5ece8010fd1d260
csdk.cpp
@@ -107,11 +107,39 @@
    return init_plate_id_detector(config, soPath);
}
cPlateIDResult* c_api_plate_id_detect(int *plateIDCount, uchar *data, const int w, const int h) {
cPlateIDResult* c_api_plate_id_detect(int *plateIDCount, uchar *data, const int w, const int h, const cRECT *rcDetect) {
    const cIMAGE img{data, w, h, 3};
    return plate_id_detect(plateIDCount, &img);
    return plate_id_detect(plateIDCount, &img, rcDetect);
}
int c_api_plate_id_free() {
    return uninit_plate_id_detector();
}
// plateid cloud sdk api
int c_api_plate_id_cloud_init(const cPlateIDCloudSDKCfg *config, char *soPath, char *modelPath) {
    return init_plate_id_cloud_sdk_detector(config, soPath, modelPath);
}
cPlateIDCloudSDKResult* c_api_plate_id_cloud_detect(int *plateIDCount, uchar *data, const int w, const int h, const cRECT *rcDetect) {
    const cIMAGE img{data, w, h, 3};
    return plate_id_cloud_sdk_detect(plateIDCount, &img, rcDetect);
}
void c_api_plate_id_cloud_free() {
    uninit_plate_id_cloud_sdk_detector();
}
// its vehicle sdk api
int c_api_init_vehicle_its_detector(int sceneMode, int modelMode, char *keyPath, char *modelPath) {
    return init_vehicle_its_detector(sceneMode, modelMode, keyPath, modelPath);
}
cVehicleITSResult* c_api_vehicle_its_detect(int *plateIDCount, uchar *data, const int w, const int h, const cRECT *rcDetect) {
    const cIMAGE img{data, w, h, 3};
    return vehicle_its_detect(plateIDCount, &img, rcDetect);
}
void c_api_vehicle_its_free() {
    uninit_vehicle_its_detector();
}