I am trying to use the common interface to features detectors and extractors for SURF features. The documentation states that cv::SURF implements the Features2D interface, but when I try:
cv::Ptr<cv::SURF> surf = cv::SURF::create(400);
I get the compiler error:
features_analysis.cpp:134:50: error: no matching function for call to ‘cv::SURF::create(int)’
I have installed xfeatures2D from the contrib module but I am also confused about namespaces, is SURF in cv::SURF or cv::xfeatures2d::SURF ? And what is the correct header to include? The documentation is very confusing and contradictory at times.