Trait opencv::prelude::GpuMatNDTraitConst
source · [−]pub trait GpuMatNDTraitConst {
Show 22 methods
fn as_raw_GpuMatND(&self) -> *const c_void;
fn flags(&self) -> i32 { ... }
fn dims(&self) -> i32 { ... }
fn size(&self) -> Vector<i32> { ... }
fn step(&self) -> Vector<size_t> { ... }
fn try_clone(&self) -> Result<GpuMatND> { ... }
fn clone_1(&self, stream: &mut Stream) -> Result<GpuMatND> { ... }
fn create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: Range,
col_range: Range
) -> Result<GpuMat> { ... }
fn create_gpu_mat_header_1(&self) -> Result<GpuMat> { ... }
fn to_gpu_mat(&self) -> Result<GpuMat> { ... }
fn download(&self, dst: &mut dyn ToOutputArray) -> Result<()> { ... }
fn download_1(
&self,
dst: &mut dyn ToOutputArray,
stream: &mut Stream
) -> 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> { ... }
}
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 step(&self) -> Vector<size_t>
fn step(&self) -> Vector<size_t>
! 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_1(&self, stream: &mut Stream) -> Result<GpuMatND>
fn clone_1(&self, stream: &mut Stream) -> 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 create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: Range,
col_range: Range
) -> Result<GpuMat>
fn create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: Range,
col_range: Range
) -> Result<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<GpuMat>
fn create_gpu_mat_header_1(&self) -> Result<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 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 dyn ToOutputArray) -> Result<()>
fn download_1(
&self,
dst: &mut dyn ToOutputArray,
stream: &mut Stream
) -> 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