Trait opencv::prelude::GpuMatTraitConst
source · pub trait GpuMatTraitConst {
Show 40 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 dataend(&self) -> *const u8 { ... }
fn download(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... }
fn download_async(
&self,
dst: &mut impl ToOutputArray,
stream: &mut Stream
) -> Result<()> { ... }
fn try_clone(&self) -> Result<GpuMat> { ... }
fn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... }
fn copy_to_1(
&self,
dst: &mut impl ToOutputArray,
stream: &mut Stream
) -> Result<()> { ... }
fn copy_to_2(
&self,
dst: &mut impl ToOutputArray,
mask: &impl ToInputArray
) -> Result<()> { ... }
fn copy_to_3(
&self,
dst: &mut impl ToOutputArray,
mask: &impl ToInputArray,
stream: &mut Stream
) -> 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 Stream
) -> Result<()> { ... }
fn convert_to_2(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64
) -> Result<()> { ... }
fn convert_to_3(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
stream: &mut Stream
) -> Result<()> { ... }
fn convert_to_4(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64,
stream: &mut Stream
) -> Result<()> { ... }
fn assign_to(&self, m: &mut GpuMat, typ: i32) -> Result<()> { ... }
fn ptr(&self, y: i32) -> Result<*const u8> { ... }
fn row(&self, y: i32) -> Result<GpuMat> { ... }
fn col(&self, x: i32) -> Result<GpuMat> { ... }
fn row_range(&self, startrow: i32, endrow: i32) -> Result<GpuMat> { ... }
fn row_range_1(&self, r: Range) -> Result<GpuMat> { ... }
fn col_range(&self, startcol: i32, endcol: i32) -> Result<GpuMat> { ... }
fn col_range_1(&self, r: Range) -> Result<GpuMat> { ... }
fn apply(&self, row_range: Range, col_range: Range) -> Result<GpuMat> { ... }
fn apply_1(&self, roi: Rect) -> Result<GpuMat> { ... }
fn reshape(&self, cn: i32, rows: i32) -> Result<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§
fn as_raw_GpuMat(&self) -> *const c_void
Provided Methods§
sourcefn flags(&self) -> i32
fn flags(&self) -> i32
! includes several bit-fields:
- the magic signature
- continuity flag
- depth
- number of channels
fn dataend(&self) -> *const u8
sourcefn download(&self, dst: &mut impl ToOutputArray) -> Result<()>
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.
sourcefn download_async(
&self,
dst: &mut impl ToOutputArray,
stream: &mut Stream
) -> Result<()>
fn download_async( &self, dst: &mut impl ToOutputArray, stream: &mut Stream ) -> 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.
sourcefn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()>
fn copy_to(&self, dst: &mut impl ToOutputArray) -> Result<()>
copies the GpuMat content to device memory (Blocking call)
sourcefn copy_to_1(
&self,
dst: &mut impl ToOutputArray,
stream: &mut Stream
) -> Result<()>
fn copy_to_1( &self, dst: &mut impl ToOutputArray, stream: &mut Stream ) -> Result<()>
copies the GpuMat content to device memory (Non-Blocking call)
sourcefn copy_to_2(
&self,
dst: &mut impl ToOutputArray,
mask: &impl ToInputArray
) -> Result<()>
fn copy_to_2( &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)
sourcefn copy_to_3(
&self,
dst: &mut impl ToOutputArray,
mask: &impl ToInputArray,
stream: &mut Stream
) -> Result<()>
fn copy_to_3( &self, dst: &mut impl ToOutputArray, mask: &impl ToInputArray, stream: &mut Stream ) -> Result<()>
copies those GpuMat elements to “m” that are marked with non-zero mask elements (Non-Blocking call)
sourcefn convert_to(&self, dst: &mut impl ToOutputArray, rtype: i32) -> Result<()>
fn convert_to(&self, dst: &mut impl ToOutputArray, rtype: i32) -> Result<()>
converts GpuMat to another datatype (Blocking call)
sourcefn convert_to_1(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
stream: &mut Stream
) -> Result<()>
fn convert_to_1( &self, dst: &mut impl ToOutputArray, rtype: i32, stream: &mut Stream ) -> Result<()>
converts GpuMat to another datatype (Non-Blocking call)
sourcefn convert_to_2(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64
) -> Result<()>
fn convert_to_2( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64 ) -> Result<()>
sourcefn convert_to_3(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
stream: &mut Stream
) -> Result<()>
fn convert_to_3( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, stream: &mut Stream ) -> Result<()>
converts GpuMat to another datatype with scaling (Non-Blocking call)
sourcefn convert_to_4(
&self,
dst: &mut impl ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64,
stream: &mut Stream
) -> Result<()>
fn convert_to_4( &self, dst: &mut impl ToOutputArray, rtype: i32, alpha: f64, beta: f64, stream: &mut Stream ) -> Result<()>
converts GpuMat to another datatype with scaling (Non-Blocking call)
fn row_range_1(&self, r: Range) -> Result<GpuMat>
sourcefn col_range(&self, startcol: i32, endcol: i32) -> Result<GpuMat>
fn col_range(&self, startcol: i32, endcol: i32) -> Result<GpuMat>
… for the specified column span
fn col_range_1(&self, r: Range) -> Result<GpuMat>
sourcefn apply(&self, row_range: Range, col_range: Range) -> Result<GpuMat>
fn apply(&self, row_range: Range, col_range: Range) -> Result<GpuMat>
extracts a rectangular sub-GpuMat (this is a generalized form of row, rowRange etc.)
fn apply_1(&self, roi: Rect) -> Result<GpuMat>
sourcefn reshape(&self, cn: i32, rows: i32) -> Result<GpuMat>
fn reshape(&self, cn: i32, rows: i32) -> Result<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
sourcefn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> Result<()>
fn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> Result<()>
locates GpuMat header within a parent GpuMat
sourcefn is_continuous(&self) -> Result<bool>
fn is_continuous(&self) -> Result<bool>
returns true iff the GpuMat data is continuous (i.e. when there are no gaps between successive rows)
sourcefn elem_size1(&self) -> Result<size_t>
fn elem_size1(&self) -> Result<size_t>
returns the size of element channel in bytes
sourcefn size(&self) -> Result<Size>
fn size(&self) -> Result<Size>
returns GpuMat size : width == number of columns, height == number of rows