Blockstream / Blockstream/Jade

T-Display S3 PRO w/ OV5640: lots of QUIRC error ECC failure when scanning QR on computer screens

Open
#190 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
496
Forks
127
PR merge metrics
No merged PRs in 30d

Description

After applying fix for #183, I found that the OV5640 still has a hard time scanning QR codes from computer screens.

Logs shows a lots of QUIRC error due to ECC failure.

Logs:
```
�clogXBI (1876) ./main/camera.c: 236: CAMERA_IMAGE_WIDTH: 640
--- Warning: Failed to decode multiple lines in a row. Try checking the baud rate and XTAL frequency setting in menuconfig
�clogXCI (1876) ./main/camera.c: 237: CAMERA_IMAGE_HEIGHT: 480
�clogXEI (1876) ./main/camera.c: 238: UI_CAMERA_IMAGE_WIDTH: 480
�clogXFI (1876) ./main/camera.c: 239: UI_CAMERA_IMAGE_HEIGHT: 640
--- Warning: Failed to decode multiple lines in a row. Try checking the baud rate and XTAL frequency setting in menuconfig
�clogX@I (1876) ./main/camera.c: 240: UI_DISPLAY_WIDTH: 336
�clogXAI (1876) ./main/camera.c: 241: UI_DISPLAY_HEIGHT: 222
�clogXJI (1876) ./main/camera.c: 242: DISPLAY_IMAGE_SCALE_FACTOR: 66%
--- Warning: Failed to decode multiple lines in a row. Try checking the baud rate and XTAL frequency setting in menuconfig
�clogXCI (1876) ./main/camera.c: 243: DISPLAY_IMAGE_WIDTH: 320
�clogXDI (1876) ./main/camera.c: 244: DISPLAY_IMAGE_HEIGHT: 222
�clogX5I (1876) ./main/camera.c: 245: XOFFSET: 0
...
�clogXHI (55466) ./main/qrmode.c: 1709: Scanning/posting 'pin' data
--- Warning: Failed to decode multiple lines in a row. Try checking the baud rate and XTAL frequency setting in menuconfig
�clogX;I (55466) ./main/qrscan.c: 186: SCAN WIDTH: 353
�clogX QVGA, the qrscan reliability improves greatly
2. If I kept camera image resolution at VGA but up the scan width / height to a higher resolution, i.e. 440, the qrscan reliability seems to also improve

My hypothesis is that the smaller scan resolution (compared to the higher camera resolution) requires the camera to be zoomed further out and the higher contrast of black around the QR code is causing the details of the QR code to get washed out.

This is somewhat visible from the S3 Pro screen - I also tried setting `camera_sensor->set_contrast(camera_sensor, -1|-2)` but that didn't seem to help much as reliably as either of the above, unfortunately.

Unclear if this is a S3 + Camera resolution VGA issue in general or simply due to the IQ of the OV5640 camera module.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.