Re: The use of PCA on a 64x64 Matrix




oliverjb@xxxxxxxxx wrote:
> Hi,
>
> I'm new to image processing, and am having trouble fitting my head
> around some topics, this algorithm in particular.

Sci.image.processing, or even comp.ai.neural-nets maybe more suitable
for this question.

Assuming you have access to Google groups, do a search on <Campbell
karhunen> and you may find something useful, e.g. my post of Mar 27
1999 on sci.image.processing.

Incidentally, discrete Karhunen-Loeve transform ~= PCA.
>
> I have an image, which has been converted into a 64x64 matrix (each
> value being the brightness of the pixel at that spot).
>
> For the principal component analysis, I have first totted up the values
> of all the pixels, and then divided by 64 * 64, giving me the mean
> value of the pixels. I then took thbis value away from the values of
> all the pixels.
>
> Is this right? Much of the literature I read referred to N column
> vectors, and finding the mean for each column vector. In my case this
> would mean I had 64 vectors.

No. K-L and PCA work on vectors. You need to vectorise the images;
hence 64.64 = 4096 dimensional vectors.

Another problem, you need many images to estimate the covariance
matrix.

A further problem, the covariance matrix is 4096 x 4096. But see my
post and/or anything on Turk and Pentland's 'eigenfaces' for a
solution.

>
> My next step was to calculate the Covariance matrix, by C = M *
> M(transposed). This was easy enough. I then calculated the eigenvectors
> using JAMA.
>
> However, my main problem is that I have a 64 * 64 matrix of
> eigenvectors. My aim was to have 2d eigenvectors, so I could find the
> principal component, and then from this, theta.
>
> Can anyone correct me where I'm going wrong? Many thanks.

See above.

Best regards,

Jon C.

.



Relevant Pages

  • The use of PCA on a 64x64 Matrix
    ... I'm new to image processing, and am having trouble fitting my head ... value of the pixels. ... and finding the mean for each column vector. ... I then calculated the eigenvectors ...
    (comp.graphics.algorithms)
  • Re: Covariance Mean subtraction in Principal Component Analysis
    ... >>> previously subtracting the mean. ... >> to the eigenvectors of the covariance matrix, ... >> of signals, like images. ...
    (comp.soft-sys.matlab)
  • Re: nnz in convariance of a sparse matrix
    ... >> to find the eigenvectors of the covariance matrix, ... I am trying to find eigenvectors of the covariance matrix. ... Note that the multiplication is fast because I-A is a sparse matrix. ... multiplication is the power method, ...
    (sci.math.num-analysis)
  • Principal Components Analysis
    ... sample on which I have pre and post observations, ... whether I should use the correlation matrix or the covariance matrix. ... When I use the correlation matrix, the 'pre' eigenvectors are ...
    (sci.stat.math)
  • Re: random gaussian cloud
    ... The following is a general solution to the problem the original poster ... diagonalise the covariance matrix. ... the distribution it represents aligns with the Cartesian axes; ... eigenvalues and the eigenvectors ...
    (sci.stat.math)

Loading