Renesas GR-PEACH OpenCV Development / gr-peach-opencv-project-sd-card_update

Fork of gr-peach-opencv-project-sd-card by the do

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.

Protected Member Functions

void lda (InputArrayOfArrays src, InputArray labels)

Detailed Description

Linear Discriminant Analysis.

Definition at line 2422 of file core.hpp.


Constructor & Destructor Documentation

LDA ( int  num_components = 0 ) [explicit]

constructor Initializes a LDA with num_components (default 0).

Definition at line 940 of file lda.cpp.

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.

compute eigenvectors and eigenvalues

Definition at line 942 of file lda.cpp.

~LDA (  )

destructor

Definition at line 947 of file lda.cpp.


Member Function Documentation

void compute ( InputArrayOfArrays  src,
InputArray  labels 
)

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

Definition at line 1095 of file lda.cpp.

Mat eigenvalues (  ) const

Returns the eigenvalues of this LDA.

Definition at line 2477 of file core.hpp.

Mat eigenvectors (  ) const

Returns the eigenvectors of this LDA.

Definition at line 2473 of file core.hpp.

void lda ( InputArrayOfArrays  src,
InputArray  labels 
) [protected]

Dx1 image vector

Definition at line 985 of file lda.cpp.

void load ( const String &  filename )

Deserializes this object from a given filename.

Definition at line 960 of file lda.cpp.

void load ( const FileStorage node )

Deserializes this object from a given cv::FileStorage.

Definition at line 978 of file lda.cpp.

Mat project ( InputArray  src )

Projects samples into the LDA subspace.

src may be one or more row aligned samples.

Definition at line 1111 of file lda.cpp.

Mat reconstruct ( InputArray  src )

Reconstructs projections from the LDA subspace.

src may be one or more row aligned projections.

Definition at line 1116 of file lda.cpp.

void save ( cv::FileStorage fs ) const

Serializes this object to a given cv::FileStorage.

Definition at line 969 of file lda.cpp.

void save ( const String &  filename ) const

Serializes this object to a given filename.

Definition at line 949 of file lda.cpp.