Home > other >  Ask a small problem
Ask a small problem

Time:03-16

https://www.toutiao.com/i6924143326145036804/? Tt_from=mobile_qq & amp; Utm_campaign=client_share & amp; Timestamp=1612171870 & amp; App=news_article & amp; Utm_source=mobile_qq & amp; Utm_medium=toutiao_android & amp; Use_new_style=1 & amp; Req_id=202102011731090100270240120 b002932 & amp; F3e share_token c62a0=082-7505-4-8 a43 - f37a1d3aef88 & amp; Group_id=6924143326145036804

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:

reference 1/f, old coconut response:
may be a CV and installing process, some file not successful installation,
Try the PIP uninstall then PIP install
can you test? I tried I can't

CodePudding user response:

reference 1/f, old coconut response:
may be a CV and installing process, some file not successful installation,
Try the PIP uninstall then PIP install


I see, that calls the method should be in opencv - contrib - python, call this module is also import cv2?
  • Related