Why cv::cuda::DescriptorMatcher not a subclass of cv::DescriptorMatcher

asked 2015-04-23 10:43:59 -0500

krips89 gravatar image

updated 2015-04-23 10:50:33 -0500

They both provide the same interface. In my opinion cuda::DescriptorMatcher is a specialized implementation of DescriptorMatcher and so should have been a subclass of DescriptorMatcher. It makes sense to provide one base class providing all the matching interface.

Because of this people cannot use the advantage of dynamic polymerphysm (will have to use ifs to distinguish, care and call objects of different types).

A beautiful analogy would be the class cv::cuda::ORB which is a sublcass cv::ORB and hence cv::FeatureDetector which provides the common interface like detect() and compute()

edit retag flag offensive close merge delete