I have been through the documentation and didn't get a clear detailed description about UMat; however I think it has something to relate with GPU and CPU. Please help me out. Thank you.
1 Answers
Perhaps section 3 of this document will help: [link now broken] https://software.intel.com/sites/default/files/managed/2f/19/inde_opencv_3.0_arch_guide.pdf
Specifically, section 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.
and section 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 to usage suggested in the comments by @BourbonCreams:
https://docs.opencv.org/3.0-rc1/db/dfa/tutorial_transition_guide.html#tutorial_transition_hints_opencl

- 16,331
- 3
- 32
- 49
-
1Link is broken. I found this instead but it has a very brief explanation: https://docs.opencv.org/3.0-rc1/db/dfa/tutorial_transition_guide.html – BourbonCreams Aug 29 '18 at 09:11
-
@BourbonCreams Wow, that *is* brief ;) I tried looking before in the Wayback Machine, but unfortunately the page wasn't archived. Hopefully the portion I quoted is enough to get people going. I'll add a note that the link is broken. Thanks! – beaker Aug 29 '18 at 14:32