Trait opencv::prelude::GpuMatTraitConst

source ·
pub trait GpuMatTraitConst {
Show 55 methods // Required method fn as_raw_GpuMat(&self) -> *const c_void; // Provided methods fn flags(&self) -> i32 { ... } fn rows(&self) -> i32 { ... } fn cols(&self) -> i32 { ... } fn step(&self) -> size_t { ... } fn data(&self) -> *const u8 { ... } fn refcount(&self) -> *const i32 { ... } fn datastart(&self) -> *const u8 { ... } fn dataend(&self) -> *const u8 { ... } fn download(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... } fn download_async( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn try_clone(&self) -> Result<GpuMat> { ... } fn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... } fn copy_to_gpu_mat(&self, dst: &mut impl GpuMatTrait) -> Result<()> { ... } fn copy_to_stream( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn copy_to_gpu_mat_stream( &self, dst: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn copy_to_mask( &self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray ) -> Result<()> { ... } fn copy_to_gpu_mat_mask( &self, dst: &mut impl GpuMatTrait, mask: &mut impl GpuMatTrait ) -> Result<()> { ... } fn copy_to_mask_stream( &self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn copy_to_gpu_mat_mask_stream( &self, dst: &mut impl GpuMatTrait, mask: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn convert_to(&self, dst: &mut impl ToOutputArray, rtype: i32) -> Result<()> { ... } fn convert_to_1( &self, dst: &mut impl ToOutputArray, rtype: i32, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn convert_to_2( &self, dst: &mut impl GpuMatTrait, rtype: i32, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn convert_to_3( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64 ) -> Result<()> { ... } fn convert_to_def( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64 ) -> Result<()> { ... } fn convert_to_4( &self, dst: &mut impl GpuMatTrait, rtype: i32, alpha: f64, beta: f64 ) -> Result<()> { ... } fn convert_to_def_1( &self, dst: &mut impl GpuMatTrait, rtype: i32 ) -> Result<()> { ... } fn convert_to_5( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn convert_to_6( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn convert_to_7( &self, dst: &mut impl GpuMatTrait, rtype: i32, alpha: f64, beta: f64, stream: &mut impl StreamTrait ) -> Result<()> { ... } fn assign_to(&self, m: &mut impl GpuMatTrait, typ: i32) -> Result<()> { ... } fn assign_to_def(&self, m: &mut impl GpuMatTrait) -> Result<()> { ... } fn ptr(&self, y: i32) -> Result<*const u8> { ... } fn ptr_def(&self) -> Result<*const u8> { ... } fn row(&self, y: i32) -> Result<BoxedRef<'_, GpuMat>> { ... } fn col(&self, x: i32) -> Result<BoxedRef<'_, GpuMat>> { ... } fn row_bounds( &self, startrow: i32, endrow: i32 ) -> Result<BoxedRef<'_, GpuMat>> { ... } fn row_range(&self, r: impl RangeTrait) -> Result<BoxedRef<'_, GpuMat>> { ... } fn col_bounds( &self, startcol: i32, endcol: i32 ) -> Result<BoxedRef<'_, GpuMat>> { ... } fn col_range(&self, r: impl RangeTrait) -> Result<BoxedRef<'_, GpuMat>> { ... } fn rowscols( &self, row_range: impl RangeTrait, col_range: impl RangeTrait ) -> Result<BoxedRef<'_, GpuMat>> { ... } fn roi(&self, roi: Rect) -> Result<BoxedRef<'_, GpuMat>> { ... } fn reshape(&self, cn: i32, rows: i32) -> Result<BoxedRef<'_, GpuMat>> { ... } fn reshape_def(&self, cn: i32) -> Result<BoxedRef<'_, GpuMat>> { ... } fn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> Result<()> { ... } fn is_continuous(&self) -> Result<bool> { ... } fn elem_size(&self) -> Result<size_t> { ... } fn elem_size1(&self) -> Result<size_t> { ... } fn typ(&self) -> Result<i32> { ... } fn depth(&self) -> Result<i32> { ... } fn channels(&self) -> Result<i32> { ... } fn step1(&self) -> Result<size_t> { ... } fn size(&self) -> Result<Size> { ... } fn empty(&self) -> Result<bool> { ... } fn cuda_ptr(&self) -> Result<*mut c_void> { ... }
}
Expand description

