I am using OpenCV C++ library but I don't manage to create a DescriptorExtractor
object.
Here is what I did :
Mat img = imread("testOrb.jpg",CV_LOAD_IMAGE_UNCHANGED);
std::vector<KeyPoint> kp;
cv::Ptr<cv::ORB> detector = cv::ORB::create();
detector->detect( img, kp )
//this part works
DescriptorExtractor descriptorExtractor;
Mat descriptors;
descriptorExtractor.compute(img, kp, descriptors);
//when these 3 lines are added, an error is thrown
But I have the following error message :
OpenCV Error: The function/feature is not implemented () in detectAndCompute, file ...
DescriptorExtractor
is an abstract class, so you can't instantiate it. It's just a common interface for descriptor extractors. You can do like:
Ptr<DescriptorExtractor> descriptorExtractor = ORB::create();
Mat descriptors;
descriptorExtractor->compute(img, kp, descriptors);
Note that exists also FeatureDetector
, that is the common interface for detecting keypoints, so you can do:
std::vector<KeyPoint> kp;
Ptr<FeatureDetector> detector = ORB::create();
detector->detect(img, kp);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With