[][src]Struct ndarray_vision::processing::canny::CannyBuilder

pub struct CannyBuilder<T> { /* fields omitted */ }

Builder to construct the Canny parameters, if a parameter is not selected then a sensible default is chosen

Methods

impl<T> CannyBuilder<T> where
    T: Copy + Clone + FromPrimitive + Real + Num
[src]

pub fn new() -> Self[src]

Creates a new Builder with no parameters selected

pub fn lower_threshold(self, t1: T) -> Self[src]

Sets the lower threshold for the parameters returning a new builder

pub fn upper_threshold(self, t2: T) -> Self[src]

Sets the upper threshold for the parameters returning a new builder

pub fn blur<D>(self, shape: D, covariance: [f64; 2]) -> Self where
    D: Copy + IntoDimension<Dim = Ix2>, 
[src]

Given the shape and covariance matrix constructs a Gaussian blur to be used with the Canny Edge Detector

pub fn build(self) -> CannyParameters<T>[src]

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

impl<T: Clone> Clone for CannyBuilder<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<CannyBuilder<T>> for CannyBuilder<T>[src]

impl<T: Eq> Eq for CannyBuilder<T>[src]

impl<T: Hash> Hash for CannyBuilder<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Debug> Debug for CannyBuilder<T>[src]

Auto Trait Implementations

impl<T> Send for CannyBuilder<T> where
    T: Send

impl<T> Sync for CannyBuilder<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]