-
Notifications
You must be signed in to change notification settings - Fork 124
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
Image with a QR and high frequency components does not decode #122
Comments
I made a manual filtering with the GIMP. In this case, if you first binarize and then you do the average blur to remove the white spots, the radius of the average blur can be lower. Another option I tested was to reduce the image size to 1/10th of the width and height, and resize it to the original size again (supersampling). Then binarize with threshold at 56. It also works. |
Well, Binary Eye already downsamples the camera frame to 75% (see here) which is kind of equivalent to applying a slight blur (the downsampling also results in less data to process what's good for performance on bad devices). Looking at your samples (you should really have a quiet zone around your QR Codes by the way), I believe the best solution would be to apply an Adaptive Threshold algorithm (something like this). There are a couple of Adaptive Threshold implementations for RenderScript available so it would be quite easy to try this. And Binary Eye has device tests, so it's easy to tell when a change breaks something. |
I was talking about blurring because I supposed Binary Eye uses a local threshold algorithm for binarization (https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/common/HybridBinarizer.java) which is supposed to overcome the problems this sample has: being a high frequency image. |
Example: https://pbs.twimg.com/media/EZIyEWrXQAMfNQs?format=jpg&name=4096x4096
If blurring is applied to the original image, Binary Eye is capable of decoding the QR code.
A filter needs to be applied to smooth images. Smaller codes will need the phone to be closer or reduce the amount of blurring applied in order to not lose detail. A threshold should be computed to know the amount of blurring needed, if possible.
The text was updated successfully, but these errors were encountered: