Skip to content

zxing-cpp can't detect this qr code image while other software can (binarizer issue) #809

@pichuang1984

Description

@pichuang1984

Hello,

I am having issues decoding the following qr code image sing zxing-cpp python binding. However, both the zxing online decoder (https://zxing.org/w/decode.jspx) and the iphone camera qr code scan can both decode it successfully.

Below is my code snappet:

import cv2, zxingcpp
file_path = 'test_image.png'
img = cv2.imread(file_path)

barcodes = zxingcpp.read_barcodes(img)
for barcode in barcodes:
	print('Found barcode:'
		f'\n Text:    "{barcode.text}"'
		f'\n Format:   {barcode.format}'
		f'\n Content:  {barcode.content_type}'
		f'\n Position: {barcode.position}')
if len(barcodes) == 0:
	print("Could not find any barcode.")

Any hint/suggestion on why python binding is not working?

test_image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions