SIFT or SURF - provide key points and retrieve descriptors

I am trying to use OpenCV (2.4.6.0) to retrieve the descriptors from the key points that I have provided.

So far I have not been successful ...

l, des = surf.detectAndCompute(self.gray,None,useProvidedKeypoints = True)

where lis an array of elements. I'm not sure where to introduce the key points that I already have ...

Does anyone know how I can do this using SIFT or SURF?

Thank you for your help!

+4
source share
1 answer

Python detectAndCompute(), ++ . , . l, DescriptorExtractor .

, FAST, SURF:

im = cv2.imread(path_to_image)
fast = cv2.FeatureDetector_create('FAST')
l = fast.detect(im)
surf = cv2.DescriptorExtractor_create('SURF')
l, des = surf.compute(im, l)

SIFT. 'SIFT' cv2.DescriptorExtractor_create().

+4

All Articles