Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
28974e72
Commit
28974e72
authored
9 years ago
by
berak
Committed by
Alexander Alekhin
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove usage of obsolete _dataAsRows flag
parent
33dc4105
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
contrib.hpp
modules/contrib/include/opencv2/contrib/contrib.hpp
+10
-6
lda.cpp
modules/contrib/src/lda.cpp
+4
-4
No files found.
modules/contrib/include/opencv2/contrib/contrib.hpp
View file @
28974e72
...
...
@@ -853,8 +853,7 @@ namespace cv
class
CV_EXPORTS
LDA
{
public
:
// Initializes a LDA with num_components (default 0) and specifies how
// samples are aligned (default dataAsRow=true).
// Initializes a LDA with num_components (default 0).
LDA
(
int
num_components
=
0
)
:
_num_components
(
num_components
)
{};
...
...
@@ -895,13 +894,18 @@ namespace cv
// Destructor.
~
LDA
()
{}
//! Compute the discriminants for data in src and labels.
/** Compute the discriminants for data in src (row aligned) and labels.
*/
void
compute
(
InputArrayOfArrays
src
,
InputArray
labels
);
// Projects samples into the LDA subspace.
/** Projects samples into the LDA subspace.
src may be one or more row aligned samples.
*/
Mat
project
(
InputArray
src
);
// Reconstructs projections from the LDA subspace.
/** Reconstructs projections from the LDA subspace.
src may be one or more row aligned projections.
*/
Mat
reconstruct
(
InputArray
src
);
// Returns the eigenvectors of this LDA.
...
...
@@ -911,7 +915,7 @@ namespace cv
Mat
eigenvalues
()
const
{
return
_eigenvalues
;
}
protected
:
bool
_dataAsRow
;
bool
_dataAsRow
;
// unused, but needed for ABI compatibility.
int
_num_components
;
Mat
_eigenvectors
;
Mat
_eigenvalues
;
...
...
This diff is collapsed.
Click to expand it.
modules/contrib/src/lda.cpp
View file @
28974e72
...
...
@@ -1100,14 +1100,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
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment