Merge pull request #11980 from berak:core_lda_dataAsRow

This commit is contained in:
Alexander Alekhin 2018-07-15 14:32:15 +00:00
commit 5e31c82b5b
2 changed files with 2 additions and 3 deletions

View File

@ -2589,7 +2589,6 @@ public:
static Mat subspaceReconstruct(InputArray W, InputArray mean, InputArray src); static Mat subspaceReconstruct(InputArray W, InputArray mean, InputArray src);
protected: protected:
bool _dataAsRow; // unused, but needed for 3.0 ABI compatibility.
int _num_components; int _num_components;
Mat _eigenvectors; Mat _eigenvectors;
Mat _eigenvalues; Mat _eigenvalues;

View File

@ -996,9 +996,9 @@ void eigenNonSymmetric(InputArray _src, OutputArray _evals, OutputArray _evects)
// Linear Discriminant Analysis implementation // Linear Discriminant Analysis implementation
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
LDA::LDA(int num_components) : _dataAsRow(true), _num_components(num_components) { } LDA::LDA(int num_components) : _num_components(num_components) { }
LDA::LDA(InputArrayOfArrays src, InputArray labels, int num_components) : _dataAsRow(true), _num_components(num_components) LDA::LDA(InputArrayOfArrays src, InputArray labels, int num_components) : _num_components(num_components)
{ {
this->compute(src, labels); //! compute eigenvectors and eigenvalues this->compute(src, labels); //! compute eigenvectors and eigenvalues
} }