Enum opencv::core::CovarFlags

source ·
#[repr(C)]
pub enum CovarFlags { COVAR_SCRAMBLED = 0, COVAR_NORMAL = 1, COVAR_USE_AVG = 2, COVAR_SCALE = 4, COVAR_ROWS = 8, COVAR_COLS = 16, }
Expand description

Covariation flags

Variants§

§

COVAR_SCRAMBLED = 0

The output covariance matrix is calculated as: block formula The covariance matrix will be nsamples x nsamples. Such an unusual covariance matrix is used for fast PCA of a set of very large vectors (see, for example, the EigenFaces technique for face recognition). Eigenvalues of this “scrambled” matrix match the eigenvalues of the true covariance matrix. The “true” eigenvectors can be easily calculated from the eigenvectors of the “scrambled” covariance matrix.

§

COVAR_NORMAL = 1

The output covariance matrix is calculated as: block formula covar will be a square matrix of the same size as the total number of elements in each input vector. One and only one of COVAR_SCRAMBLED and COVAR_NORMAL must be specified.

§

COVAR_USE_AVG = 2

If the flag is specified, the function does not calculate mean from the input vectors but, instead, uses the passed mean vector. This is useful if mean has been pre-calculated or known in advance, or if the covariance matrix is calculated by parts. In this case, mean is not a mean vector of the input sub-set of vectors but rather the mean vector of the whole set.

§

COVAR_SCALE = 4

If the flag is specified, the covariance matrix is scaled. In the “normal” mode, scale is 1./nsamples . In the “scrambled” mode, scale is the reciprocal of the total number of elements in each input vector. By default (if the flag is not specified), the covariance matrix is not scaled ( scale=1 ).

§

COVAR_ROWS = 8

If the flag is specified, all the input vectors are stored as rows of the samples matrix. mean should be a single-row vector in this case.

§

COVAR_COLS = 16

If the flag is specified, all the input vectors are stored as columns of the samples matrix. mean should be a single-column vector in this case.

Trait Implementations§

source§

impl Clone for CovarFlags

source§

fn clone(&self) -> CovarFlags

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CovarFlags

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<CovarFlags> for i32

source§

fn from(v: CovarFlags) -> Self

Converts to this type from the input type.
source§

impl PartialEq for CovarFlags

source§

fn eq(&self, other: &CovarFlags) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for CovarFlags

source§

impl Eq for CovarFlags

source§

impl StructuralEq for CovarFlags

source§

impl StructuralPartialEq for CovarFlags

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.