[][src]Trait opencv::prelude::UMatTrait

pub trait UMatTrait {
    pub fn as_raw_UMat(&self) -> *const c_void;
pub fn as_raw_mut_UMat(&mut self) -> *mut c_void; pub fn flags(&self) -> i32 { ... }
pub fn set_flags(&mut self, val: i32) { ... }
pub fn dims(&self) -> i32 { ... }
pub fn set_dims(&mut self, val: i32) { ... }
pub fn rows(&self) -> i32 { ... }
pub fn set_rows(&mut self, val: i32) { ... }
pub fn cols(&self) -> i32 { ... }
pub fn set_cols(&mut self, val: i32) { ... }
pub fn usage_flags(&self) -> UMatUsageFlags { ... }
pub fn set_usage_flags(&mut self, val: UMatUsageFlags) { ... }
pub fn u(&mut self) -> UMatData { ... }
pub fn set_u(&mut self, val: &mut UMatData) { ... }
pub fn offset(&self) -> size_t { ... }
pub fn set_offset(&mut self, val: size_t) { ... }
pub fn mat_size(&self) -> MatSize { ... }
pub fn mat_step(&self) -> MatStep { ... }
pub fn get_mat(&self, flags: AccessFlag) -> Result<Mat> { ... }
pub fn row(&self, y: i32) -> Result<UMat> { ... }
pub fn col(&self, x: i32) -> Result<UMat> { ... }
pub fn row_bounds(&self, startrow: i32, endrow: i32) -> Result<UMat> { ... }
pub fn row_range(&self, r: &Range) -> Result<UMat> { ... }
pub fn col_bounds(&self, startcol: i32, endcol: i32) -> Result<UMat> { ... }
pub fn col_range(&self, r: &Range) -> Result<UMat> { ... }
pub fn diag(&self, d: i32) -> Result<UMat> { ... }
pub fn try_clone(&self) -> Result<UMat> { ... }
pub fn copy_to(&self, m: &mut dyn ToOutputArray) -> Result<()> { ... }
pub fn copy_to_masked(
        &self,
        m: &mut dyn ToOutputArray,
        mask: &dyn ToInputArray
    ) -> Result<()> { ... }
pub fn convert_to(
        &self,
        m: &mut dyn ToOutputArray,
        rtype: i32,
        alpha: f64,
        beta: f64
    ) -> Result<()> { ... }
pub fn assign_to(&self, m: &mut UMat, typ: i32) -> Result<()> { ... }
pub fn set_to(
        &mut self,
        value: &dyn ToInputArray,
        mask: &dyn ToInputArray
    ) -> Result<UMat> { ... }
pub fn reshape(&self, cn: i32, rows: i32) -> Result<UMat> { ... }
pub fn reshape_1(&self, cn: i32, newndims: i32, newsz: &i32) -> Result<UMat> { ... }
pub fn t(&self) -> Result<UMat> { ... }
pub fn inv(&self, method: i32) -> Result<UMat> { ... }
pub fn mul(&self, m: &dyn ToInputArray, scale: f64) -> Result<UMat> { ... }
pub fn dot(&self, m: &dyn ToInputArray) -> Result<f64> { ... }
pub unsafe fn create_rows_cols(
        &mut self,
        rows: i32,
        cols: i32,
        typ: i32,
        usage_flags: UMatUsageFlags
    ) -> Result<()> { ... }
pub unsafe fn create_size(
        &mut self,
        size: Size,
        typ: i32,
        usage_flags: UMatUsageFlags
    ) -> Result<()> { ... }
pub unsafe fn create_nd(
        &mut self,
        sizes: &[i32],
        typ: i32,
        usage_flags: UMatUsageFlags
    ) -> Result<()> { ... }
pub unsafe fn create_nd_vec(
        &mut self,
        sizes: &Vector<i32>,
        typ: i32,
        usage_flags: UMatUsageFlags
    ) -> Result<()> { ... }
pub fn addref(&mut self) -> Result<()> { ... }
pub fn release(&mut self) -> Result<()> { ... }
pub fn deallocate(&mut self) -> Result<()> { ... }
pub fn locate_roi(
        &self,
        whole_size: &mut Size,
        ofs: &mut Point
    ) -> Result<()> { ... }
pub fn adjust_roi(
        &mut self,
        dtop: i32,
        dbottom: i32,
        dleft: i32,
        dright: i32
    ) -> Result<UMat> { ... }
pub fn is_continuous(&self) -> Result<bool> { ... }
pub fn is_submatrix(&self) -> Result<bool> { ... }
pub fn elem_size(&self) -> Result<size_t> { ... }
pub fn elem_size1(&self) -> Result<size_t> { ... }
pub fn typ(&self) -> Result<i32> { ... }
pub fn depth(&self) -> Result<i32> { ... }
pub fn channels(&self) -> Result<i32> { ... }
pub fn step1(&self, i: i32) -> Result<size_t> { ... }
pub fn empty(&self) -> Result<bool> { ... }
pub fn total(&self) -> Result<size_t> { ... }
pub fn check_vector(
        &self,
        elem_channels: i32,
        depth: i32,
        require_continuous: bool
    ) -> Result<i32> { ... }
pub fn handle(&self, access_flags: AccessFlag) -> Result<*mut c_void> { ... }
pub fn ndoffset(&self, ofs: &mut size_t) -> Result<()> { ... }
pub fn update_continuity_flag(&mut self) -> Result<()> { ... } }

@todo document

Required methods

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

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

Loading content...

Provided methods

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

! includes several bit-fields:

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

pub fn set_flags(&mut self, val: i32)[src]

! includes several bit-fields:

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

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

the matrix dimensionality, >= 2

pub fn set_dims(&mut self, val: i32)[src]

the matrix dimensionality, >= 2

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

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

pub fn set_rows(&mut self, val: i32)[src]

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

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

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

pub fn set_cols(&mut self, val: i32)[src]

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

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

pub fn set_usage_flags(&mut self, val: UMatUsageFlags)[src]

pub fn u(&mut self) -> UMatData[src]

pub fn set_u(&mut self, val: &mut UMatData)[src]

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

pub fn set_offset(&mut self, val: size_t)[src]

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

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

pub fn get_mat(&self, flags: AccessFlag) -> 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 try_clone(&self) -> Result<UMat>[src]

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

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

copies the matrix content to "m".

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

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

pub fn convert_to(
    &self,
    m: &mut dyn ToOutputArray,
    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, typ: i32) -> Result<()>[src]

pub fn set_to(
    &mut self,
    value: &dyn ToInputArray,
    mask: &dyn ToInputArray
) -> 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: &dyn ToInputArray, scale: f64) -> Result<UMat>[src]

per-element matrix multiplication by means of matrix expressions

C++ default parameters

  • scale: 1

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

computes dot-product

pub unsafe fn create_rows_cols(
    &mut self,
    rows: i32,
    cols: i32,
    typ: 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,
    typ: i32,
    usage_flags: UMatUsageFlags
) -> Result<()>
[src]

C++ default parameters

  • usage_flags: USAGE_DEFAULT

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

C++ default parameters

  • usage_flags: USAGE_DEFAULT

pub unsafe fn create_nd_vec(
    &mut self,
    sizes: &Vector<i32>,
    typ: 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: AccessFlag) -> Result<*mut c_void>[src]

! Returns the OpenCL buffer handle on which UMat operates on. The UMat instance should be kept alive during the use of the handle to prevent the buffer to be returned to the OpenCV buffer pool.

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

Loading content...

Implementors

impl UMatTrait for UMat[src]

Loading content...