NetElite

导航

 
Firstly, uninstall opencv-python by:
pip uninstall opencv-python
then,
pip install opencv-contrib-python
That's it!

Sample code:
import cv2
img=cv2.imread('test.jpg')
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
sift=cv2.xfeatures2d.SIFT_create()
kp=sift(gray,None)
img=cv2.drawKeypoints(gray,kp,img)
cv2.imwrite('sift_keypoints.jpg',img)
posted on 2018-03-28 19:09  Gravitonium  阅读(359)  评论(0编辑  收藏  举报