[−][src]Trait opencv::prelude::UMatTrait
@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]
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]
&self,
m: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
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]
&self,
m: &mut dyn ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64
) -> Result<()>
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]
C++ default parameters
- typ: -1
pub fn set_to(
&mut self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<UMat>
[src]
&mut self,
value: &dyn ToInputArray,
mask: &dyn ToInputArray
) -> Result<UMat>
pub fn reshape(&self, cn: i32, rows: i32) -> Result<UMat>
[src]
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]
pub fn mul(&self, m: &dyn ToInputArray, scale: f64) -> Result<UMat>
[src]
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]
&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
pub unsafe fn create_size(
&mut self,
size: Size,
typ: i32,
usage_flags: UMatUsageFlags
) -> Result<()>
[src]
&mut self,
size: Size,
typ: i32,
usage_flags: UMatUsageFlags
) -> Result<()>
C++ default parameters
- usage_flags: USAGE_DEFAULT
pub unsafe fn create_nd(
&mut self,
sizes: &[i32],
typ: i32,
usage_flags: UMatUsageFlags
) -> Result<()>
[src]
&mut self,
sizes: &[i32],
typ: i32,
usage_flags: UMatUsageFlags
) -> Result<()>
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]
&mut self,
sizes: &Vector<i32>,
typ: i32,
usage_flags: UMatUsageFlags
) -> Result<()>
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]
&mut self,
dtop: i32,
dbottom: i32,
dleft: i32,
dright: i32
) -> Result<UMat>
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]
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]
&self,
elem_channels: i32,
depth: i32,
require_continuous: bool
) -> Result<i32>
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