Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributeerror: module cv2 has no attribute KNearest #1

Closed
Aftab890 opened this issue Dec 27, 2017 · 2 comments
Closed

Attributeerror: module cv2 has no attribute KNearest #1

Aftab890 opened this issue Dec 27, 2017 · 2 comments

Comments

@Aftab890
Copy link

I am getting this KNearest error. Attributeerror: module cv2 has no attribute KNearest . The setup environment is following.
Python3.5
tesnorflow1.10
opencv3.3
windows10

Kindly help me to resolve this error

@pavitrakumar78
Copy link
Owner

https://stackoverflow.com/questions/28297933/can-not-find-knearest-in-python-cv2

Use cv2.ml.KNearest_create() instead of cv2.KNearest(). Please note that results may vary if you are using different versions of libraries. You may need to make more changes to the code to make it compatible with recent libraries.

@pavitrakumar78
Copy link
Owner

pavitrakumar78 commented Dec 27, 2017

@Aftab890 I have updated the readme and the code (NEW_digit_recog.py). You may want to take a look at the newer code and the comments inside the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants