# What does “Mean of each pixel over all images” mean?

I was reading a paper related to Auto encoders for my project work. It is required to input images as vectors to the neural network. I couldn't understand a certain sentence due to lack of knowledge of statistics (I guess). I Googled, but the problem is I don't know what it is exactly and searching the same phrase returns the same kind of documents but not their explanation.

We train on 1.6 million 32*32 color images that have been preprocessed by subtracting from each pixel its mean value over all images and then dividing by the standard deviation of all pixels over all images.

What does it mean by "subtracting from each pixel its mean value over all images and then dividing by the standard deviation of all pixels over all images".

My interpretation is: "Subtracting from each pixel its mean value over all images" It means, for a pixel position in an image, subtract the average of values of that pixel position over all images and subtract from the current pixel value.

Am I correct?

It is somewhat ambiguous to me.

Please explain in some math terms.

• @NickCox I've added the link. In first senetence it asked us to subtract mean of each pixel overall images but standard deviation is on over all pixels and all images, so, in SD formula which mean should I use is it mean of that pixel position or mean of all pixels of all images? More importantly, should I take means and sds differently for r,g,b domains or combine rgb as one value and calculate this. – pinkpanther Oct 12 '13 at 11:54
• @NickCox Thank you very much!, if possible consider adding an answer. More importantly, should I take means and sds differently for r,g,b domains or combine rgb as one value and calculate this?. In general what is preferred? – pinkpanther Oct 12 '13 at 12:03
• Glad that helped, but now this is a morphing into a quite different new question in image processing, and (1) you should pose that in a new thread (2) it's not clear to me that it is essentially a statistical question that belongs here (3) sorry, but I am not experienced enough in that field to advise you. – Nick Cox Oct 12 '13 at 12:07
• @NickCox I mean if you don't mind please add answer to this thread question so that I can mark as accepted. I don't need an answer for the question in the comment. Sorry if I'm troubling you. – pinkpanther Oct 12 '13 at 12:11
• OK; I combined my earlier comments into an answer (and deleted the corresponding comments). – Nick Cox Oct 12 '13 at 12:16

Each image is composed of 32 $\times$ 32 pixels, so for a given pixel (say row 13, column 31) something measured is averaged over all the images, and the standard deviation (SD for short) for the same something is also calculated.