Is there a reason behind hiding FeatureExtractor::compute(...) in Feature 2D?

asked 2014-10-02 04:59:49 -0600

Jan Marek gravatar image

In features2d.hpp two interfaces for compute are defined in class DescriptorExtractor:

    CV_WRAP void compute( InputArray image, CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints, OutputArray descriptors ) const;
    void compute( InputArrayOfArrays images, std::vector<std::vector<KeyPoint> >& keypoints, OutputArrayOfArrays descriptors ) const;

However, the class Feature2D which inherits from FeatureExtractor only overwrites:

CV_WRAP void compute( InputArray image, CV_OUT CV_IN_OUT std::vector<KeyPoint>& keypoints, OutputArray descriptors ) const;

This hides the second overload of compute in child classes. And if one e.g. creates a SiftDescriptorExtractor instance and calls compute with the second overload, one will get a compiler error that this signiture is unknown. Is there any reason behind this impelmentation or is it a bug?

edit retag flag offensive close merge delete

Comments

1

I call it a bug. Probably the functionality should be exposed for the feature2D class also.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-10-02 06:50:06 -0600 )edit