OpenCV has a sample demonstrating FREAK at this link. FREAK is a feature extractor like any other, and exposes the same interface. FREAK does not detect features, so you must use a different method (like cv::goodFeaturesToTrack()
) to detect points of interest.
A summary of that sample is as follows:
cv::Mat image; //This is the image
std::vector<cv::KeyPoint> keypoints; // This comes from your feature detector of choice
cv::Mat descriptors;
cv::FREAK freak;
freak.compute(image, keypoints, descriptors);
// Now "descriptors" contains descriptor data for the input keypoints.