Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I recommend you to use cv::InputArray, cv::OutputArray and cv::InputOutputArray (link) instead of cv::Mat&. Its much more flexible. In OpenCV 3.0 you can pass cv::Mat, std::vector, cv::UMat and even cv::cuda::GpuMat with it.

You can pass through cv::InputArray into OpenCV functions, where OpenCLwill be used, if available (cv::UMat).

And in my oppinion its cleaner to code with. You can take a look in the source code to learn how to use it.