Ask Your Question

Revision history [back]

Best preactice for writing functions accepting cv::Mat and cv::UMat as inputs

What is the simplest and cleanest way to write a function accepting input arguments of type Mat or UMat? Should i use InputArray, use templates or is there a better alternative? I am currelnlty having functions with identical implementation written for both Mat and UMat.