Constant methods for core::GpuMat

Required Methods§

Provided Methods§

source

fn flags(&self) -> i32

! includes several bit-fields:

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

fn rows(&self) -> i32

the number of rows and columns

source

fn cols(&self) -> i32

the number of rows and columns

source

fn step(&self) -> size_t

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

source

fn data(&self) -> *const u8

pointer to the data

source

fn refcount(&self) -> *const i32

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

source

fn datastart(&self) -> *const u8

helper fields used in locateROI and adjustROI

source

fn dataend(&self) -> *const u8

source

fn download(&self, dst: &mut impl ToOutputArray) -> Result<()>

Performs data download from GpuMat (Blocking call)

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

source

fn download_async( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait ) -> Result<()>

Performs data download from GpuMat (Non-Blocking call)

This function copies data from device memory to host 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.

source

fn try_clone(&self) -> Result<GpuMat>

returns deep copy of the GpuMat, i.e. the data is copied

source

fn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()>

copies the GpuMat content to device memory (Blocking call)

source

fn copy_to_gpu_mat(&self, dst: &mut impl GpuMatTrait) -> Result<()>

bindings overload which copies the GpuMat content to device memory (Blocking call)

source

fn copy_to_stream( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait ) -> Result<()>

copies the GpuMat content to device memory (Non-Blocking call)

source

