Given a Direct3D Texture2D I would like to process it using OpenCV cv::GpuMat
. I am currently building 4.7 with CUDA 11.7 and CUDNN 8.9.
I am having some difficulties getting around CUDA’s interop with Direct3D 11 hence I would like to take a look at cv::GpuMat
, which, from what I’ve read, is for managing OpenCV-related data on the GPU (e.g. using CUDA).
Is there an established workflow for “converting” a Direct3D Texture2D, which I use for my framebuffer, to an OpenCV cv::GpuMat
and vice versa? It is also important that operations take place on the GPU without copying data back and forth between CPU and GPU. If that is not possible, then my hope is that I can at least use pinned memory, which I have already experimented with for CUDA and Torch C++ (libtorch).