Trait UMatTrait

Source
pub trait UMatTrait: UMatTraitConst {
Show 42 methods // Required method fn as_raw_mut_UMat(&mut self) -> *mut c_void; // Provided methods fn set_flags(&mut self, val: i32) { ... } fn set_dims(&mut self, val: i32) { ... } fn set_rows(&mut self, val: i32) { ... } fn set_cols(&mut self, val: i32) { ... } fn set_usage_flags(&mut self, val: UMatUsageFlags) { ... } fn u(&mut self) -> UMatData { ... } fn set_u(&mut self, val: &impl UMatDataTraitConst) { ... } fn set_offset(&mut self, val: size_t) { ... } fn set_mat_size(&mut self, val: MatSize) { ... } fn set(&mut self, m: &impl UMatTraitConst) -> Result<()> { ... } fn row_mut(&mut self, y: i32) -> Result<BoxedRefMut<'_, UMat>> { ... } fn col_mut(&mut self, x: i32) -> Result<BoxedRefMut<'_, UMat>> { ... } fn row_bounds_mut( &mut self, startrow: i32, endrow: i32, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn row_range_mut( &mut self, r: &impl RangeTraitConst, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn col_bounds_mut( &mut self, startcol: i32, endcol: i32, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn col_range_mut( &mut self, r: &impl RangeTraitConst, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn diag_def_mut(&mut self) -> Result<BoxedRefMut<'_, UMat>> { ... } fn diag_mut(&mut self, d: i32) -> Result<BoxedRefMut<'_, UMat>> { ... } fn set_scalar(&mut self, s: Scalar) -> Result<()> { ... } fn set_to( &mut self, value: &impl ToInputArray, mask: &impl ToInputArray, ) -> Result<UMat> { ... } fn set_to_def(&mut self, value: &impl ToInputArray) -> Result<UMat> { ... } fn reshape_def_mut(&mut self, cn: i32) -> Result<BoxedRefMut<'_, UMat>> { ... } fn reshape_mut( &mut self, cn: i32, rows: i32, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn reshape_nd_mut( &mut self, cn: i32, newsz: &[i32], ) -> Result<BoxedRefMut<'_, UMat>> { ... } unsafe fn create_rows_cols( &mut self, rows: i32, cols: i32, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()> { ... } fn create_rows_cols_def( &mut self, rows: i32, cols: i32, typ: i32, ) -> Result<()> { ... } unsafe fn create_size( &mut self, size: Size, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()> { ... } fn create_size_def(&mut self, size: Size, typ: i32) -> Result<()> { ... } unsafe fn create_nd( &mut self, sizes: &[i32], typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()> { ... } fn create_nd_def(&mut self, sizes: &[i32], typ: i32) -> Result<()> { ... } unsafe fn create_nd_vec( &mut self, sizes: &Vector<i32>, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()> { ... } fn create_nd_vec_def(&mut self, sizes: &Vector<i32>, typ: i32) -> Result<()> { ... } unsafe fn addref(&mut self) -> Result<()> { ... } unsafe fn release(&mut self) -> Result<()> { ... } fn deallocate(&mut self) -> Result<()> { ... } fn adjust_roi( &mut self, dtop: i32, dbottom: i32, dleft: i32, dright: i32, ) -> Result<UMat> { ... } fn rowscols_mut( &mut self, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn roi_mut(&mut self, roi: Rect) -> Result<BoxedRefMut<'_, UMat>> { ... } fn ranges_mut( &mut self, ranges: &Vector<Range>, ) -> Result<BoxedRefMut<'_, UMat>> { ... } fn set_1(&mut self, m: UMat) -> Result<()> { ... } fn update_continuity_flag(&mut self) -> Result<()> { ... }
}
Expand description

Mutable methods for core::UMat

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)

the matrix dimensionality, >= 2

Source

fn set_rows(&mut self, val: i32)

number of rows in the matrix; -1 when the matrix has more than 2 dimensions

Source

fn set_cols(&mut self, val: i32)

number of columns in the matrix; -1 when the matrix has more than 2 dimensions

Source

fn set_usage_flags(&mut self, val: UMatUsageFlags)

usage flags for allocator; recommend do not set directly, instead set during construct/create/getUMat

Source

fn u(&mut self) -> UMatData

black-box container of UMat data

Source

fn set_u(&mut self, val: &impl UMatDataTraitConst)

black-box container of UMat data

Source

fn set_offset(&mut self, val: size_t)

offset of the submatrix (or 0)

Source

fn set_mat_size(&mut self, val: MatSize)

dimensional size of the matrix; accessible in various formats

Source

fn set(&mut self, m: &impl UMatTraitConst) -> Result<()>

assignment operators

Source

fn row_mut(&mut self, y: i32) -> Result<BoxedRefMut<'_, UMat>>

returns a new matrix header for the specified row

Source

fn col_mut(&mut self, x: i32) -> Result<BoxedRefMut<'_, UMat>>

returns a new matrix header for the specified column

Source

fn row_bounds_mut( &mut self, startrow: i32, endrow: i32, ) -> Result<BoxedRefMut<'_, UMat>>

… for the specified row span

Source

fn row_range_mut( &mut self, r: &impl RangeTraitConst, ) -> Result<BoxedRefMut<'_, UMat>>

Source

fn col_bounds_mut( &mut self, startcol: i32, endcol: i32, ) -> Result<BoxedRefMut<'_, UMat>>

… for the specified column span

Source

fn col_range_mut( &mut self, r: &impl RangeTraitConst, ) -> Result<BoxedRefMut<'_, UMat>>

Source

fn diag_def_mut(&mut self) -> Result<BoxedRefMut<'_, UMat>>

… for the specified diagonal (d=0 - the main diagonal,

0 - a diagonal from the upper half, <0 - a diagonal from the lower half)

§Note

This alternative version of UMatTraitConst::diag function uses the following default values for its arguments:

  • d: 0
Source

fn diag_mut(&mut self, d: i32) -> Result<BoxedRefMut<'_, UMat>>

… for the specified diagonal (d=0 - the main diagonal,

0 - a diagonal from the upper half, <0 - a diagonal from the lower half)

§C++ default parameters
  • d: 0
Source

fn set_scalar(&mut self, s: Scalar) -> Result<()>

sets every matrix element to s

Source

fn set_to( &mut self, value: &impl ToInputArray, mask: &impl ToInputArray, ) -> Result<UMat>

sets some of the matrix elements to s, according to the mask

§C++ default parameters
  • mask: noArray()
Source

fn set_to_def(&mut self, value: &impl ToInputArray) -> Result<UMat>

sets some of the matrix elements to s, according to the mask

§Note

This alternative version of UMatTrait::set_to function uses the following default values for its arguments:

  • mask: noArray()
Source

fn reshape_def_mut(&mut self, cn: i32) -> Result<BoxedRefMut<'_, UMat>>

creates alternative matrix header for the same data, with different

§Note

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

  • rows: 0
Source

fn reshape_mut(&mut self, cn: i32, rows: i32) -> Result<BoxedRefMut<'_, UMat>>

creates alternative matrix header for the same data, with different

§C++ default parameters
  • rows: 0
Source

fn reshape_nd_mut( &mut self, cn: i32, newsz: &[i32], ) -> Result<BoxedRefMut<'_, UMat>>

Source

unsafe fn create_rows_cols( &mut self, rows: i32, cols: i32, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()>

allocates new matrix data unless the matrix already has specified size and type.

§C++ default parameters
  • usage_flags: USAGE_DEFAULT
Source

fn create_rows_cols_def(&mut self, rows: i32, cols: i32, typ: i32) -> Result<()>

allocates new matrix data unless the matrix already has specified size and type.

§Note

This alternative version of UMatTrait::create_rows_cols function uses the following default values for its arguments:

  • usage_flags: USAGE_DEFAULT
Source

unsafe fn create_size( &mut self, size: Size, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()>

§C++ default parameters
  • usage_flags: USAGE_DEFAULT
Source

fn create_size_def(&mut self, size: Size, typ: i32) -> Result<()>

§Note

This alternative version of UMatTrait::create_size function uses the following default values for its arguments:

  • usage_flags: USAGE_DEFAULT
Source

unsafe fn create_nd( &mut self, sizes: &[i32], typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()>

§C++ default parameters
  • usage_flags: USAGE_DEFAULT
Source

fn create_nd_def(&mut self, sizes: &[i32], typ: i32) -> Result<()>

§Note

This alternative version of UMatTrait::create_nd function uses the following default values for its arguments:

  • usage_flags: USAGE_DEFAULT
Source

unsafe fn create_nd_vec( &mut self, sizes: &Vector<i32>, typ: i32, usage_flags: UMatUsageFlags, ) -> Result<()>

§C++ default parameters
  • usage_flags: USAGE_DEFAULT
Source

fn create_nd_vec_def(&mut self, sizes: &Vector<i32>, typ: i32) -> Result<()>

§Note

This alternative version of UMatTrait::create_nd_vec function uses the following default values for its arguments:

  • usage_flags: USAGE_DEFAULT
Source

unsafe fn addref(&mut self) -> Result<()>

increases the reference counter; use with care to avoid memleaks

Source

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

decreases reference counter;

Source

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

deallocates the matrix data

Source

fn adjust_roi( &mut self, dtop: i32, dbottom: i32, dleft: i32, dright: i32, ) -> Result<UMat>

moves/resizes the current matrix ROI inside the parent matrix.

Source

fn rowscols_mut( &mut self, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRefMut<'_, UMat>>

extracts a rectangular sub-matrix

Source

fn roi_mut(&mut self, roi: Rect) -> Result<BoxedRefMut<'_, UMat>>

Source

fn ranges_mut( &mut self, ranges: &Vector<Range>, ) -> Result<BoxedRefMut<'_, UMat>>

Source

fn set_1(&mut self, m: UMat) -> Result<()>

Source

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

internal use method: updates the continuity flag

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§