Skip to content

Instantly share code, notes, and snippets.

@Kyu
Created May 27, 2022 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kyu/02af98bafc071606ce46726796b3d14b to your computer and use it in GitHub Desktop.
Save Kyu/02af98bafc071606ce46726796b3d14b to your computer and use it in GitHub Desktop.
import cv2
import numpy as np
import pyzbar.pyzbar as pyzbar
img_file = "qr.png"
image = cv2.imread(img_file)
decodedObjects = pyzbar.decode(image)
for obj in decodedObjects:
print("Type:", obj.type)
print("Data: ", obj.data, "\n")
cv2.imshow("QR Scanner", image)
cv2.waitKey(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment