Case Study: Polymorphism for Image Processing
问题 I'm studying Digital Image Processing by myself and would be really grateful if somebody could comment whether polymorphism should be applied for this case or if there's a better class design. Basically, a 2D Filter/Kernel can be either: non-separable or separable . An important kernel operation is the convolution and the way to compute it, depends on the filter type. template < typename T > class CKernel2D{ public: //.... virtual CMatrix<T> myConvolution(const CMatrix<T> & input) = 0; //....