will compute the centroid of the given grid, which is a weighted average, namely, the average position weighted by the pixel values. obsolete. please use [#moment] instead. (y x) y x