[−][src]Struct opencv::core::LDA
Linear Discriminant Analysis @todo document this class
Methods
impl LDA
[src]
pub fn new(num_components: i32) -> Result<LDA>
[src]
constructor Initializes a LDA with num_components (default 0).
C++ default parameters
- num_components: 0
pub fn new_with_data(
src: &VectorOfMat,
labels: &Mat,
num_components: i32
) -> Result<LDA>
[src]
src: &VectorOfMat,
labels: &Mat,
num_components: i32
) -> Result<LDA>
Initializes and performs a Discriminant Analysis with Fisher's Optimization Criterion on given data in src and corresponding labels in labels. If 0 (or less) number of components are given, they are automatically determined for given data in computation.
C++ default parameters
- num_components: 0
pub fn save(&self, filename: &str) -> Result<()>
[src]
Serializes this object to a given filename.
pub fn load(&mut self, filename: &str) -> Result<()>
[src]
Deserializes this object from a given filename.
pub fn compute(&mut self, src: &VectorOfMat, labels: &Mat) -> Result<()>
[src]
Compute the discriminants for data in src (row aligned) and labels.
pub fn project(&mut self, src: &Mat) -> Result<Mat>
[src]
Projects samples into the LDA subspace. src may be one or more row aligned samples.
pub fn reconstruct(&mut self, src: &Mat) -> Result<Mat>
[src]
Reconstructs projections from the LDA subspace. src may be one or more row aligned projections.
pub fn eigenvectors(&self) -> Result<Mat>
[src]
Returns the eigenvectors of this LDA.
pub fn eigenvalues(&self) -> Result<Mat>
[src]
Returns the eigenvalues of this LDA.
pub fn subspace_project(w: &Mat, mean: &Mat, src: &Mat) -> Result<Mat>
[src]
pub fn subspace_reconstruct(w: &Mat, mean: &Mat, src: &Mat) -> Result<Mat>
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,