|
|
@ -861,18 +861,7 @@ namespace cv |
|
|
|
// Optimization Criterion on given data in src and corresponding labels
|
|
|
|
// Optimization Criterion on given data in src and corresponding labels
|
|
|
|
// in labels. If 0 (or less) number of components are given, they are
|
|
|
|
// in labels. If 0 (or less) number of components are given, they are
|
|
|
|
// automatically determined for given data in computation.
|
|
|
|
// automatically determined for given data in computation.
|
|
|
|
LDA(const Mat& src, vector<int> labels, |
|
|
|
LDA(InputArrayOfArrays src, InputArray labels, |
|
|
|
int num_components = 0) : |
|
|
|
|
|
|
|
_num_components(num_components) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this->compute(src, labels); //! compute eigenvectors and eigenvalues
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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(InputArray src, InputArray labels, |
|
|
|
|
|
|
|
int num_components = 0) : |
|
|
|
int num_components = 0) : |
|
|
|
_num_components(num_components) |
|
|
|
_num_components(num_components) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -895,7 +884,7 @@ namespace cv |
|
|
|
~LDA() {} |
|
|
|
~LDA() {} |
|
|
|
|
|
|
|
|
|
|
|
//! Compute the discriminants for data in src and labels.
|
|
|
|
//! Compute the discriminants for data in src and labels.
|
|
|
|
void compute(InputArray src, InputArray labels); |
|
|
|
void compute(InputArrayOfArrays src, InputArray labels); |
|
|
|
|
|
|
|
|
|
|
|
// Projects samples into the LDA subspace.
|
|
|
|
// Projects samples into the LDA subspace.
|
|
|
|
Mat project(InputArray src); |
|
|
|
Mat project(InputArray src); |
|
|
@ -915,7 +904,7 @@ namespace cv |
|
|
|
Mat _eigenvectors; |
|
|
|
Mat _eigenvectors; |
|
|
|
Mat _eigenvalues; |
|
|
|
Mat _eigenvalues; |
|
|
|
|
|
|
|
|
|
|
|
void lda(InputArray src, InputArray labels); |
|
|
|
void lda(InputArrayOfArrays src, InputArray labels); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class CV_EXPORTS_W FaceRecognizer : public Algorithm |
|
|
|
class CV_EXPORTS_W FaceRecognizer : public Algorithm |
|
|
|