Struct visioncortex::Shape
source · [−]pub struct Shape {
pub image: BinaryImage,
}Expand description
A conceptual object represented by an image
Fields
image: BinaryImageImplementations
sourceimpl 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
sourceimpl Shape
impl Shape
pub fn to_skeleton(&self) -> Skeleton
Trait Implementations
sourceimpl From<BinaryImage> for Shape
impl From<BinaryImage> for Shape
sourcefn from(image: BinaryImage) -> Self
fn from(image: BinaryImage) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more