本帖最后由 新人小白 于 2022-11-26 10:01 编辑
如果esp32-cam 不调用car_card_identify()函数时, 程序正常运行,一旦调用car_card_identify就会出错,板子不断reboot,报错内容如下,各位大佬,能看出什么错误吗?求指点,已经困扰了2天了//第一次调用
- abort() was called at PC 0x4008a45b on core 1
- ELF file SHA256: 0000000000000000
- Backtrace: 0x4008de10:0x3ffb19a0 0x4008e089:0x3ffb19c0 0x4008a45b:0x3ffb19e0 0x4008a481:0x3ffb1a00 0x4008a5d5:0x3ffb1a30 0x400fb487:0x3ffb1a50 0x400f7785:0x3ffb1d10 0x400f7714:0x3ffb1d60 0x400827ab:0x3ffb1d90 0x4008a3a1:0x3ffb1db0 0x4000bec7:0x3ffb1dd0 0x400d590f:0x3ffb1df0 0x400d591d:0x3ffb1e10 0x400d1038:0x3ffb1e30 0x400d166d:0x3ffb1ec0 0x400d751c:0x3ffb1fb0 0x4008fd1a:0x3ffb1fd0
复制代码 //第二次调用
- Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
- Core 1 register dump:
- PC : 0x400825ec PS : 0x00060330 A0 : 0x8008279a A1 : 0x3ffb1d70
- A2 : 0x3ffe84d4 A3 : 0x3ffec628 A4 : 0x3ffe4368 A5 : 0x3ffe84c8
- A6 : 0x3ffe4369 A7 : 0x3ffe84c9 A8 : 0xd168ff4f A9 : 0xd168ff4f
- A10 : 0x00000003 A11 : 0x00060323 A12 : 0x00060320 A13 : 0x3ffe4360
- A14 : 0x00000002 A15 : 0x3ffb1ea0 SAR : 0x00000019 EXCCAUSE: 0x0000001c
- EXCVADDR: 0xd168ff6b LBEG : 0x4008cf72 LEND : 0x4008cf7d LCOUNT : 0x00000000
- ELF file SHA256: 0000000000000000
- Backtrace: 0x400825ec:0x3ffb1d70 0x40082797:0x3ffb1d90 0x4008a3a1:0x3ffb1db0 0x4000bec7:0x3ffb1dd0 0x400d590f:0x3ffb1df0 0x400d591d:0x3ffb1e10 0x400d1038:0x3ffb1e30 0x400d166d:0x3ffb1ec0 0x400d751c:0x3ffb1fb0 0x4008fd1a:0x3ffb1fd0
复制代码- void car_card_identify()
- {
- camera_fb_t * camera = esp_camera_fb_get();
- if (!camera)
- {
- Serial.println("Camera Capture Failed");
- }else{
- String temp_url = "https://aip.baidubce.com/rest/2.0/ocr/v1/license_plate?access_token=";
- temp_url = temp_url + ocr_access_token;
- memset(camera_data, '\0', strlen(camera_data));
- strcat(camera_data, base64::encode(camera->buf, camera->len).c_str() );
- urlobject.strcode = camera_data;
- urlobject.urlencode();
- String strcode = urlobject.urlcode;
- int httpCode;
- http_client.begin(temp_url);
- http_client.addHeader("Content-Type","application/x-www-form-urlencoded");
- httpCode = http_client.POST(strcode);
- if(httpCode > 0)
- {
- if(httpCode == HTTP_CODE_OK)
- {
- String payload = http_client.getString();
- Serial.println(payload);
- }
- }else{
- Serial.printf("[HTTP] GET... failed, error: %s\n", http_client.errorToString(httpCode).c_str());
- }
- http_client.end();
- esp_camera_fb_return(camera);
- }
- }
复制代码
|