I've got scanned image files that I perform some preprocessing on and get them looking something like this:
My phone's ZBar app can read this QR code fine, but zbarimg
seems to be unable to figure it out. I've tried all sorts of things in ImageMagick to make it smoother (-smooth
, -morphology
) but even with slightly better-looking results, zbarimg
still comes up blank.
Why would my phone's ZBar be so much better than my computer's (zbar-0.10
)? Is there anything I can do to get zbarimg
to read this successfully?
But can hackers get through a QR code? Unfortunately, the answer is yes. Hackers have recently caught up with the QR code craze and have begun placing infected and decoy QR codes in order to infect phones and hack private users directly through their personal devices.
Your Phone's Gallery App (Android) Open the photo with the QR code in the native Gallery app. Tap on the Google Lens icon to scan the code. The results should appear immediately.
You can try morphological closing.
Python code:
# -*- coding: utf-8 -*-
import qrtools
import cv2
import numpy as np
imgPath = "Fdnm1.png"
img = cv2.imread(imgPath, 0)
kernel = np.ones((5, 5), np.uint8)
processed=cv2.morphologyEx(img, cv2.MORPH_CLOSE, kernel)
cv2.imwrite('test.png', processed)
d = qrtools.QR(filename='test.png')
d.decode()
print d.data
Result:
1MB24
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With