fn copy_to_gpu_mat_stream( &self, dst: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<()>

bindings overload which copies the GpuMat content to device memory (Non-Blocking call)

source

fn copy_to_mask( &self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray ) -> Result<()>

copies those GpuMat elements to “m” that are marked with non-zero mask elements (Blocking call)

source

fn copy_to_gpu_mat_mask( &self, dst: &mut impl GpuMatTrait, mask: &mut impl GpuMatTrait ) -> Result<()>

bindings overload which copies those GpuMat elements to “m” that are marked with non-zero mask elements (Blocking call)

source

fn copy_to_mask_stream( &self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray, stream: &mut impl StreamTrait ) -> Result<()>

copies those GpuMat elements to “m” that are marked with non-zero mask elements (Non-Blocking call)

source

fn copy_to_gpu_mat_mask_stream( &self, dst: &mut impl GpuMatTrait, mask: &mut impl GpuMatTrait, stream: &mut impl StreamTrait ) -> Result<()>

bindings overload which copies those GpuMat elements to “m” that are marked with non-zero mask elements (Non-Blocking call)

source

fn convert_to(&self, dst: &mut impl ToOutputArray, rtype: i32) -> Result<()>

converts GpuMat to another datatype (Blocking call)

source

fn convert_to_1( &self, dst: &mut impl ToOutputArray, rtype: i32, stream: &mut impl StreamTrait ) -> Result<()>

converts GpuMat to another datatype (Non-Blocking call)

source

fn convert_to_2( &self, dst: &mut impl GpuMatTrait, rtype: i32, stream: &mut impl StreamTrait ) -> Result<()>

bindings overload which converts GpuMat to another datatype (Non-Blocking call)

source

fn convert_to_3( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64 ) -> Result<()>

converts GpuMat to another datatype with scaling (Blocking call)

§C++ default parameters
  • beta: 0.0
source

fn convert_to_def( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64 ) -> Result<()>

converts GpuMat to another datatype with scaling (Blocking call)

§Note

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

  • beta: 0.0
source

fn convert_to_4( &self, dst: &mut impl GpuMatTrait, rtype: i32, alpha: f64, beta: f64 ) -> Result<()>

bindings overload which converts GpuMat to another datatype with scaling(Blocking call)

§C++ default parameters
  • alpha: 1.0
  • beta: 0.0
source

fn convert_to_def_1(&self, dst: &mut impl GpuMatTrait, rtype: i32) -> Result<()>

bindings overload which converts GpuMat to another datatype with scaling(Blocking call)

§Note

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

  • alpha: 1.0
  • beta: 0.0
source

fn convert_to_5( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, stream: &mut impl StreamTrait ) -> Result<()>

converts GpuMat to another datatype with scaling (Non-Blocking call)

source

fn convert_to_6( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64, stream: &mut impl StreamTrait ) -> Result<()>

converts GpuMat to another datatype with scaling (Non-Blocking call)

source

fn convert_to_7( &self, dst: &mut impl GpuMatTrait, rtype: i32, alpha: f64, beta: f64, stream: &mut impl StreamTrait ) -> Result<()>

bindings overload which converts GpuMat to another datatype with scaling (Non-Blocking call)

source

fn assign_to(&self, m: &mut impl GpuMatTrait, typ: i32) -> Result<()>

§C++ default parameters
  • typ: -1
source

fn assign_to_def(&self, m: &mut impl GpuMatTrait) -> Result<()>

§Note

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

  • typ: -1
source

fn ptr(&self, y: i32) -> Result<*const u8>

§C++ default parameters
  • y: 0
source

fn ptr_def(&self) -> Result<*const u8>

§Note

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

  • y: 0
source

fn row(&self, y: i32) -> Result<BoxedRef<'_, GpuMat>>

returns a new GpuMat header for the specified row

source

fn col(&self, x: i32) -> Result<BoxedRef<'_, GpuMat>>

returns a new GpuMat header for the specified column

source

fn row_bounds(&self, startrow: i32, endrow: i32) -> Result<BoxedRef<'_, GpuMat>>

… for the specified row span

source

fn row_range(&self, r: impl RangeTrait) -> Result<BoxedRef<'_, GpuMat>>

source

fn col_bounds(&self, startcol: i32, endcol: i32) -> Result<BoxedRef<'_, GpuMat>>

… for the specified column span

source

fn col_range(&self, r: impl RangeTrait) -> Result<BoxedRef<'_, GpuMat>>

source

fn rowscols( &self, row_range: impl RangeTrait, col_range: impl RangeTrait ) -> Result<BoxedRef<'_, GpuMat>>

extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.)

source

fn roi(&self, roi: Rect) -> Result<BoxedRef<'_, GpuMat>>

source

fn reshape(&self, cn: i32, rows: i32) -> Result<BoxedRef<'_, GpuMat>>

creates alternative GpuMat header for the same data, with different number of channels and/or different number of rows

§C++ default parameters
  • rows: 0
source

fn reshape_def(&self, cn: i32) -> Result<BoxedRef<'_, GpuMat>>

creates alternative GpuMat header for the same data, with different number of channels and/or different number of rows

§Note

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

  • rows: 0
source

fn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> Result<()>

locates GpuMat header within a parent GpuMat

source

fn is_continuous(&self) -> Result<bool>

returns true iff the GpuMat data is continuous (i.e. when there are no gaps between successive rows)

source

fn elem_size(&self) -> Result<size_t>

returns element size in bytes

source

fn elem_size1(&self) -> Result<size_t>

returns the size of element channel in bytes

source

fn typ(&self) -> Result<i32>

returns element type

source

fn depth(&self) -> Result<i32>

returns element type

source

fn channels(&self) -> Result<i32>

returns number of channels

source

fn step1(&self) -> Result<size_t>

returns step/elemSize1()

source

fn size(&self) -> Result<Size>

returns GpuMat size : width == number of columns, height == number of rows

source

fn empty(&self) -> Result<bool>

returns true if GpuMat data is NULL

source

fn cuda_ptr(&self) -> Result<*mut c_void>

Object Safety§

This trait is not object safe.

Implementors§