Renesas / opencv-lib

Dependents:   RZ_A2M_Mbed_samples

Embed: (wiki syntax)

« Back to documentation index

LDA Class Reference

Linear Discriminant Analysis. More...

#include <core.hpp>

Public Member Functions

 LDA (int num_components=0)
 constructor Initializes a LDA with num_components (default 0).
 LDA (InputArrayOfArrays src, InputArray labels, int num_components=0)
 Initializes and performs a Discriminant Analysis with Fisher's Optimization Criterion on given data in src and corresponding labels in labels.
void save (const String &filename) const
 Serializes this object to a given filename.
void load (const String &filename)
 Deserializes this object from a given filename.
void save (FileStorage &fs) const
 Serializes this object to a given cv::FileStorage.
void load (const FileStorage &node)
 Deserializes this object from a given cv::FileStorage.
 ~LDA ()
 destructor
void compute (InputArrayOfArrays src, InputArray labels)
 Compute the discriminants for data in src (row aligned) and labels.
Mat project (InputArray src)
 Projects samples into the LDA subspace.
Mat reconstruct (InputArray src)
 Reconstructs projections from the LDA subspace.
Mat eigenvectors () const
 Returns the eigenvectors of this LDA.
Mat eigenvalues () const
 Returns the eigenvalues of this LDA.

Detailed Description

Linear Discriminant Analysis.

Definition at line 2468 of file core.hpp.


Constructor & Destructor Documentation

LDA ( int  num_components = 0 ) [explicit]

constructor Initializes a LDA with num_components (default 0).

LDA ( InputArrayOfArrays  src,
InputArray  labels,
int  num_components = 0 
)

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.

~LDA (  )

destructor


Member Function Documentation

void compute ( InputArrayOfArrays  src,
InputArray  labels 
)

Compute the discriminants for data in src (row aligned) and labels.

Mat eigenvalues (  ) const

Returns the eigenvalues of this LDA.

Definition at line 2523 of file core.hpp.

Mat eigenvectors (  ) const

Returns the eigenvectors of this LDA.

Definition at line 2519 of file core.hpp.

void load ( const String &  filename )

Deserializes this object from a given filename.

void load ( const FileStorage node )

Deserializes this object from a given cv::FileStorage.

Mat project ( InputArray  src )

Projects samples into the LDA subspace.

src may be one or more row aligned samples.

Mat reconstruct ( InputArray  src )

Reconstructs projections from the LDA subspace.

src may be one or more row aligned projections.

void save ( FileStorage fs ) const

Serializes this object to a given cv::FileStorage.

void save ( const String &  filename ) const

Serializes this object to a given filename.