Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Feature Detection Interface vs Specific Classes

Hi everyone,

I was wondering what the difference is between cv::FeatureDetector and specific classes like cv::SIFT.

If I create an instance of cv::SIFT as follows, my code works:

cv::SIFT sift;

// Detect key points and extract descriptors
std::cout << "Detecting key points" << std::endl;
sift(front, cv::Mat(), frontKeyPoints, frontDescriptors);

but if I try to use the cv::FeatureDetector::create my program crashes!

// Create SIFT feature detector    
siftDetector = cv::FeatureDetector::create("SIFT");

// Detect key points
std::cout << "Detecting key points" << std::endl;
siftDetector->detect(front, frontKeyPoints);

Why does the FeatureDetector crash? Is one better to use than the other?

Thanks