# import packages import cv2 from pyzbar import pyzbar # define path path = "barcode-tutorials-raspberrypi.de_.jpg" # load image image = cv2.imread(path) # find QR and barcodes within the image barcodes = pyzbar.decode(image) for barcode in barcodes: print(barcode.data)