esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

hello_galaxy
Posts: 10
Joined: Mon Jul 19, 2021 12:20 pm

esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby hello_galaxy » Fri Dec 30, 2022 10:53 am

用的是code_recognition例程,二维码识别没问题,一维码识别不到,是怎么回事呢?

ESP_Sandra
Posts: 46
Joined: Mon Dec 10, 2018 10:55 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby ESP_Sandra » Tue Jan 03, 2023 7:17 am

请问可以提供更多细节吗?如何复现?谢谢

hello_galaxy
Posts: 10
Joined: Mon Jul 19, 2021 12:20 pm

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby hello_galaxy » Wed Jan 04, 2023 4:57 am

开发板用的是安信可esp-cam,用的是在线生成一维码的网站生成一维码,识别不了。

ESP_Sandra
Posts: 46
Joined: Mon Dec 10, 2018 10:55 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby ESP_Sandra » Wed Jan 04, 2023 6:25 am

请问生成何种格式的一维码,识别距离如何?

hello_galaxy
Posts: 10
Joined: Mon Jul 19, 2021 12:20 pm

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby hello_galaxy » Thu Jan 05, 2023 12:00 pm

code39和code128,识别距离和识别二维码差不多,基本相同的识别距离二维码能识别到,一维码识别不到

lw7898
Posts: 4
Joined: Wed Jan 11, 2023 7:17 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby lw7898 » Wed Jan 11, 2023 8:02 am

好不容易刷了code_recognition示例,但二维码也识别不了! :cry: :cry: :cry:
请问能不能把zxing或zbar迁移过来呢?

lw7898
Posts: 4
Joined: Wed Jan 11, 2023 7:17 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby lw7898 » Sat Feb 04, 2023 4:37 pm

请问这问题解决了吗?我也是二维码可以识别,一维条形码识别不了!用的是AI Thinker的 esp-cam.

ESP_Aurora
Posts: 7
Joined: Tue Nov 02, 2021 7:55 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby ESP_Aurora » Mon Feb 06, 2023 3:04 am

一维码识别不了是什么分辨率下进行识别的?可以把图像分辨率CAMERA_FRAME_SIZE调高再试试能能识别
如果还是不行,请提供一下原始一维码图片

lw7898
Posts: 4
Joined: Wed Jan 11, 2023 7:17 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby lw7898 » Mon Feb 06, 2023 11:17 am

序 CAMERA_FRAME_SIZE CAMERA_PIXFORMAT esp_code_scanner_config_t qrcode纸质码 qrcode屏幕码 code128B屏幕码 code128B纸质码
1. FRAMESIZE_240X240 PIXFORMAT_RGB565 ESP_CODE_SCANNER_IMAGE_RGB565 190ms 240ms 扫不出(距离从40cm-2cm) 扫不出(距离从40cm-2cm)
2. FRAMESIZE_QVGA PIXFORMAT_RGB565 ESP_CODE_SCANNER_IMAGE_RGB565 200ms 260ms 240ms图像大才可以扫出 扫不出(距离从40cm-2cm)
3. FRAMESIZE_HVGA PIXFORMAT_RGB565 ESP_CODE_SCANNER_IMAGE_RGB565 450ms偶尔可扫出 扫不出 扫不出(距离从40cm-2cm) 扫不出(距离从40cm-2cm)

4. FRAMESIZE_240X240 PIXFORMAT_GRAYSCALE ESP_CODE_SCANNER_IMAGE_GRAY 140ms 180ms 190ms(偶尔可扫出,需不断调整距离) 扫不出(距离从40cm-2cm)
5. FRAMESIZE_QVGA PIXFORMAT_GRAYSCALE ESP_CODE_SCANNER_IMAGE_GRAY 170ms 200ms 70-250ms(大图像扫出率高,小图像偶尔可扫出)扫不出(距离从40cm-2cm)
6. FRAMESIZE_HVGA PIXFORMAT_GRAYSCALE ESP_CODE_SCANNER_IMAGE_GRAY 320ms 360ms 190ms(偶尔可扫出,需不断调整距离) 扫不出(距离从40cm-2cm)
7. FRAMESIZE_VGA PIXFORMAT_GRAYSCALE ESP_CODE_SCANNER_IMAGE_GRAY 640ms 750ms 扫不出(距离从40cm-2cm) 扫不出(距离从40cm-2cm)

综合结果: 第5种效果比较好,但小尺寸条形码始终扫不出。

qrcode纸质码 物理尺寸:2cm*2cm
qrcode屏幕码 物理尺寸:3cm*3cm
code128B屏幕码(大) 物理尺寸:9cm*5cm,5位字母数字A0066
code128B屏幕码(小) 物理尺寸:6cm*3cm,5位字母数字A0066
code128B纸质码 物理尺寸:3.5cm*1.2m,5位字母数字A0066
Attachments
www.baidu.com.png
www.baidu.com.png (6.85 KiB) Viewed 22238 times
barcode_A0066.png
barcode_A0066.png (2.32 KiB) Viewed 22238 times
esp32-who-code_recognition-test.txt
(2.2 KiB) Downloaded 233 times

lw7898
Posts: 4
Joined: Wed Jan 11, 2023 7:17 am

Re: esp-who可以识别到二维码,一维码识别不到,是怎么回事呢?

Postby lw7898 » Mon Mar 20, 2023 2:26 am

最近刷了opencv并使用以下处理:
cv::adaptiveThreshold(grayImage,threshold_output,255,ADAPTIVE_THRESH_GAUSSIAN_C,THRESH_BINARY,11,2);
但编译时报undefined reference to `sysconf`错误:
c:/espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/lib/esp32-psram/no-rtti\libstdc++.a(thread.o):(.literal._ZNSt6thread20hardware_concurrencyEv+0x0): undefined reference to `sysconf'
c:/espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: c:/espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/lib/esp32-psram/no-rtti\libstdc++.a(thread.o): in function `std::thread::hardware_concurrency()':
thread.cc:(.text._ZNSt6thread20hardware_concurrencyEv+0x6): undefined reference to `sysconf'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
构建完成(3 个错误,0 个警告): C:\Espressif\frameworks\esp-idf-v5.0\workspace\zbar_test\build

如果使用:
cv::threshold(grayImage, threshold_output, 127, 255, THRESH_BINARY);就无错误可编译通过。

Who is online

Users browsing this forum: No registered users and 11 guests