# Centering input data for Robust PCA (RPCA)?

I know that before running Principal component analys, the input data needs to be centered around its mean (subtract the mean from each keypoint) before running the algorithm.

Do I need to center my data before running robust PCA ?

For instance, say I have a video from a static security camera (like in the original work). Do I need to subtract from each pixel (in each frame), its mean value over the duration of the video?

p.s. any other pre-processing required for RPCA?

$$s_{i} = \frac{x_{i}-c_{1}}{\sqrt{c_{2}-c_{1}^{2}}}$$
where $$x_{i}$$ is your raw (not standardized) variable, $$c_{1} = \sum_{i=1}^{N}x_{i}$$ and $$c_{2} = \sum_{i=1}^{N}x_{i}^{2}$$.
That way, $$s_{i}$$ would have mean zero and standard deviation one. You could obviously leave away the standardization (standard deviation one) if you are not interested in that.