I am still a not how PCA can be used in image analysis and where is it is mostly used. For example how can PCA be used in order to differentiate between different faces? Can you please mention other uses it has?

  • $\begingroup$ You might find this useful. $\endgroup$
    – A_A
    Jun 5, 2018 at 7:00

1 Answer 1


Imagine you have a set of 10,000 images (32 x 32) of faces.

An intuitive way is to think they have a lot in common.
One step farther would be that if you take one of the faces you could generate it from a Linear Combination of the other 9,999 images.
Sounds reasonable, isn't it?

Let's treat the images as a vector space with dimension $ d = 32 \times 32 = 1024 $.
So all we need is $ 1024 $ independent vectors in order to be able to span any images of size $ 32 \times 32 $ in general and faces in specific.

But, if $ 1024 $ images can span all $ 32 \times 32 $ images in the world, can't we do better for a subset of this amazing number of different images?
After all we're only after images of faces, human faces.

So we want smaller number of vectors which spans face images.
Maybe not perfectly, but at least almost perfectly based on much smaller number than 1024.
Can we do that?

Actually many good ways to do so.
The specific way which uses Principal Component Analysis (PCA) is called Eiganface (At least one of them).
This method is the most efficient way to minimize the $ {L}_{2} $ norm of the reconstruction error when there is a limitation of using $ k $ elements of the linear reconstruction.

If one will analyze the $ {L}_{2} $ norm of the error one would see the best elements are the Eigenvectors of the data set.
Those are the result of the PCA process (Or SVD more generally) and in the context of this method, unsurprisingly, they are called eigen faces.

This general problem is called dictionary learning.
Given a set of data we're learning a dictionary (Set of Atoms) which describe it most efficiently according to some measure of the reconstruction quality.

PCA is one of the most used methods for this kind problems.
The other side of the coin of this problems is the Dimensionality Reduction method where PCA is also heavily used.


Not the answer you're looking for? Browse other questions tagged or ask your own question.