-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
getDefaultName() isn't overloaded in Feature2D nor its children #6387
Copy link
Copy link
Closed
Description
Please state the information for your system
- OpenCV version: 3.1
- Host OS: Linux (Ubuntu 14.04)
- GCC 4.8.4
In which part of the OpenCV library you got the issue?
- features2D
Expected behaviour
cv::Feature2D my_feature2d;
cv::String name = my_feature2d.getDefaultName();
std::cout << "I'm of type : " << name << std::endl;
// in the console
// I'm of type : Feature2D
// Another example
cv::Ptr<Feature2D> f2d = xfeatures2d::SIFT::create();
cv::String name = f2d->getDefaultName();
std::cout << "I'm of type : " << name << std::endl;
// in the console
// I'm of type : Feature2D.SIFTActual behaviour
// in the console
I'm of type : my_object
// prints " my_object " as implemented in base class Algorithm.Additional description
The same manner the function read() / write() end up with an empty yaml file.
Code example to reproduce the issue / Steps to reproduce the issue
Please try to give a full example which will compile as is.
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/xfeatures2d/nonfree.hpp>
#include <iostream>
int main()
{
cv::Feature2D my_feature2d;
cv::String name = my_feature2d.getDefaultName();
std::cout << "I'm of type : " << name << std::endl;
cv::Ptr<cv::Feature2D> f2d = cv::xfeatures2d::SIFT::create();
name = f2d->getDefaultName();
std::cout << "I'm of type : " << name << std::endl;
cv::FileStorage fs("/tmp/whatever.yaml", cv::FileStorage::WRITE);
f2d->write(fs);
return 0;
}Reactions are currently unavailable