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
864b4e3b
Commit
864b4e3b
authored
Mar 30, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3873 from Dmitry-Me:reduceVariableScope10
parents
13a9d4a6
75a65542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
pca.cpp
modules/core/src/pca.cpp
+4
-2
No files found.
modules/core/src/pca.cpp
View file @
864b4e3b
...
...
@@ -66,7 +66,7 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComp
{
Mat
data
=
_data
.
getMat
(),
_mean
=
__mean
.
getMat
();
int
covar_flags
=
CV_COVAR_SCALE
;
int
i
,
len
,
in_count
;
int
len
,
in_count
;
Size
mean_sz
;
CV_Assert
(
data
.
channels
()
==
1
);
...
...
@@ -131,6 +131,7 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, int maxComp
eigenvectors
=
evects1
;
// normalize eigenvectors
int
i
;
for
(
i
=
0
;
i
<
out_count
;
i
++
)
{
Mat
vec
=
eigenvectors
.
row
(
i
);
...
...
@@ -202,7 +203,7 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, double reta
{
Mat
data
=
_data
.
getMat
(),
_mean
=
__mean
.
getMat
();
int
covar_flags
=
CV_COVAR_SCALE
;
int
i
,
len
,
in_count
;
int
len
,
in_count
;
Size
mean_sz
;
CV_Assert
(
data
.
channels
()
==
1
);
...
...
@@ -266,6 +267,7 @@ PCA& PCA::operator()(InputArray _data, InputArray __mean, int flags, double reta
eigenvectors
=
evects1
;
// normalize all eigenvectors
int
i
;
for
(
i
=
0
;
i
<
eigenvectors
.
rows
;
i
++
)
{
Mat
vec
=
eigenvectors
.
row
(
i
);
...
...
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