I believe that you will want to process each channel separately over all of the images. Otherwise a mean and variance will have very little meaning. And if you convert to grayscale before training, then the network can only retrieve grayscale images, which doesn't seem to match with what the paper describes.
I've trouble distinguishing between "from each pixel its mean value over all images" and "standard deviation of all pixels over all images".
This processing will requires two passes:
On The first pass, you will compute the mean pixel values of each channel, and the variance over the entire set of pixels in a channel. When you are finished, you should have 3075 values: one mean value per pixel per channel (32*32*3=3072), and one variance per channel (3).
On the second pass you will modify the images by taking the subtracting from each pixel the mean you found in the first pass, and dividing by the standard deviation from the first pass.
Let $\mu_r,i,j$ be the mean value of the red channel at the $i,j$-th pixel, and let $\sigma_r^2$ be the variance of the red channel over all pixels in all images. Then the new value corresponding to the red channel of the $i,j$-th pixel in the $k$-th image $r_{i,j,k}$ becomes
$$ \tilde{r}_{i,j,k} = \left(r_{i,j,k} - \mu_{r,i,j}\right)/\sqrt{\sigma_r^2}$$
Where
$$\mu_{r,i,j} = \frac{1}{K}\sum_k r_{i,j,k}$$
$$\sigma_r^2 = \frac{1}{IJK-1}\sum_{i,j,k} r_{i,j,k}^2 - \frac{1}{IJK-1}\sum_{i,j,k} r_{i,j,k}$$
This is my interpretation of the paper. However, since the focus of the paper is on autoencoders and deep belief networks, the image preprocessing step is only mentioned in passing. Like most academic papers, it gives enough details for the reader to understand what was done without necessarily giving enough details to reproduce the result without lots of reading between the lines.
Good luck to you!