pub struct Mat { /* private fields */ }Expand description
Mat structure - the fundamental data container
Implementations§
Source§impl Mat
impl Mat
Sourcepub fn new_size(size: Size, mat_type: MatType) -> Result<Self>
pub fn new_size(size: Size, mat_type: MatType) -> Result<Self>
Create a Mat with specified dimensions and type
Sourcepub fn new_size_with_default(
size: Size,
mat_type: MatType,
_default_value: Scalar,
) -> Result<Self>
pub fn new_size_with_default( size: Size, mat_type: MatType, _default_value: Scalar, ) -> Result<Self>
Create a Mat with specified dimensions, type, and default value
Sourcepub fn from_slice<T>(
data: &[T],
rows: i32,
cols: i32,
mat_type: MatType,
) -> Result<Self>
pub fn from_slice<T>( data: &[T], rows: i32, cols: i32, mat_type: MatType, ) -> Result<Self>
Create a Mat from existing data
Sourcepub fn convert_to(
&self,
dst: &mut Mat,
rtype: MatType,
_alpha: f64,
_beta: f64,
) -> Result<()>
pub fn convert_to( &self, dst: &mut Mat, rtype: MatType, _alpha: f64, _beta: f64, ) -> Result<()>
Convert matrix type
Sourcepub fn data_ptr_mut(&mut self) -> *mut u8
pub fn data_ptr_mut(&mut self) -> *mut u8
Get mutable raw data pointer
Trait Implementations§
impl Send for Mat
impl Sync for Mat
Auto Trait Implementations§
impl Freeze for Mat
impl RefUnwindSafe for Mat
impl Unpin for Mat
impl UnsafeUnpin for Mat
impl UnwindSafe for Mat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more