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
fn as_raw_UMat(&self) -> *const c_void
Provided methods
! includes several bit-fields:
- the magic signature
- continuity flag
- depth
- number of channels
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
fn usage_flags(&self) -> UMatUsageFlags
fn usage_flags(&self) -> UMatUsageFlags
usage flags for allocator; recommend do not set directly, instead set during construct/create/getUMat
fn get_mat(&self, flags: AccessFlag) -> Result<Mat>
… 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
fn copy_to(&self, m: &mut dyn ToOutputArray) -> Result<()>
fn copy_to(&self, m: &mut dyn ToOutputArray) -> Result<()>
copies the matrix content to “m”.
fn copy_to_masked(
&self,
m: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
fn copy_to_masked(
&self,
m: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
copies those matrix elements to “m” that are marked with non-zero mask elements.
fn convert_to(
&self,
m: &mut dyn ToOutputArray,
rtype: i32,
alpha: f64,
beta: f64
) -> Result<()>
fn convert_to(
&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
fn dot(&self, m: &dyn ToInputArray) -> Result<f64>
fn dot(&self, m: &dyn ToInputArray) -> Result<f64>
computes dot-product
locates matrix header within a parent matrix. See below
fn is_continuous(&self) -> Result<bool>
fn is_continuous(&self) -> Result<bool>
returns true iff the matrix data is continuous
fn is_submatrix(&self) -> Result<bool>
fn is_submatrix(&self) -> Result<bool>
returns true if the matrix is a submatrix of another matrix
fn elem_size1(&self) -> Result<size_t>
fn elem_size1(&self) -> Result<size_t>
returns the size of element channel in bytes.
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.