Compute descriptor with Sift compute python

If you look at the documentation

You should declare SIFT as:

sift = cv.SIFT_create()

Therefore the correct code will be:

sift = cv.SIFT_create()
kp, des = sift.detectAndCompute(gray,None)

Update

If you have already calculated the key-points (kp) then draw it on the current image:

img=cv.drawKeypoints(gray,kp,img)
cv.imwrite('sift_keypoints.jpg',img)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top