use crate::{Result, Size, MatType};
pub trait Dimensioned {
fn width(&self) -> i32;
fn height(&self) -> i32;
fn size(&self) -> Size;
}
pub trait ImageTrait: Dimensioned {
fn image_type(&self) -> MatType;
fn channels(&self) -> i32;
fn is_empty(&self) -> bool;
}
pub trait ArrayConvertible<T, const N: usize> {
fn to_array(&self) -> [T; N];
fn from_array(arr: [T; N]) -> Self;
}
pub trait Arithmetic: Sized {
fn add(&self, other: &Self) -> Result<Self>;
fn sub(&self, other: &Self) -> Result<Self>;
fn mul_scalar(&self, scalar: f64) -> Result<Self>;
fn div_scalar(&self, scalar: f64) -> Result<Self>;
}