opencv::mod_prelude

Trait GpuMatNDTrait

Source
pub trait GpuMatNDTrait: GpuMatNDTraitConst {
Show 16 methods // Required method fn as_raw_mut_GpuMatND(&mut self) -> *mut c_void; // Provided methods fn set_flags(&mut self, val: i32) { ... } fn set_dims(&mut self, val: i32) { ... } fn set_size(&mut self, val: GpuMatND_SizeArray) { ... } fn set_step(&mut self, val: GpuMatND_StepArray) { ... } fn create(&mut self, size: GpuMatND_SizeArray, typ: i32) -> Result<()> { ... } fn release(&mut self) -> Result<()> { ... } fn swap(&mut self, m: &mut impl GpuMatNDTrait) { ... } fn ranges_mut( &mut self, ranges: &Vector<Range>, ) -> Result<BoxedRefMut<'_, GpuMatND>> { ... } fn create_gpu_mat_header_mut( &mut self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, GpuMat>> { ... } fn create_gpu_mat_header_mut_1(&mut self) -> Result<BoxedRefMut<'_, GpuMat>> { ... } fn rowscols_mut( &mut self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, GpuMat>> { ... } fn set(&mut self, unnamed: &impl GpuMatNDTraitConst) { ... } fn set_1(&mut self, unnamed: GpuMatND) { ... } fn upload(&mut self, src: &impl ToInputArray) -> Result<()> { ... } fn upload_1( &mut self, src: &impl ToInputArray, stream: &mut impl StreamTrait, ) -> Result<()> { ... }
}
Expand description

Mutable methods for core::GpuMatND

Required Methods§

Provided Methods§

Source

fn set_flags(&mut self, val: i32)

! includes several bit-fields:

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

fn set_dims(&mut self, val: i32)

matrix dimensionality

Source

fn set_size(&mut self, val: GpuMatND_SizeArray)

shape of this array

Source

fn set_step(&mut self, val: GpuMatND_StepArray)

! step values Their semantics is identical to the semantics of step for Mat.

Source

fn create(&mut self, size: GpuMatND_SizeArray, typ: i32) -> Result<()>

Allocates GPU memory. Suppose there is some GPU memory already allocated. In that case, this method may choose to reuse that GPU memory under the specific condition: it must be of the same size and type, not externally allocated, the GPU memory is continuous(i.e., isContinuous() is true), and is not a sub-matrix of another GpuMatND (i.e., isSubmatrix() is false). In other words, this method guarantees that the GPU memory allocated by this method is always continuous and is not a sub-region of another GpuMatND.

Source

fn release(&mut self) -> Result<()>

Source

fn swap(&mut self, m: &mut impl GpuMatNDTrait)

Source

fn ranges_mut( &mut self, ranges: &Vector<Range>, ) -> Result<BoxedRefMut<'_, 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.
Source

fn create_gpu_mat_header_mut( &mut self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, 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.

Source

fn create_gpu_mat_header_mut_1(&mut self) -> Result<BoxedRefMut<'_, GpuMat>>

@overload 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.

Source

fn rowscols_mut( &mut self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, 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;

Source

fn set(&mut self, unnamed: &impl GpuMatNDTraitConst)

Source

fn set_1(&mut self, unnamed: GpuMatND)

Source

fn upload(&mut self, src: &impl ToInputArray) -> Result<()>

Source

fn upload_1( &mut self, src: &impl ToInputArray, stream: &mut impl StreamTrait, ) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§