Menu

#175 Not able to read yellow QRCodes

latest_mercurial
open
nobody
None
5
2021-04-08
2019-12-06
V4A001
No

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
1 Attachments

Discussion

  • Martin

    Martin - 2021-04-06

    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.

     
  • Martin

    Martin - 2021-04-08

    FYI: zbar has moved to https://git.linuxtv.org/zbar.git/

     

Log in to post a comment.

MongoDB Logo MongoDB