gpt4 book ai didi

缺少 OpenCV 透明 API UMat

转载 作者:行者123 更新时间:2023-12-02 17:26:41 26 4
gpt4 key购买 nike

我尝试使用 OpenCV Transparent API UMat我的桌面 Java 应用程序中的硬件加速类,但我找不到 UMat类实现。我正在使用 OpenCV version 4.1 , 其中 T-API据说 java 绑定(bind)从 version 3.0 开始可用如前所述here :

T-API (transparent API) has been introduced, this is transparent GPU acceleration layer using OpenCL. It does not add any compile-time or runtime dependency of OpenCL. When OpenCL is available, it’s detected and used, but it can be disabled at compile time or at runtime. It covers ~100 OpenCV functions. This work has been done by contract and with generous support from AMD and Intel companies.


  • T-API已弃用?如果是,用什么代替它?
  • 顺便说一句,OpenCV Graph API 是什么? G-API ?它是T-API 的替代品吗? ?
  • 最佳答案

    让我们分解这个问题。

    Is T-API deprecated? If yes, what replaces it?



    不,T-API 并未被有效弃用。可以看 here ,即 T-API 在 OpenCV 4.1.2 版本标签下仍然有效。 您的主要问题是 T-API 没有实际的 Java 包装器。 ,如我们所见 at this answer我们在 OpenCV Java Docs 下看不到 UMat 实现.

    And by the way what is the OpenCV Graph API G-API? Is it a replacement for the T-API?



    再次查看 the docs , 我们读:

    OpenCV 3.0 introduced Transparent API (or T-API) which allowed to offload OpenCV function calls transparently to OpenCL devices and save on Host/Device data transfers with cv::UMat – and it was a great step forward. However, T-API is a dynamic API – user code still remains unconstrained and OpenCL kernels are enqueued in arbitrary order, thus eliminating further pipeline-level optimization potential. G-API brings implicit graph model to OpenCV 4.0. Graph model captures all operations and its data dependencies in a pipeline and so provides G-API framework with extra information to do pipeline-level optimizations.



    据记载,G-API 似乎不是“替代品”,而更像是对 OpenCV 硬件加速计划的改进。 G-API 不仅对无组织的内核进行了一些优化操作,还为较新版本的 OpenCV 带来了面向管道/图形的范例。

    关于缺少 OpenCV 透明 API UMat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58957673/

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