The raw moment M_{ij} (Hu 1962) is calculated byM_{ij} = sum(x^i * y^j * Im[i, j])
where x and y are the pixel coordinates and Im is the (image) matrix. Various useful properties of an image may be gleaned from certain moments. For example, the image area is given by M_{00}, and the image centroid is (M_{10} / M_{00}, M_{01} / M_{00}). The image orientation angle can also be derived.