OpenCV 中的 UMat 和 Mat 有什么区别?

What is the difference between UMat and Mat in OpenCV?

我已经阅读了文档,但没有得到关于 UMat 的清晰详细描述;但是我认为它与 GPU 和 CPU 有关。请帮帮我。 谢谢。

也许本文档的第 3 部分会有所帮助:[link 现在已损坏] https://software.intel.com/sites/default/files/managed/2f/19/inde_opencv_3.0_arch_guide.pdf

具体来说,第 3.1 节:

A unified abstraction cv::UMat that enables the same APIs to be implemented using CPU or OpenCL code, without a requirement to call OpenCL accelerated version explicitly. These functions use an OpenCL-enabled GPU if exists in the system, and automatically switch to CPU operation otherwise.

和第 3.3 节:

Generally, the cv::UMat is the C++ class, which is very similar to cv::Mat. But the actual UMat data can be located in a regular system memory, dedicated video memory, or shared memory.

Link 到 @BourbonCreams:
评论中建议的用法 https://docs.opencv.org/3.0-rc1/db/dfa/tutorial_transition_guide.html#tutorial_transition_hints_opencl