Ask Your Question
0

How to replace SURF with FREAK in Features2D + Homography example??

asked 2013-04-23 06:57:38 -0600

Dirhem gravatar image

I am trying to run Features2D + Homography example on android however SURF is excluded from OpenCV4Android distribution. My question is simple, how can i modify this example to replace SurfFeatureDetector and SurfDescriptorExtractor with something that will work on Android?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-23 07:47:58 -0600

Nyenna gravatar image

updated 2013-04-23 07:55:39 -0600

FREAK will only extract descriptors. You need to detect features points first, for instance using FAST. Here is a small sample of what you could do:

cv::FastFeatureDetector detector(50);
cv::FREAK extractor;

std::vector<cv::KeyPoint> keypoints;
cv::Mat descriptors;

detector.detect(img, keypoints);
extractor.compute(img, keypoints, descriptors);

Notice that FREAK extracts binary descriptors, which is different than SURF.

Hope it helps.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-23 06:57:38 -0600

Seen: 1,245 times

Last updated: Apr 23 '13