I’m trying to update my code to use cv2.SURF() as opposed to cv2.FeatureDetector_create("SURF") and cv2.DescriptorExtractor_create("SURF"). However I’m having trouble getting the descriptors after detecting the keypoints. What’s the correct way to call SURF.detect?
I tried following the OpenCV documentation, but I’m a little confused. This is what it says in the documentation.
Python: cv2.SURF.detect(img, mask) → keypoints¶
Python: cv2.SURF.detect(img, mask[, descriptors[, useProvidedKeypoints]]) → keypoints, descriptors
How do I pass the keypoints in when making the second call to SURF.detect?
I am not sure whether i understand your questions correctly. But if you are looking for a sample of matching SURF keypoints, a very simple and basic one is below, which is similar to template matching:
Below are the results I got (copy pasted template image on original image using paint):
As you can see, there are some small mistakes. But for a startup, hope it is OK.