Trait opencv::core::UMatTraitConst[][src]

pub trait UMatTraitConst {
Show 42 methods fn as_raw_UMat(&self) -> *const c_void; fn flags(&self) -> i32 { ... }
fn dims(&self) -> i32 { ... }
fn rows(&self) -> i32 { ... }
fn cols(&self) -> i32 { ... }
fn usage_flags(&self) -> UMatUsageFlags { ... }
fn offset(&self) -> size_t { ... }
fn mat_size(&self) -> MatSize { ... }
fn mat_step(&self) -> MatStep { ... }
fn get_mat(&self, flags: AccessFlag) -> Result<Mat> { ... }
fn row(&self, y: i32) -> Result<UMat> { ... }
fn col(&self, x: i32) -> Result<UMat> { ... }
fn row_bounds(&self, startrow: i32, endrow: i32) -> Result<UMat> { ... }
fn row_range(&self, r: &Range) -> Result<UMat> { ... }
fn col_bounds(&self, startcol: i32, endcol: i32) -> Result<UMat> { ... }
fn col_range(&self, r: &Range) -> Result<UMat> { ... }
fn diag(&self, d: i32) -> Result<UMat> { ... }
fn try_clone(&self) -> Result<UMat> { ... }
fn copy_to(&self, m: &mut dyn ToOutputArray) -> Result<()> { ... }
fn copy_to_masked(
        &self,
        m: &mut dyn ToOutputArray,
        mask: &dyn ToInputArray
    ) -> Result<()> { ... }
fn convert_to(
        &self,
        m: &mut dyn ToOutputArray,
        rtype: i32,
        alpha: f64,
        beta: f64
    ) -> Result<()> { ... }
fn assign_to(&self, m: &mut UMat, typ: i32) -> Result<()> { ... }
fn reshape(&self, cn: i32, rows: i32) -> Result<UMat> { ... }
fn reshape_1(&self, cn: i32, newndims: i32, newsz: &i32) -> Result<UMat> { ... }
fn t(&self) -> Result<UMat> { ... }
fn inv(&self, method: i32) -> Result<UMat> { ... }
fn mul(&self, m: &dyn ToInputArray, scale: f64) -> Result<UMat> { ... }
fn dot(&self, m: &dyn ToInputArray) -> Result<f64> { ... }
fn locate_roi(&self, whole_size: &mut Size, ofs: &mut Point) -> 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 typ(&self) -> Result<i32> { ... }
fn depth(&self) -> Result<i32> { ... }
fn channels(&self) -> Result<i32> { ... }
fn step1(&self, i: i32) -> Result<size_t> { ... }
fn empty(&self) -> Result<bool> { ... }
fn total(&self) -> Result<size_t> { ... }
fn check_vector(
        &self,
        elem_channels: i32,
        depth: i32,
        require_continuous: bool
    ) -> Result<i32> { ... }
fn handle(&self, access_flags: AccessFlag) -> Result<*mut c_void> { ... }
fn ndoffset(&self, ofs: &mut size_t) -> Result<()> { ... }
}
Expand description

@todo document

Required methods

Provided methods

! includes several bit-fields:

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

the matrix dimensionality, >= 2

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

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

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

offset of the submatrix (or 0)

dimensional size of the matrix; accessible in various formats

number of bytes each matrix element/row/plane/dimension occupies

returns a new matrix header for the specified row

returns a new matrix header for the specified column

… for the specified row span

… for the specified column span

… 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

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

copies the matrix content to “m”.

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

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

C++ default parameters
  • alpha: 1
  • beta: 0

creates alternative matrix header for the same data, with different

C++ default parameters
  • rows: 0

matrix transposition by means of matrix expressions

matrix inversion by means of matrix expressions

C++ default parameters
  • method: DECOMP_LU

per-element matrix multiplication by means of matrix expressions

C++ default parameters
  • scale: 1

computes dot-product

locates matrix header within a parent matrix. See below

returns true iff the matrix data is continuous

returns true if the matrix is a submatrix of another matrix

returns element size in bytes,

returns the size of element channel in bytes.

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

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

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

returns step/elemSize1()

C++ default parameters
  • i: 0

returns true if matrix data is NULL

returns the total number of matrix elements

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

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

Implementors