pub struct StructuringElement { /* private fields */ }Expand description
A validated binary neighborhood mask and anchor.
Implementations§
Source§impl StructuringElement
impl StructuringElement
Sourcepub fn try_new(
shape: MorphologyShape,
width: usize,
height: usize,
) -> VisionResult<Self>
pub fn try_new( shape: MorphologyShape, width: usize, height: usize, ) -> VisionResult<Self>
Creates a built-in element anchored at its integer center.
Sourcepub fn try_new_with_anchor(
shape: MorphologyShape,
width: usize,
height: usize,
anchor_x: usize,
anchor_y: usize,
) -> VisionResult<Self>
pub fn try_new_with_anchor( shape: MorphologyShape, width: usize, height: usize, anchor_x: usize, anchor_y: usize, ) -> VisionResult<Self>
Creates a built-in element with an explicit anchor.
Sourcepub fn try_from_mask(
width: usize,
height: usize,
anchor_x: usize,
anchor_y: usize,
mask: Vec<bool>,
) -> VisionResult<Self>
pub fn try_from_mask( width: usize, height: usize, anchor_x: usize, anchor_y: usize, mask: Vec<bool>, ) -> VisionResult<Self>
Creates an element from a row-major binary mask.
Trait Implementations§
Source§impl Clone for StructuringElement
impl Clone for StructuringElement
Source§fn clone(&self) -> StructuringElement
fn clone(&self) -> StructuringElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructuringElement
impl Debug for StructuringElement
Source§impl PartialEq for StructuringElement
impl PartialEq for StructuringElement
Source§fn eq(&self, other: &StructuringElement) -> bool
fn eq(&self, other: &StructuringElement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for StructuringElement
impl StructuralPartialEq for StructuringElement
Auto Trait Implementations§
impl Freeze for StructuringElement
impl RefUnwindSafe for StructuringElement
impl Send for StructuringElement
impl Sync for StructuringElement
impl Unpin for StructuringElement
impl UnsafeUnpin for StructuringElement
impl UnwindSafe for StructuringElement
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more