Added moment/centroid detection