Ask Your Question

sift descriptor in python

asked 2014-03-31 21:50:10 -0500

In my problem, I have a set of predefined keypoints. I wanted to generate a set of SIFT descriptors with these keypoints. Therefore I do not need to call the sift.detectAndCompute function. I was trying to use sift.compute function to do this for me (according to the tutorial), however there says that "compute" is not an attribute of SIFT. Any idea about this problem? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-04-01 08:11:47 -0500

Guanta gravatar image

The tutorial works perfectly fine. Minimal example:

import cv2
img = cv2.imread('<path-to-your-image>', cv2.CV_LOAD_IMAGE_GRAYSCALE)
my_sift = cv2.SIFT()
kp = my_sift.detect(img)
kp, des = my_sift.compute(img, kp)
edit flag offensive delete link more

Question Tools


Asked: 2014-03-31 21:50:10 -0500

Seen: 163 times

Last updated: Apr 01 '14