[][src]Enum opencv::imgproc::DistanceTypes

#[repr(C)]pub enum DistanceTypes {
    DIST_USER,
    DIST_L1,
    DIST_L2,
    DIST_C,
    DIST_L12,
    DIST_FAIR,
    DIST_WELSCH,
    DIST_HUBER,
}

Distance types for Distance Transform and M-estimators

See also

distanceTransform, fitLine

Variants

DIST_USER

User defined distance

DIST_L1

distance = |x1-x2| + |y1-y2|

DIST_L2

the simple euclidean distance

DIST_C

distance = max(|x1-x2|,|y1-y2|)

DIST_L12

L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))

DIST_FAIR

distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998

DIST_WELSCH

distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846

DIST_HUBER

distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345

Trait Implementations

impl Clone for DistanceTypes[src]

impl Copy for DistanceTypes[src]

impl Debug for DistanceTypes[src]

impl PartialEq<DistanceTypes> for DistanceTypes[src]

impl StructuralPartialEq for DistanceTypes[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<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.