I am using pyzbar to decode barcodes on Raspberry Pi 3 using Pi Camera v1 (resolution 1296x972). Qr codes are decoded very well. When decoding two dimensional barcodes (CODABAR), the success rate is very low.
I have tried saving one frame from the video stream and decode it with pyzbar on the Raspberry and it fails. When i try to decode the same image on Ubuntu, and decodes it successfully.
from pyzbar import pyzbar from PIL import Image img = Image.open('sampleImage.png') d = pyzbar.decode(img) print (d)
Any thoughts what may be the problem?
from picamera import PiCamera self.camera = PiCamera() self.camera.sharpness = 100
The following image is with sharpness 100. However,
pyzbar still fails to decode it on the Raspberry Pi.