See my attached demo for find the central spatial moments, if that's what you want.
KSSV's solution gives you the radiometric stats, not spatial stats. For example, the first moment (mean) for intensity will give you the mean gray level whereas for spatial it will give you the location of the centroid. Spatial moments can also give you things like moment of inertia, etc. Not sure which moments you want.