Ask Your Question

Revision history [back]

Steal data ptr from Mat or GpuMat

Hi,

Is there a way for me to steal the data pointer of a cv::Mat or cv::cuda::GpuMat such that I can hold on to that data without having to copy it before the Mat goes out of scope and gets released?

I’m in a scenario where my GpuMat goes out of scope and I will only manipulate the data array further in CUDA. Is there a way for me to set the refcount to NULL?