Ask Your Question
0

OpenCV error: ‘create’ is not a member of ‘cv::FeatureDetector {aka cv::Feature2D}’

asked 2015-07-02 03:02:37 -0600

updated 2015-07-02 03:05:24 -0600

I'm trying a simple AKAZE features example and I got the error ‘create’ is not a member of ‘cv::FeatureDetector:

Ptr<FeatureDetector> detector = FeatureDetector::create("AKAZE");

Any idea on how to initialize AKAZE? I tried matchmethod_orb_akaze_brisk.cpp example previously in my Ubuntu 12.04 but it gave me a Segmentation Fault.

edit retag flag offensive close merge delete

Comments

2

There is no more abstract create for features, in OpenCV 3.0, you shall create the needed featureDetector: see the docs

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-02 03:34:30 -0600 )edit
5

the old Algorithm interface is gone in 3.0.

Ptr<FeatureDetector> detector = AKAZE::create();
Ptr<Feature2D> sift = xfeatures2d::SIFT::create(); // if you have the contrib repo

also please see the tutorial

berak gravatar imageberak ( 2015-07-02 03:38:23 -0600 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2015-07-04 05:01:38 -0600

updated 2015-07-04 05:51:26 -0600

Thanks a lot thdrksdfthmn and berak for the answer. (I missed the recent AKAZE tutorial.)

(If its ok) Could anyone of you please add (your comments) as an answer to close off this topic?

//Ptr<FeatureDetector> detector = FeatureDetector::create("AKAZE"); // Old


 Ptr<AKAZE> detector = AKAZE::create();    // // This worked in OpenCV 3.0; and also

 Ptr<AKAZE> detector = AKAZE::create(AKAZE::DESCRIPTOR_MLDB_UPRIGHT, 0, 3, 0.0001, 4, 4, KAZE::DIFF_PM_G2);

From the default constructor and the more detailed:

 Ptr<AKAZE> AKAZE::create(int descriptor_type,
                         int descriptor_size, int descriptor_channels,
                         float threshold, int octaves,
                         int sublevels, int diffusivity)
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-02 03:02:37 -0600

Seen: 5,465 times

Last updated: Jul 04 '15