Ask Your Question

Revision history [back]

OpenCV detector is missing, how can I get it?

I am just trying out qr codes for the first time, using Python3.

I am following the instructions from this webpage:

When I get to "initialize the cv2 QRCode detector" I get this error in the Python shell:

initialize the cv2 QRCode detector detector = cv2.QRCodeDetector()

Traceback (most recent call last): File "<pyshell#20>", line 1, in <module> detector = cv2.QRCodeDetector() AttributeError: module 'cv2' has no attribute 'QRCodeDetector'

I installed OpenCV in Ubuntu with:

sudo apt install opencv-python3

How can I get the detector? AttributeError: module 'cv2' has no attribute 'QRCodeDetector'