Trait opencv::core::GpuMatNDTraitConst
source · pub trait GpuMatNDTraitConst {
Show 24 methods
// Required method
fn as_raw_GpuMatND(&self) -> *const c_void;
// Provided methods
fn flags(&self) -> i32 { ... }
fn dims(&self) -> i32 { ... }
fn size(&self) -> GpuMatND_SizeArray { ... }
fn step(&self) -> GpuMatND_StepArray { ... }
fn try_clone(&self) -> Result<GpuMatND> { ... }
fn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND> { ... }
fn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>> { ... }
fn create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait
) -> Result<BoxedRef<'_, GpuMat>> { ... }
fn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>> { ... }
fn rowscols(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait
) -> Result<BoxedRef<'_, GpuMat>> { ... }
fn to_gpu_mat(&self) -> Result<GpuMat> { ... }
fn download(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... }
fn download_1(
&self,
dst: &mut impl ToOutputArray,
stream: &mut impl StreamTrait
) -> Result<()> { ... }
fn is_continuous(&self) -> Result<bool> { ... }
fn is_submatrix(&self) -> Result<bool> { ... }
fn elem_size(&self) -> Result<size_t> { ... }
fn elem_size1(&self) -> Result<size_t> { ... }
fn empty(&self) -> Result<bool> { ... }
fn external(&self) -> Result<bool> { ... }
fn get_device_ptr(&self) -> Result<*mut u8> { ... }
fn total(&self) -> Result<size_t> { ... }
fn total_mem_size(&self) -> Result<size_t> { ... }
fn typ(&self) -> Result<i32> { ... }
}
Expand description
Constant methods for core::GpuMatND
Required Methods§
fn as_raw_GpuMatND(&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
sourcefn size(&self) -> GpuMatND_SizeArray
fn size(&self) -> GpuMatND_SizeArray
shape of this array
sourcefn step(&self) -> GpuMatND_StepArray
fn step(&self) -> GpuMatND_StepArray
! step values Their semantics is identical to the semantics of step for Mat.
sourcefn try_clone(&self) -> Result<GpuMatND>
fn try_clone(&self) -> Result<GpuMatND>
Creates a full copy of the array and the underlying data. The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. the original step is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.
sourcefn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND>
fn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND>
Creates a full copy of the array and the underlying data. The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. the original step is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.
§Overloaded parameters
This overload is non-blocking, so it may return even if the copy operation is not finished.
sourcefn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>>
fn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>>
Extracts a sub-matrix. The operator makes a new header for the specified sub-array of *this. The operator is an O(1) operation, that is, no matrix data is copied.
§Parameters
- ranges: Array of selected ranges along each dimension.
sourcefn create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait
) -> Result<BoxedRef<'_, GpuMat>>
fn create_gpu_mat_header( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait ) -> Result<BoxedRef<'_, GpuMat>>
Creates a GpuMat header for a 2D plane part of an n-dim matrix.
Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.
Note: This function does not increment this GpuMatND’s reference counter.
sourcefn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>>
fn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>>
Creates a GpuMat header for a 2D plane part of an n-dim matrix.
Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.
Note: This function does not increment this GpuMatND’s reference counter.
§Overloaded parameters
Creates a GpuMat header if this GpuMatND is effectively 2D.
Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.
Note: This function does not increment this GpuMatND’s reference counter.
sourcefn rowscols(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait
) -> Result<BoxedRef<'_, GpuMat>>
fn rowscols( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait ) -> Result<BoxedRef<'_, GpuMat>>
Extracts a 2D plane part of an n-dim matrix. It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this GpuMatND to the returned GpuMat.
Note: This operator does not increment this GpuMatND’s reference counter;
sourcefn to_gpu_mat(&self) -> Result<GpuMat>
fn to_gpu_mat(&self) -> Result<GpuMat>
Extracts a 2D plane part of an n-dim matrix if this GpuMatND is effectively 2D. It differs from createGpuMatHeader() in that it clones a part of this GpuMatND.
Note: This operator does not increment this GpuMatND’s reference counter;
fn download(&self, dst: &mut impl ToOutputArray) -> Result<()>
fn download_1( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait ) -> Result<()>
sourcefn is_continuous(&self) -> Result<bool>
fn is_continuous(&self) -> Result<bool>
returns true iff the GpuMatND data is continuous (i.e. when there are no gaps between successive rows)
sourcefn is_submatrix(&self) -> Result<bool>
fn is_submatrix(&self) -> Result<bool>
returns true if the matrix is a sub-matrix of another matrix
sourcefn elem_size1(&self) -> Result<size_t>
fn elem_size1(&self) -> Result<size_t>
returns the size of element channel in bytes
sourcefn external(&self) -> Result<bool>
fn external(&self) -> Result<bool>
returns true if not empty and points to external(user-allocated) gpu memory
sourcefn get_device_ptr(&self) -> Result<*mut u8>
fn get_device_ptr(&self) -> Result<*mut u8>
returns pointer to the first byte of the GPU memory
sourcefn total_mem_size(&self) -> Result<size_t>
fn total_mem_size(&self) -> Result<size_t>
returns the size of underlying memory in bytes