OpenCV  2.4.13
Open Source Computer Vision
cv::LDA Class Reference

#include <contrib.hpp>

Public Member Functions

 LDA (int num_components=0)
 
 LDA (const Mat &src, vector< int > labels, int num_components=0)
 
 LDA (InputArrayOfArrays src, InputArray labels, int num_components=0)
 
void save (const string &filename) const
 
void load (const string &filename)
 
void save (FileStorage &fs) const
 
void load (const FileStorage &node)
 
 ~LDA ()
 
void compute (InputArrayOfArrays src, InputArray labels)
 
Mat project (InputArray src)
 
Mat reconstruct (InputArray src)
 
Mat eigenvectors () const
 
Mat eigenvalues () const
 

Protected Member Functions

void lda (InputArrayOfArrays src, InputArray labels)
 

Protected Attributes

bool _dataAsRow
 
int _num_components
 
Mat _eigenvectors
 
Mat _eigenvalues
 

Constructor & Destructor Documentation

cv::LDA::LDA ( int  num_components = 0)
inline
cv::LDA::LDA ( const Mat src,
vector< int labels,
int  num_components = 0 
)
inline

compute eigenvectors and eigenvalues

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

compute eigenvectors and eigenvalues

cv::LDA::~LDA ( )
inline

Member Function Documentation

void cv::LDA::compute ( InputArrayOfArrays  src,
InputArray  labels 
)

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

Mat cv::LDA::eigenvalues ( ) const
inline
Mat cv::LDA::eigenvectors ( ) const
inline
void cv::LDA::lda ( InputArrayOfArrays  src,
InputArray  labels 
)
protected
void cv::LDA::load ( const string &  filename)
void cv::LDA::load ( const FileStorage node)
Mat cv::LDA::project ( InputArray  src)

Projects samples into the LDA subspace. src may be one or more row aligned samples.

Mat cv::LDA::reconstruct ( InputArray  src)

Reconstructs projections from the LDA subspace. src may be one or more row aligned projections.

void cv::LDA::save ( const string &  filename) const
void cv::LDA::save ( FileStorage fs) const

Member Data Documentation

bool cv::LDA::_dataAsRow
protected
Mat cv::LDA::_eigenvalues
protected
Mat cv::LDA::_eigenvectors
protected
int cv::LDA::_num_components
protected

The documentation for this class was generated from the following file: