gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 20:37:30 43 4
gpt4 key购买 nike

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

最佳答案

也许本文档的第 3 部分会有所帮助:[链接现已断开] 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.

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

关于opencv - OpenCV 中的 UMat 和 Mat 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33602675/

43 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com