cv::LDA Class Reference 核心功能 » 操作数组


线性判别分析。 更多...

#include <opencv2/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)
 
  ~LDA ()
 
void  compute ( InputArrayOfArrays src, InputArray labels)
 
Mat   eigenvalues () const
 
Mat   eigenvectors () const
 
void  load (const 字符串 &filename)
 
void  load (const FileStorage &node)
 
Mat   project ( InputArray src)
 
Mat   reconstruct ( InputArray src)
 
void  save (const 字符串 &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

Mat   _eigenvalues
 
Mat   _eigenvectors
 
int  _num_components
 

详细描述

线性判别分析。

Todo:
document this class

Constructor & Destructor Documentation

◆  LDA() [1/2]

cv::LDA::LDA ( int  num_components = 0 )
explicit

constructor Initializes a LDA with num_components (default 0).

◆  LDA() [2/2]

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.

◆  ~LDA()

cv::LDA::~LDA ( )

destructor

成员函数文档编制

◆  compute()

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

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

◆  eigenvalues()

Mat cv::LDA::eigenvalues ( ) const
inline

Returns the eigenvalues of this LDA .

◆  eigenvectors()

Mat cv::LDA::eigenvectors ( ) const
inline

Returns the eigenvectors of this LDA .

◆  lda()

void cv::LDA::lda ( InputArrayOfArrays   src ,
InputArray   labels  
)
protected

◆  load() [1/2]

void cv::LDA::load ( const 字符串 filename )

Deserializes this object from a given filename.

◆  load() [2/2]

void cv::LDA::load ( const FileStorage node )

Deserializes this object from a given cv::FileStorage .

◆  project()

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

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

◆  reconstruct()

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

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

◆  save() [1/2]

void cv::LDA::save ( const 字符串 filename ) const

Serializes this object to a given filename.

◆  save() [2/2]

void cv::LDA::save ( FileStorage fs ) const

Serializes this object to a given cv::FileStorage .

◆  subspaceProject()

static Mat cv::LDA::subspaceProject ( InputArray   W ,
InputArray   mean ,
InputArray   src  
)
static

◆  subspaceReconstruct()

static Mat cv::LDA::subspaceReconstruct ( InputArray   W ,
InputArray   mean ,
InputArray   src  
)
static

Member Data Documentation

◆  _eigenvalues

Mat cv::LDA::_eigenvalues
protected

◆  _eigenvectors

Mat cv::LDA::_eigenvectors
protected

◆  _num_components

int cv::LDA::_num_components
protected

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