The problem indicates that, you are trying to use a deleted function. Some of automatic methods generated by the compiler(for ex: copy constructors), are deleted by developer in order to prevent unwanted implicit operations. On your answer by using pass by reference, for the _dst argument, you prevented unnecessary generation of a new cv::Mat& type as the function argument. That would also trigger a copy constructor of cv::Mat&, instead, the function took the original _dst, therefore a deleted copy constructor call is evaded.