cupy_array_as_opencv_gpu_mat

savant.utils.memory_repr.cupy_array_as_opencv_gpu_mat(arr)

Returns OpenCV GpuMat for the given CuPy ndarray (zero-copy). The array must have 2 or 3 dims in HWC format and C-contiguous layout.

Use cupy.shape and cupy.strides to check if an array has supported shape format and is contiguous in memory.

Use cupy.transpose() and cupy.ascontiguousarray() to transform an array if necessary (creates a copy of the array).