We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Again, some errors due to a series of refactoring operations made in the latest versions:
Ejemplo 22, line 25,26 and 27 crash:
knn = cv2.KNearest() # error knn.train(trainData, responses) # error ret, results, neighbours, dist = knn.find_nearest(newcomer, k) # error --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-8-cfe065aacd5a> in <module>() 23 # Classification 24 k = 5 ---> 25 knn = cv2.KNearest() 26 knn.train(trainData, responses) 27 ret, results, neighbours, dist = knn.find_nearest(newcomer, k) AttributeError: module 'cv2' has no attribute 'KNearest'
This version works:
knn = cv2.ml.KNearest_create() knn.train(trainData,cv2.ml.ROW_SAMPLE,responses) ret, results, neighbours, dist = knn.findNearest(newcomer, k)
+info: http://stackoverflow.com/a/30950853 http://stackoverflow.com/a/32990528 http://stackoverflow.com/a/34247966
The text was updated successfully, but these errors were encountered:
Fixed error.
Thank you so much.
Sorry, something went wrong.
It worked. Thanks
it's working,thanks
The below code worked for me also...
No branches or pull requests
Again, some errors due to a series of refactoring operations made in the latest versions:
Ejemplo 22, line 25,26 and 27 crash:
This version works:
+info:
http://stackoverflow.com/a/30950853
http://stackoverflow.com/a/32990528
http://stackoverflow.com/a/34247966
The text was updated successfully, but these errors were encountered: