[][src]Struct opencv::core::UMat

pub struct UMat { /* fields omitted */ }

@todo document

Methods

impl UMat[src]

pub fn as_raw_UMat(&self) -> *mut c_void[src]

pub unsafe fn from_raw_ptr(ptr: *mut c_void) -> Self[src]

impl UMat[src]

pub fn flags(&self) -> Result<i32>[src]

pub fn dims(&self) -> Result<i32>[src]

the matrix dimensionality, >= 2

pub fn rows(&self) -> Result<i32>[src]

the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions

pub fn cols(&self) -> Result<i32>[src]

the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions

pub fn usage_flags(&self) -> Result<UMatUsageFlags>[src]

pub fn offset(&self) -> Result<size_t>[src]

pub fn mat_size(&self) -> Result<MatSize>[src]

pub fn mat_step(&self) -> Result<MatStep>[src]

pub fn new(usage_flags: UMatUsageFlags) -> Result<UMat>[src]

default constructor

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub unsafe fn new_rows_cols(
    rows: i32,
    cols: i32,
    _type: i32,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

constructs 2D matrix of the specified size and type

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub unsafe fn new_size(
    size: Size,
    _type: i32,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub fn new_rows_cols_with_default(
    rows: i32,
    cols: i32,
    _type: i32,
    s: Scalar,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

constucts 2D matrix and fills it with the specified value _s.

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub fn new_size_with_default(
    size: Size,
    _type: i32,
    s: Scalar,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub unsafe fn new_nd(
    ndims: i32,
    sizes: &[i32],
    _type: i32,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

constructs n-dimensional matrix

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub fn new_nd_with_default(
    ndims: i32,
    sizes: &[i32],
    _type: i32,
    s: Scalar,
    usage_flags: UMatUsageFlags
) -> Result<UMat>
[src]

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub fn copy(m: &UMat) -> Result<UMat>[src]

copy constructor

pub fn rowscols(m: &UMat, row_range: &Range, col_range: &Range) -> Result<UMat>[src]

creates a matrix header for a part of the bigger matrix

C++ default parameters

  • col_range: Range::all()

pub fn roi(m: &UMat, roi: Rect) -> Result<UMat>[src]

pub fn ranges(m: &UMat, ranges: &VectorOfRange) -> Result<UMat>[src]

pub fn get_mat(&self, flags: i32) -> Result<Mat>[src]

pub fn row(&self, y: i32) -> Result<UMat>[src]

returns a new matrix header for the specified row

pub fn col(&self, x: i32) -> Result<UMat>[src]

returns a new matrix header for the specified column

pub fn row_bounds(&self, startrow: i32, endrow: i32) -> Result<UMat>[src]

... for the specified row span

pub fn row_range(&self, r: &Range) -> Result<UMat>[src]

pub fn col_bounds(&self, startcol: i32, endcol: i32) -> Result<UMat>[src]

... for the specified column span

pub fn col_range(&self, r: &Range) -> Result<UMat>[src]

pub fn diag(&self, d: i32) -> Result<UMat>[src]

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

pub fn diag_1(d: &UMat) -> Result<UMat>[src]

constructs a square diagonal matrix which main diagonal is vector "d"

pub fn clone(&self) -> Result<UMat>[src]

returns deep copy of the matrix, i.e. the data is copied

pub fn copy_to(&self, m: &mut Mat) -> Result<()>[src]

copies the matrix content to "m".

pub fn copy_to_masked(&self, m: &mut Mat, mask: &Mat) -> Result<()>[src]

copies those matrix elements to "m" that are marked with non-zero mask elements.

pub fn convert_to(
    &self,
    m: &mut Mat,
    rtype: i32,
    alpha: f64,
    beta: f64
) -> Result<()>
[src]

converts matrix to another datatype with optional scaling. See cvConvertScale.

C++ default parameters

  • alpha: 1
  • beta: 0

pub fn assign_to(&self, m: &mut UMat, _type: i32) -> Result<()>[src]

pub fn set_to(&mut self, value: &Mat, mask: &Mat) -> Result<UMat>[src]

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

C++ default parameters

  • mask: noArray()

pub fn reshape(&self, cn: i32, rows: i32) -> Result<UMat>[src]

creates alternative matrix header for the same data, with different

C++ default parameters

  • rows: 0

pub fn reshape_1(&self, cn: i32, newndims: i32, newsz: &i32) -> Result<UMat>[src]

pub fn t(&self) -> Result<UMat>[src]

matrix transposition by means of matrix expressions

pub fn inv(&self, method: i32) -> Result<UMat>[src]

matrix inversion by means of matrix expressions

C++ default parameters

  • method: DECOMP_LU

pub fn mul(&self, m: &Mat, scale: f64) -> Result<UMat>[src]

per-element matrix multiplication by means of matrix expressions

C++ default parameters

  • scale: 1

pub fn dot(&self, m: &Mat) -> Result<f64>[src]

computes dot-product

pub fn zeros(rows: i32, cols: i32, _type: i32) -> Result<UMat>[src]

Matlab-style matrix initialization

pub fn zeros_1(size: Size, _type: i32) -> Result<UMat>[src]

pub fn zeros_2(ndims: i32, sz: &i32, _type: i32) -> Result<UMat>[src]

pub fn ones(rows: i32, cols: i32, _type: i32) -> Result<UMat>[src]

pub fn ones_1(size: Size, _type: i32) -> Result<UMat>[src]

pub fn ones_2(ndims: i32, sz: &i32, _type: i32) -> Result<UMat>[src]

pub fn eye(rows: i32, cols: i32, _type: i32) -> Result<UMat>[src]

pub fn eye_1(size: Size, _type: i32) -> Result<UMat>[src]

pub unsafe fn create_rows_cols(
    &mut self,
    rows: i32,
    cols: i32,
    _type: i32,
    usage_flags: UMatUsageFlags
) -> Result<()>
[src]

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

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub unsafe fn create_size(
    &mut self,
    size: Size,
    _type: i32,
    usage_flags: UMatUsageFlags
) -> Result<()>
[src]

C++ default parameters

  • usage_flags: USAGE_DEFAULT

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

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub fn addref(&mut self) -> Result<()>[src]

increases the reference counter; use with care to avoid memleaks

pub fn release(&mut self) -> Result<()>[src]

decreases reference counter;

pub fn deallocate(&mut self) -> Result<()>[src]

deallocates the matrix data

pub fn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> Result<()>[src]

locates matrix header within a parent matrix. See below

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

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

pub fn is_continuous(&self) -> Result<bool>[src]

returns true iff the matrix data is continuous

pub fn is_submatrix(&self) -> Result<bool>[src]

returns true if the matrix is a submatrix of another matrix

pub fn elem_size(&self) -> Result<size_t>[src]

returns element size in bytes,

pub fn elem_size1(&self) -> Result<size_t>[src]

returns the size of element channel in bytes.

pub fn typ(&self) -> Result<i32>[src]

returns element type, similar to CV_MAT_TYPE(cvmat->type)

pub fn depth(&self) -> Result<i32>[src]

returns element type, similar to CV_MAT_DEPTH(cvmat->type)

pub fn channels(&self) -> Result<i32>[src]

returns element type, similar to CV_MAT_CN(cvmat->type)

pub fn step1(&self, i: i32) -> Result<size_t>[src]

returns step/elemSize1()

C++ default parameters

  • i: 0

pub fn empty(&self) -> Result<bool>[src]

returns true if matrix data is NULL

pub fn total(&self) -> Result<size_t>[src]

returns the total number of matrix elements

pub fn check_vector(
    &self,
    elem_channels: i32,
    depth: i32,
    require_continuous: bool
) -> Result<i32>
[src]

returns N if the matrix is 1-channel (N x ptdim) or ptdim-channel (1 x N) or (N x 1); negative number otherwise

C++ default parameters

  • depth: -1
  • require_continuous: true

pub fn handle(&self, access_flags: i32) -> Result<&mut c_void>[src]

pub fn ndoffset(&self, ofs: &mut size_t) -> Result<()>[src]

pub fn update_continuity_flag(&mut self) -> Result<()>[src]

internal use method: updates the continuity flag

impl UMat[src]

pub fn size(&self) -> Result<Size>[src]

Trait Implementations

impl Send for UMat[src]

impl Drop for UMat[src]

Auto Trait Implementations

impl Unpin for UMat

impl !Sync for UMat

impl RefUnwindSafe for UMat

impl UnwindSafe for UMat

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]