logo

... qr code: read



Notes

To read QR codes we'll need another dependency.

%pip install opencv-python==4.4.0.44

Given this dependency you can retreive the code from a QR code via;

import cv2
import matplotlib.pylab as plt 

# read the QRCODE image
img = cv2.imread("qrcode.png")

detector = cv2.QRCodeDetector()
data, bbox, straight_qrcode = detector.detectAndDecode(img)

Feedback? See an issue? Something unclear? Feel free to mention it here.



If you want to be kept up to date, consider signing up for the newsletter.