Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

yes, they are all 'abstract' (lack a public constructor).

the only way to make one is the 'create' function, like:

Ptr<SIFT> sift = SIFT::create(...);

yes, they are all 'abstract' (lack a public constructor).

the only way to make one is the 'create' function, like:

using namespace cv::xfeatures2d;

Ptr<SIFT> sift = SIFT::create(...);
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

if you want to use the FeatureDetector::create method, that's another way:

xfeatures2d::initModule_xfeatures2d();

Ptr<SIFT> sift = FeatureDetector::create("SIFT");

yes, they are all 'abstract' (lack a public constructor).

the only way to make one is the 'create' function, like:

using namespace cv::xfeatures2d;

Ptr<SIFT> sift = SIFT::create(...);
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

if you want to use the FeatureDetector::create Feature2D::create method, that's another way:

xfeatures2d::initModule_xfeatures2d();

Ptr<SIFT> // both detector and extractor:   
Ptr<Feature2D> sift = Feature2D::create("SIFT");

// or, if you need the detector part only:    
Ptr<FeatureDetector> sift = FeatureDetector::create("SIFT");

yes, they are all 'abstract' (lack a public constructor).

the only way to make one is the 'create' function, like:

using namespace cv::xfeatures2d;

Ptr<SIFT> sift = SIFT::create(...);
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[EDIT: 2014.10.23 : below is no more possible.]

if you want to use the Feature2D::create method, that's another way:

xfeatures2d::initModule_xfeatures2d();

// both detector and extractor:   
Ptr<Feature2D> sift = Feature2D::create("SIFT");

// or, if you need the detector part only:    
Ptr<FeatureDetector> sift = FeatureDetector::create("SIFT");