From 575689baf2d813d8dad75c94f940a65512d59c23 Mon Sep 17 00:00:00 2001 From: Joel Frederico Date: Thu, 14 May 2015 17:15:00 -0700 Subject: [PATCH] Update measure.regionprops.weighted_moments_central doc The documentation is misleading. In fact, the code does do what a user would expect: use the weighted centroid coordinates, not the centroid coordinates. It's one word, but it's an important one! https://github.com/scikit-image/scikit-image/blob/master/skimage/measure/_regionprops.py#L291 --- skimage/measure/_regionprops.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skimage/measure/_regionprops.py b/skimage/measure/_regionprops.py index 20e7e590..b671e009 100644 --- a/skimage/measure/_regionprops.py +++ b/skimage/measure/_regionprops.py @@ -445,7 +445,8 @@ def regionprops(label_image, intensity_image=None, cache=True): wmu_ji = sum{ array(x, y) * (x - x_c)^j * (y - y_c)^i } where the sum is over the `x`, `y` coordinates of the region, - and `x_c` and `y_c` are the coordinates of the region's centroid. + and `x_c` and `y_c` are the coordinates of the region's weighted + centroid. **weighted_moments_hu** : tuple Hu moments (translation, scale and rotation invariant) of intensity image.