1 | initial version |
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> keypoints1, keypoints2;
cv::Mat descriptors1, descriptors2;
std::vector<cv::DMatch> matches;
detector.detect(frame1, keypoints1);
extractor.compute(frame1, keypoints1, descriptors1);
detector.detect(grayFrame2, keypoints2);
extractor.compute(grayFrame2, keypoints2, descriptors2);
Notice that FREAK extracts binary descriptors, which is different than SURF.
Hope it helps.
2 | No.2 Revision |
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> keypoints1, keypoints2;
keypoints;
cv::Mat descriptors1, descriptors2;
std::vector<cv::DMatch> matches;
descriptors;
detector.detect(frame1, keypoints1);
extractor.compute(frame1, keypoints1, descriptors1);
detector.detect(grayFrame2, keypoints2);
extractor.compute(grayFrame2, keypoints2, descriptors2);
detector.detect(img, keypoints);
extractor.compute(img, keypoints, descriptors);
Notice that FREAK extracts binary descriptors, which is different than SURF.
Hope it helps.