We get computer generated QR Codes which are in Gray Scale format. These QR Codes are readable. However, we need to convert these Grayscale QR Codes into a Binary Format for a particular end application. This is where the problem arises. When we binarize the QR Code, we lose it's readibility (primarily reading via CamScanner app). We have tried some basic Binarization techniques available in OpenCV like simple Binarization at a fixed global threshold (tried multiple threshold values like 60, 80, 127, 150, 190) and adaptive threshold with weighted average. None of them is giving desired readbility results.
Asked
Active
Viewed 409 times
0
-
2Can you post an example picture? QR codes have very specific structure that you can use to help binarize, for e.g. standard block sizes and shapes. The famous [checker shadow illusion](https://en.wikipedia.org/wiki/Checker_shadow_illusion) gives some intuitive understanding of why global thresholding would not be ideal to use. – alkasm Apr 10 '18 at 20:12
-
If you can read them, why not re-generate them afresh with the same content - then they'll be pixel-perfectly binary.... – Mark Setchell Apr 10 '18 at 20:26
-
@AlexanderReynolds Sure...please give me one day to get back with images. – Ankit Rawat Apr 12 '18 at 10:14
-
@MarkSetchell Yes..that will be a good fallback option. – Ankit Rawat Apr 12 '18 at 10:16