Why cv::cuda::DescriptorMatcher not a subclass of cv::DescriptorMatcher [closed]

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

krips89 gravatar image

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

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 reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-07 13:05:40.964724