刚刚从 opencv-2.4.11 升级,KNearest 似乎不见了
In [27]: import cv2
In [28]: print(cv2.__version__)
3.0.0-beta
In [29]: cv2.KNearest()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-d2ea29abad59> in <module>()
----> 1 cv2.KNearest()
AttributeError: 'module' object has no attribute 'KNearest'
In [30]: cv2.K
cv2.KAZE_DIFF_CHARBONNIER cv2.KAZE_DIFF_WEICKERT cv2.KMEANS_RANDOM_CENTERS cv2.KeyPoint
cv2.KAZE_DIFF_PM_G1 cv2.KAZE_create cv2.KMEANS_USE_INITIAL_LABELS cv2.KeyPoint_convert
cv2.KAZE_DIFF_PM_G2 cv2.KMEANS_PP_CENTERS cv2.KalmanFilter cv2.KeyPoint_overlap