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
Read Color QR code #693
Comments
In general, QR codes should have a dark foreground on a light background. The color shouldn't matter, as long as the contract is high enough. If the QR code has a light foreground on dark background, you'll have compatibility issues with many barcode scanners. With this library, you can use the "INVERTED_SCAN" or "MIXED_SCAN" modes - see this:
If there is a logo in between, there is also a chance that it removes too much info to be able to scan properly. |
In this case the logo is not specifically an issue, but the contrast is simply too low for the current algorithms to work well. If you have control over how the barcodes are generated, pick a much darker color for the foreground. If you can't, you'll have difficulty with these barcodes. |
Yes I can change the contrast. I will do the needful. Thanks for help :) |
Result is: https:\www.google.com First, i think need to reduce image contrast, it work but not good as i expected. (for camera scan: you can do this in SourceData.class with YUVLuminaceSource. For image scan you can convert bitmap to black and white bitmap) After more research and trick, this is my solution: |
Hi, I also have the same issue reading the qr image. May I know what the issue is? Thanks! |
If it scans and gives a result, the issue is not likely with the color or size of the image. Check what results you get with other scanners. It's possible that it's an issue with how the barcode was encoded, rather than with the scanning. If you do get different results with other scanners, create a new issue here with a sample of the barcode. |
I use the built-in scanner on iPhone. |
Not able to read QR codes that are colored and have a logo in between
Which library version are you using?
v4.3.0
Which phone/tablet are you using, and which Android version does it run?
Tested on Samsung A51 and Samsung Note 20(API 31/Android 11)
Does the same happen on other devices or an emulator?
yes
In the case of an error do you have a stack trace or adb logs?
NA
I want to scan QR codes that are colored and have a logo in between. Unfortunately, nothing happens the scanner just scans unless and until I go back.
The text was updated successfully, but these errors were encountered: