Ask Your Question
0

Problem extracting descriptors of FAST opencv3

asked 2015-05-12 11:27:34 -0600

Jaka gravatar image

Hi everybody, I'm started to use openCV(3.0.0-dev) and now I'm trying different way to extract features from images (Fast, GoodFeaturesToTrack, Mser, Star, Sift, Surf). I started with SIFT and SURF and my code works good but now i'm tryng with FAST and i can't understand how extract descriptors of keypoints!

For SIFT, for example, I used this code

    detector = cv2.xfeatures2d.SIFT_create()
    kp, des = detector.detectAndCompute(img ,None)

In des i have my descriptors and it's ok, but when I've tried with FAST

detector = cv2.FastFeatureDetector_create()
kp, des = detector.detectAndCompute(img ,None)

I've obtained following error -> "OpenCV Error: The function/feature is not implemented () in detectAndCompute"

I've noted that there is the method dectect() and I can extract keypoints but what about descriptors? Why it works for SIFT/SURF and not for FAST? How can I obtain the descriptors? Thank you for answer.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-05-12 11:59:30 -0600

berak gravatar image

updated 2015-05-12 12:37:22 -0600

FAST is only a keypoint detector. (you can't get any feature descriptors from it)

so you're restricted to :

detector = cv2.FastFeatureDetector_create()
kp = detector.detect(img ,None)

now, to extract features, you will need a separate instance of a DescriptorExtractor, let's try BRISK:

 br = cv2.BRISK_create();
 kp, des = br.compute(img,  kp)  # note: no mask here!
edit flag offensive delete link more

Comments

Hi berak thank you for your answer, I've tried and it works. Now I'll search about more information about DescriptorExtractor :)

Jaka gravatar imageJaka ( 2015-05-13 02:37:50 -0600 )edit

For some reason BRISK and ORB return None results. However, SIFT, SURF, and DAISY return descriptors. I'm wondering if AGAST or FAST key points are incompatible with binary feature descriptors?

opencvslave gravatar imageopencvslave ( 2016-01-27 19:37:35 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-05-12 11:24:06 -0600

Seen: 4,765 times

Last updated: May 12 '15