Not able to read yellow QRCodes
Status: Beta
Brought to you by:
spadix
I try to read multiple yellow QRCodes. I found out I need to make them gray scale to be readble. Not sure if it is a bug or I do something wrong. A lot of warehouses have yellow barcodes.
for test in test_data:
print(test.barcode, test.imageFile)
# find the barcodes in the image and decode each of the barcodes
image = cv2.imread(PATH_TEST_BARCODES + '/' + test.imageFile)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
barcodes = pyzbar.decode(gray)
# loop over the detected barcodes
for barcode in barcodes:
barcode_count = barcode_count + 1
Out-of-the-box zbarimg run against your sample file returned:
QR-Code:C00000000262
I guess the other ones are too small and/or distorted to be detected and decoded.
FYI: zbar has moved to https://git.linuxtv.org/zbar.git/