pub struct CannyBuilder<T> { /* private fields */ }
Expand description
Builder to construct the Canny parameters, if a parameter is not selected then a sensible default is chosen
Implementations§
Source§impl<T> CannyBuilder<T>
impl<T> CannyBuilder<T>
Sourcepub fn lower_threshold(self, t1: T) -> Self
pub fn lower_threshold(self, t1: T) -> Self
Sets the lower threshold for the parameters returning a new builder
Sourcepub fn upper_threshold(self, t2: T) -> Self
pub fn upper_threshold(self, t2: T) -> Self
Sets the upper threshold for the parameters returning a new builder
Sourcepub fn blur<D>(self, shape: D, covariance: [f64; 2]) -> Self
pub fn blur<D>(self, shape: D, covariance: [f64; 2]) -> Self
Given the shape and covariance matrix constructs a Gaussian blur to be used with the Canny Edge Detector
Sourcepub fn build(self) -> CannyParameters<T>
pub fn build(self) -> CannyParameters<T>
Creates the Canny parameters to be used with sensible defaults for unspecified
parameters. This method also rearranges the upper and lower threshold to
ensure that the relationship t1 <= t2
is maintained.
Defaults are: a lower threshold of 0.3, upper threshold of 0.7 and a 5x5 Gaussian blur with a horizontal and vertical variances of 2.0.
Trait Implementations§
Source§impl<T: Clone> Clone for CannyBuilder<T>
impl<T: Clone> Clone for CannyBuilder<T>
Source§fn clone(&self) -> CannyBuilder<T>
fn clone(&self) -> CannyBuilder<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for CannyBuilder<T>
impl<T: Debug> Debug for CannyBuilder<T>
Source§impl<T> Default for CannyBuilder<T>
impl<T> Default for CannyBuilder<T>
Source§impl<T: Hash> Hash for CannyBuilder<T>
impl<T: Hash> Hash for CannyBuilder<T>
Source§impl<T: PartialEq> PartialEq for CannyBuilder<T>
impl<T: PartialEq> PartialEq for CannyBuilder<T>
impl<T: Eq> Eq for CannyBuilder<T>
impl<T> StructuralPartialEq for CannyBuilder<T>
Auto Trait Implementations§
impl<T> Freeze for CannyBuilder<T>where
T: Freeze,
impl<T> RefUnwindSafe for CannyBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for CannyBuilder<T>where
T: Send,
impl<T> Sync for CannyBuilder<T>where
T: Sync,
impl<T> Unpin for CannyBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for CannyBuilder<T>where
T: UnwindSafe + RefUnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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