remove usage of obsolete _dataAsRows flag

This commit is contained in:
berak
2015-09-08 14:45:13 +02:00
parent faa6684373
commit 2f7c926670
2 changed files with 11 additions and 11 deletions

View File

@@ -937,9 +937,9 @@ public:
// Linear Discriminant Analysis implementation
//------------------------------------------------------------------------------
LDA::LDA(int num_components) : _num_components(num_components) { }
LDA::LDA(int num_components) : _dataAsRow(true), _num_components(num_components) { }
LDA::LDA(InputArrayOfArrays src, InputArray labels, int num_components) : _num_components(num_components)
LDA::LDA(InputArrayOfArrays src, InputArray labels, int num_components) : _dataAsRow(true), _num_components(num_components)
{
this->compute(src, labels); //! compute eigenvectors and eigenvalues
}
@@ -1106,14 +1106,14 @@ void LDA::compute(InputArrayOfArrays _src, InputArray _lbls) {
}
}
// Projects samples into the LDA subspace.
// Projects one or more row aligned samples into the LDA subspace.
Mat LDA::project(InputArray src) {
return subspaceProject(_eigenvectors, Mat(), _dataAsRow ? src : src.getMat().t());
return subspaceProject(_eigenvectors, Mat(), src);
}
// Reconstructs projections from the LDA subspace.
// Reconstructs projections from the LDA subspace from one or more row aligned samples.
Mat LDA::reconstruct(InputArray src) {
return subspaceReconstruct(_eigenvectors, Mat(), _dataAsRow ? src : src.getMat().t());
return subspaceReconstruct(_eigenvectors, Mat(), src);
}
}