Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to scan image with large black backgrounds #593

Open
ioripalm opened this issue Mar 29, 2024 · 1 comment
Open

Unable to scan image with large black backgrounds #593

ioripalm opened this issue Mar 29, 2024 · 1 comment
Labels

Comments

@ioripalm
Copy link

ioripalm commented Mar 29, 2024

I replaced the image src in the example(barcode-image/index.html) to test whether the barcode can be scanned from the my high-definition camera.
微信图片_20240330112045
The resolution of the photo by my high-definition camera is 3264*2448.
1
In Picture 1, you can see that the barcode area only occupies a small area in the middle of the photo.This depends on the size of the shooting paper. Sometimes it is A4, sometimes it is A5, and sometimes it is just a small tip.After testing, it always fails.
If I crop out the black background of the original photo, it's work well.
2
Next I tried replacing the black background with white. Miraculously, it worked.
For pictures with a black background, is the black background recognized as part of the barcode?
3
I try to use this to crop the image and then scan the barcode is worked. Is there a way to directly identify the barcode?

@ioripalm ioripalm changed the title The image size is too large and the barcode cannot be scaned Unable to scan image with large black backgrounds Mar 30, 2024
@ioripalm
Copy link
Author

I found a nice example base : ZXing WASM
The only drawback is that it is not very accurate in recognizing barcodes in non-horizontal conditions, which quaggaJS does very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant