I have been learning about using the Singular Value Decomposition to find low rank approximations to matrices. I had an image which I converted to a matrix. I regarded each row of the matrix as a 'data point'.
I did two things:
- Found the mean of the data points then subtracted the mean from each data point and calculated the SVD of the result
- Directly calculated the SVD of the original data matrix
Then I calculated the low rank approximations of the results from 1. and 2. by replacing some of the singular values with zeros. Finally I converted the results back to images.
Both images looked quite similar. They both looked like how SVD-compressed images should look (according to textbooks).
From a principal component analysis point of view, not mean-centering the data before finding the low-rank approximation shouldn't work well. It is equivalent to calculating the principal components from the eigenvectors of $\frac{1}{n-1}X^TX$ (where $X$ is the data matrix) instead of the covariance matrix of $X$. So why did it appear like mean-centering didn't matter? Or does it depend on the type of images?