OpenCV
3.2.0
Open Source Computer Vision
|
Linear Discriminant Analysis. More...
#include "core.hpp"
Public Member Functions | |
LDA (int num_components=0) | |
constructor Initializes a LDA with num_components (default 0). More... | |
LDA (InputArrayOfArrays src, InputArray labels, int num_components=0) | |
~LDA () | |
void | compute (InputArrayOfArrays src, InputArray labels) |
Mat | eigenvalues () const |
Mat | eigenvectors () const |
void | load (const String &filename) |
void | load (const FileStorage &node) |
Mat | project (InputArray src) |
Mat | reconstruct (InputArray src) |
void | save (const String &filename) const |
void | save (FileStorage &fs) const |
Static Public Member Functions | |
static Mat | subspaceProject (InputArray W, InputArray mean, InputArray src) |
static Mat | subspaceReconstruct (InputArray W, InputArray mean, InputArray src) |
Protected Member Functions | |
void | lda (InputArrayOfArrays src, InputArray labels) |
Protected Attributes | |
bool | _dataAsRow |
Mat | _eigenvalues |
Mat | _eigenvectors |
int | _num_components |
Linear Discriminant Analysis.
|
explicit |
constructor Initializes a LDA with num_components (default 0).
cv::LDA::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.
cv::LDA::~LDA | ( | ) |
destructor
void cv::LDA::compute | ( | InputArrayOfArrays | src, |
InputArray | labels | ||
) |
Compute the discriminants for data in src (row aligned) and labels.
|
protected |
void cv::LDA::load | ( | const String & | filename | ) |
Deserializes this object from a given filename.
void cv::LDA::load | ( | const FileStorage & | node | ) |
Deserializes this object from a given cv::FileStorage.
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 |
Serializes this object to a given filename.
void cv::LDA::save | ( | FileStorage & | fs | ) | const |
Serializes this object to a given cv::FileStorage.
|
static |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |