opencv::core

Function convert_from_buffer

Source
pub unsafe fn convert_from_buffer(
    cl_mem_buffer: *mut c_void,
    step: size_t,
    rows: i32,
    cols: i32,
    typ: i32,
    dst: &mut impl UMatTrait,
) -> Result<()>
Expand description

Convert OpenCL buffer to UMat

Note: OpenCL buffer (cl_mem_buffer) should contain 2D image data, compatible with OpenCV. Memory content is not copied from clBuffer to UMat. Instead, buffer handle assigned to UMat and clRetainMemObject is called.

ยงParameters

  • cl_mem_buffer: source clBuffer handle
  • step: num of bytes in single row
  • rows: number of rows
  • cols: number of cols
  • type: OpenCV type of image
  • dst: destination UMat