Ask Your Question

Revision history [back]

In OpenCV 3.0-dev, user can decide the behavior of UMat by cv::ocl::setUseOpenCL().

cv::ocl::setUseOpenCL(true); // enable OpenCL in the processing of UMat
cv::ocl::setUseOpenCL(false); // disable OpenCL in the processing of UMat

And, you need to include the following header to use this function.

#include <opencv2/core/ocl.hpp>