PCA error using CV_PCA_DATA_AS_COL (Bug #701)


Added by Walter Lucetti over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:core
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

When using PCA with CV_PCA_DATA_AS_COL as parameter there is an error in eigenvector matrix used for "project".

In my case I have 20 elements with 64 components compressed in 32.
I have an input matrix 64 rows x 20 columns

What I expect is and eigenvector matrix made of 64rows and 20 columns, instead it is 20 rows and 64 cols.

I think that the error is in PCA& PCA::operator() function where out_count is reduced to 20 instead of remaining 32!


Associated revisions

Revision 55c9a7c8
Added by Andrey Kamaev almost 12 years ago

Merge pull request #701 from jet47:clahe

History

Updated by Vadim Pisarevsky over 14 years ago

CV_PCA_DATA_AS_COL/CV_PCA_DATA_AS_ROW is only used and known at the decomposition step. The only reason why CV_PCA_DATA_AS_COL is supported is because the data can be huge and it can be too expensive (time-wise and memory-wise) to transpose it. After PCA is performed, the project() and backProject() functions work on row-oriented data. That's why eigenvector matrix is always computed as if the data had CV_PCA_DATA_AS_ROW layout.

  • Status changed from Open to Done
  • (deleted custom field) set to worksforme

Also available in: Atom PDF