Struct visioncortex::Shape
source · pub struct Shape {
pub image: BinaryImage,
}
Expand description
A conceptual object represented by an image
Fields§
§image: BinaryImage
Implementations§
source§impl Shape
impl Shape
pub fn image_boundary(image: &BinaryImage) -> BinaryImage
sourcepub fn image_boundary_and_position_length(
image: &BinaryImage
) -> (BinaryImage, Option<PointI32>, u32)
pub fn image_boundary_and_position_length( image: &BinaryImage ) -> (BinaryImage, Option<PointI32>, u32)
image boundary with position of top-left pixel and path length
pub fn image_boundary_list(image: &BinaryImage) -> Vec<PointI32>
pub fn image_boundary_list_transpose( image: &BinaryImage, transpose: bool ) -> Vec<PointI32>
pub fn rect(&self) -> BoundingRect
pub fn circle(width: usize, height: usize) -> Self
pub fn ellipse(width: usize, height: usize) -> Self
pub fn is_circle(&self) -> bool
pub fn is_ellipse(&self) -> bool
pub fn is_quadrilateral(&self) -> bool
pub fn is_isosceles_triangle(&self) -> bool
Trait Implementations§
source§impl From<BinaryImage> for Shape
impl From<BinaryImage> for Shape
source§fn from(image: BinaryImage) -> Self
fn from(image: BinaryImage) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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