# Fast PCA(principal component analysis)

I use PCA engine to compute pca but it is very slow.Is there a fast method to compute pca?

This forum is disabled, please visit https://forum.opencv.org

Fast PCA(principal component analysis)

I use PCA engine to compute pca but it is very slow.Is there a fast method to compute pca?

Asked: **
2013-07-30 00:39:58 -0600
**

Seen: **1,252 times**

Last updated: **Jul 30 '13**

Saving an image with unset pixels

MNIST and Local Binary Patterns

How to read/write a PCA object from/to a cv::FileStorage ?

How to calculate distance between camera and image?

Question about polar or radial angle calculation in the image coordinate system

Access multiple channels in Mat

How can I work with pixels of an image directly?

fingerprint orientation map through gradient method - opencv c++

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

give more information about your task(size of the problem, number of principal components needed etc.)

features dimension = 4000 count = 20000.

PCA isn't supposed to run fast... It is an algorithm that has to calculate tons of covariance matrices, which takes time...

OpenCV''s PCA is indeed not the fastest one (at least at the time I used it, maybe it changed in the meantime). Either use a different library for that or try to use SVD instead, you basically solve the same problem there, see http://math.stackexchange.com/questions/3869/what-is-the-intuitive-relationship-between-svd-and-pca how they are related.

If you need only few first principal components you can use iterative methods (I don't know if they fast enough) some info here http://scicomp.stackexchange.com/questions/3220/fastest-pca-algorithm-for-high-dimensional-data