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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.