Finding blob centers with keypoints or centroids?

the keypoint positions are already calculated using moments, no reason to do it again.

and the exception is ?

please also be aware, that you only can calculate the moments of a single contour