Video Analysis底层库拆分,sdk的go封装
zhangzengfei
2019-11-14 01f10af7d520bd93367f385f91e33849f5d8773e
csrc/buz/plate/detector.cpp
@@ -35,8 +35,8 @@
    }
    void init_plate_id_config(const cPlateIDCfg *params) {
        int fMemSize = 0x8000;
        int pMemSize = 200 * 1024 * 1024;
        int fMemSize = params->nFastMemorySize * 1024;
        int pMemSize = params->nMemorySize * 1024 * 1024;
        fmem = (unsigned char*)malloc(fMemSize * sizeof(unsigned char));
        pmem = (unsigned char*)malloc(pMemSize * sizeof(unsigned char));
@@ -78,9 +78,11 @@
    void set_enable_plate_format(const cPlateIDCfg *params) {
        if (params->bOnlyLocation == 1) {
            TH_SetEnabledPlateFormat(PARAM_ONLY_LOCATION_ON, &config);
            return;
        }
        if (params->bOnlyTwoRowYellow == 1) {
            TH_SetEnabledPlateFormat(PARAM_ONLY_TWOROWYELLOW_ON, &config);
            return;
        }
        if (params->bIndividual == 1) {
            TH_SetEnabledPlateFormat(PARAM_INDIVIDUAL_ON, &config);
@@ -133,7 +135,7 @@
        rcDetect.top = 0;
        rcDetect.right = img->width;
        rcDetect.bottom = img->height;
        rcDetect.left = 0;
        rcDetect.left = 0;
        int ret = TH_RecogImage((BYTE*)(img->data), img->width, img->height, result, &nResultNum, &rcDetect, &config);
        // printf("TH_RecogImage ret = %d\n", ret);