I tried to reappear the results of this article
The import cv2
Print (cv2. Version. Opencv_version)
Detector=cv2. Wechat_qrcode_WeChatQRCode (" detect prototxt ", "detect. Caffemodel", "sr. Prototxt", "sr. Caffemodel")
Img=cv2. Imread (" img. JPG ")
Res, points=detector. DetectAndDecode (img)
Print (res, points)
The results suggest:
4.5.1.48
Traceback (the most recent call last) :
File "C:/Users/fio PycharmProjects untitled2/FFF. Py", line 5, in & lt; module>
Detector=cv2. Wechat_qrcode_WeChatQRCode (" detect prototxt ", "detect. Caffemodel", "sr. Prototxt", "sr. Caffemodel")
AttributeError: module 'cv2. Cv2' has no attribute 'wechat_qrcode_WeChatQRCode'
But my two opencv libraries are installed to the latest version
Opencv - contrib - python 4.5.1.48
Opencv - python 4.5.1.48
This is what causes unable to run through??
CodePudding user response:
May be a CV and installing process, some file not successful installation,Try the PIP uninstall then PIP install
CodePudding user response: