(cv) pi@raspberrypi:~/Desktop $ python pntc6.py
Traceback (most recent call last):
File "pntc6.py", line 24, in <module>
knn = cv2.m1.KNearest_create()
AttributeError: 'module' object has no attribute 'm1'
i am trying to follow the tutorial http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_ml/py_knn/py_knn_opencv/py_knn_opencv.html and had this problem OpenCV 3.0.0-beta missing KNN?
i tried to replace KNearest
with cv2.ml
and cv2.ml
but all i get is AttributeError: 'module' object has no attribute 'm1'
(i am using a raspberry pi and followed this tutorial to install open cv http://www.pyimagesearch.com/2015/10/26/how-to-install-opencv-3-on-raspbian-jessie/ subsequently i pip installed matplotlib)