app.py
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from qreader import QReader import cv2 # Create a QReader instance qreader = QReader() # Get the image that contains the QR code image = cv2.cvtColor(cv2.imread("qrcode.png"), cv2.COLOR_BGR2RGB) # Use the detect_and_decode function to get the decoded QR data decoded_text = qreader.detect_and_decode(image=image) print(decoded_text) |