opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.41k stars 5.76k forks source link

No 'text' in cv2.cv2 #1479

Closed apple502j closed 6 years ago

apple502j commented 6 years ago

opencv_contrib/modules/text/samples/textdetection.py

when I use it, Python says "AttributeError: module 'cv2.cv2' has no attribute 'text'". What should I do? I want to do OCR with python.

env: CV2 latest version (pip install cv2) Python 3.6 v3.6.0:41df79263a11 Windows 7 Home Premium,SP1,64bit pyocr with tesseract 3.02.02

alalek commented 6 years ago

pip install cv2

We don`t support this here (no idea who is owner of this package).

sham-hq commented 6 years ago

You need to install same version of OpenCV and opencv_contrib. I faced the same problem and solved it with installing opencv_contrib of same version of OpenCV.