Function opencv::core::create_gpu_mat_from_cuda_memory_1_def

source ·
pub fn create_gpu_mat_from_cuda_memory_1_def(
    size: Size,
    typ: i32,
    cuda_memory_address: size_t
) -> Result<GpuMat>
Expand description

@overload

§Parameters

  • size: 2D array size: Size(cols, rows). In the Size() constructor, the number of rows and the number of columns go in the reverse order.
  • type: Type of the matrix.
  • cudaMemoryAddress: Address of the allocated GPU memory on the device. This does not allocate matrix data. Instead, it just initializes the matrix header that points to the specified \a cudaMemoryAddress, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it.
  • step: Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to Mat::AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See GpuMat::elemSize.

Note: Overload for generation of bindings only, not exported or intended for use internally from C++.

§Note

This alternative version of create_gpu_mat_from_cuda_memory_1 function uses the following default values for its arguments:

  • step: Mat::AUTO_STEP