Enum opencv::core::KmeansFlags
source · #[repr(C)]pub enum KmeansFlags {
KMEANS_RANDOM_CENTERS = 0,
KMEANS_PP_CENTERS = 2,
KMEANS_USE_INITIAL_LABELS = 1,
}
Expand description
k-Means flags
Variants§
KMEANS_RANDOM_CENTERS = 0
Select random initial centers in each attempt.
KMEANS_PP_CENTERS = 2
Use kmeans++ center initialization by Arthur and Vassilvitskii [Arthur2007].
KMEANS_USE_INITIAL_LABELS = 1
During the first (and possibly the only) attempt, use the user-supplied labels instead of computing them from the initial centers. For the second and further attempts, use the random or semi-random centers. Use one of KMEANS_*_CENTERS flag to specify the exact method.
Trait Implementations§
source§impl Clone for KmeansFlags
impl Clone for KmeansFlags
source§fn clone(&self) -> KmeansFlags
fn clone(&self) -> KmeansFlags
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 KmeansFlags
impl Debug for KmeansFlags
source§impl From<KmeansFlags> for i32
impl From<KmeansFlags> for i32
source§fn from(v: KmeansFlags) -> Self
fn from(v: KmeansFlags) -> Self
Converts to this type from the input type.
source§impl PartialEq for KmeansFlags
impl PartialEq for KmeansFlags
source§fn eq(&self, other: &KmeansFlags) -> bool
fn eq(&self, other: &KmeansFlags) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<i32> for KmeansFlags
impl TryFrom<i32> for KmeansFlags
impl Copy for KmeansFlags
impl Eq for KmeansFlags
impl StructuralPartialEq for KmeansFlags
Auto Trait Implementations§
impl Freeze for KmeansFlags
impl RefUnwindSafe for KmeansFlags
impl Send for KmeansFlags
impl Sync for KmeansFlags
impl Unpin for KmeansFlags
impl UnwindSafe for KmeansFlags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more