Trait opencv::core::prelude::GpuMatTrait[][src]

pub trait GpuMatTrait: GpuMatTraitConst {
Show 26 methods fn as_raw_mut_GpuMat(&mut self) -> *mut c_void; fn set_flags(&mut self, val: i32) { ... }
fn set_rows(&mut self, val: i32) { ... }
fn set_cols(&mut self, val: i32) { ... }
fn set_step(&mut self, val: size_t) { ... }
fn data(&mut self) -> &mut u8 { ... }
fn set_data(&mut self, val: &mut u8) { ... }
fn refcount(&mut self) -> &mut i32 { ... }
fn set_refcount(&mut self, val: &mut i32) { ... }
fn datastart(&mut self) -> &mut u8 { ... }
fn set_datastart(&mut self, val: &mut u8) { ... }
fn allocator(&mut self) -> AbstractRefMut<'_, dyn GpuMat_Allocator> { ... }
unsafe fn set_allocator(&mut self, val: &mut dyn GpuMat_Allocator) { ... }
fn create(&mut self, rows: i32, cols: i32, typ: i32) -> Result<()> { ... }
fn create_1(&mut self, size: Size, typ: i32) -> Result<()> { ... }
fn release(&mut self) -> Result<()> { ... }
fn swap(&mut self, mat: &mut GpuMat) -> Result<()> { ... }
fn upload(&mut self, arr: &dyn ToInputArray) -> Result<()> { ... }
fn upload_async(
        &mut self,
        arr: &dyn ToInputArray,
        stream: &mut Stream
    ) -> Result<()> { ... }
fn set_to(&mut self, s: Scalar) -> Result<GpuMat> { ... }
fn set_to_1(&mut self, s: Scalar, stream: &mut Stream) -> Result<GpuMat> { ... }
fn set_to_2(&mut self, s: Scalar, mask: &dyn ToInputArray) -> Result<GpuMat> { ... }
fn set_to_3(
        &mut self,
        s: Scalar,
        mask: &dyn ToInputArray,
        stream: &mut Stream
    ) -> Result<GpuMat> { ... }
fn ptr_1(&mut self, y: i32) -> Result<&mut u8> { ... }
fn adjust_roi(
        &mut self,
        dtop: i32,
        dbottom: i32,
        dleft: i32,
        dright: i32
    ) -> Result<GpuMat> { ... }
fn update_continuity_flag(&mut self) -> Result<()> { ... }
}

Required methods

Provided methods

! includes several bit-fields:

  • the magic signature
  • continuity flag
  • depth
  • number of channels

the number of rows and columns

the number of rows and columns

a distance between successive rows in bytes; includes the gap if any

pointer to the data

pointer to the data

pointer to the reference counter; when GpuMat points to user-allocated data, the pointer is NULL

pointer to the reference counter; when GpuMat points to user-allocated data, the pointer is NULL

helper fields used in locateROI and adjustROI

helper fields used in locateROI and adjustROI

allocator

allocator

allocates new GpuMat data unless the GpuMat already has specified size and type

decreases reference counter, deallocate the data when reference counter reaches 0

swaps with other smart pointer

Performs data upload to GpuMat (Blocking call)

This function copies data from host memory to device memory. As being a blocking call, it is guaranteed that the copy operation is finished when this function returns.

Performs data upload to GpuMat (Non-Blocking call)

This function copies data from host memory to device memory. As being a non-blocking call, this function may return even if the copy operation is not finished.

The copy operation may be overlapped with operations in other non-default streams if \p stream is not the default stream and \p dst is HostMem allocated with HostMem::PAGE_LOCKED option.

sets some of the GpuMat elements to s (Blocking call)

sets some of the GpuMat elements to s (Non-Blocking call)

sets some of the GpuMat elements to s, according to the mask (Blocking call)

sets some of the GpuMat elements to s, according to the mask (Non-Blocking call)

returns pointer to y-th row

C++ default parameters
  • y: 0

moves/resizes the current GpuMat ROI inside the parent GpuMat

internal use method: updates the continuity flag

Implementors