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

Recognition of QR code performs poorly in dark mode #30

Open
polymorpher opened this issue Sep 2, 2021 · 1 comment
Open

Recognition of QR code performs poorly in dark mode #30

polymorpher opened this issue Sep 2, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@polymorpher
Copy link

This happens when we use the computer's camera (and this library, in browser) to scan the QR code displayed on a mobile phone's screen, when the phone is set to dark mode, such that even though the code itself is black and white as usual (with a short white border), the rest of the screen is black / dark grey.

An example use case scenario of this is to scan the QR code exported by Google Authenticator on iOS. The more accounts selected, the more complex the QR code and the harder it is for the library to recognize anything. In my experiment using various parameters (varying number of accounts, light conditions, background environment, glare and reflections, different camera resolutions, ability to auto-focus, etc.), I found the library is generally unable to recognize anything even with only 1 account exported (i.e. a rather simple QR code). The library only successfully recognized a QR code displayed in dark mode using a camera with auto-focus ability (Logitech C920, even though it is only 480p-720p). The library fails completely on standard cameras such as Mac's default camera, FaceTime 720p/1080p.

In contrast, https://github.com/JodusNodus/react-qr-reader can generally recognize the QR codes displayed in dark mode, until the code gets fairly complex (>=3 accounts) and the image received is quite blurred / disturbed (by reflections, etc.)

@buffcode
Copy link

buffcode commented Sep 3, 2021

@polymorpher This component ist just a React wrapper for @zxing/browser, so probably you want to raise an upstream issue unless it is really a problem with the wrapper.

Maybe you can cross-check your scenario with their online demo: https://zxing-js.github.io/library/

@JonatanSalas JonatanSalas self-assigned this Sep 10, 2021
@JonatanSalas JonatanSalas added the bug Something isn't working label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants