[][src]Enum imageproc::distance_transform::Norm

pub enum Norm {
    L1,
    LInf,
}

How to measure distance between coordinates. See the distance_transform documentation for examples.

Note that this enum doesn't currently include the L2 norm. As Norm is used by the morphology functions, this means that we don't support using the L2 norm for any of those functions.

This module does support calculating the L2 distance function, via the euclidean_squared_distance_transform function, but the signature of this function is not currently compatible with those for computing L1 and LInf distance transforms. It would be nice to unify these functions in future.

Variants

L1

Defines d((x1, y1), (x2, y2)) to be abs(x1 - x2) + abs(y1 - y2). Also known as the Manhattan or city block norm.

LInf

Defines d((x1, y1), (x2, y2)) to be max(abs(x1 - x2), abs(y1 - y2)). Also known as the chessboard norm.

Trait Implementations

impl Clone for Norm[src]

impl Copy for Norm[src]

impl Debug for Norm[src]

impl Eq for Norm[src]

impl PartialEq<Norm> for Norm[src]

impl StructuralEq for Norm[src]

impl StructuralPartialEq for Norm[src]

Auto Trait Implementations

impl RefUnwindSafe for Norm

impl Send for Norm

impl Sync for Norm

impl Unpin for Norm

impl UnwindSafe for Norm

Blanket Implementations

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

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme
[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme
[src]

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

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

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

impl<T, Dst> ConvAsUtil<Dst> for T[src]

impl<T> ConvUtil for T[src]

impl<T> From<T> for T[src]

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

impl<T> SetParameter for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<Src> TryFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 
[src]

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<Src> ValueFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 
[src]

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.