| | |
| | | } |
| | | |
| | | 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)); |
| | |
| | | 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); |
| | |
| | | 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); |