I am trying to enhance the contrast in the images I get after scanning a surface using Thermography (Principal Component Thermography ~Rajic, which is basically an application of Principal Component Analysis) to see the defects clearly.
I have some 20 images and all having 180*180 pixels. I am following a paper in which they first put each image in a column and it forms a matrix of 32400*20 as shown in the figure below.
But before applying PCA you have to standardize the matrix and they are doing it according to these equations.
I have two Questions here;
In PCA, do we have to always center rows (i.e. subtract mean from each row) or we have to actually center our variables(=pixels of an image) which can be along a row or column depending how we put our sample (=images) in the matrix A. Or it depends on what we are actually trying to do? It means in some cases.
And the standard deviation equation mentioned here, isn't it wrong (I think we should be subtracting mean of row not column here? Also I have the same question that does the standard deviation should be along row or column in this case.