Enum opencv::imgproc::DistanceTypes
source · #[repr(C)]
pub enum DistanceTypes {
DIST_USER,
DIST_L1,
DIST_L2,
DIST_C,
DIST_L12,
DIST_FAIR,
DIST_WELSCH,
DIST_HUBER,
}Expand description
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§
source§impl Clone for DistanceTypes
impl Clone for DistanceTypes
source§fn clone(&self) -> DistanceTypes
fn clone(&self) -> DistanceTypes
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 Debug for DistanceTypes
impl Debug for DistanceTypes
source§impl PartialEq<DistanceTypes> for DistanceTypes
impl PartialEq<DistanceTypes> for DistanceTypes
source§fn eq(&self, other: &DistanceTypes) -> bool
fn eq(&self, other: &DistanceTypes) -> bool
This method tests for
self and other values to be equal, and is used
by ==.