diff --git a/skimage/filter/rank/_percentile.py b/skimage/filter/rank/_percentile.py index b87ef5b2..f8ace8a4 100644 --- a/skimage/filter/rank/_percentile.py +++ b/skimage/filter/rank/_percentile.py @@ -323,7 +323,8 @@ def sum_percentile(image, selem, out=None, mask=None, shift_x=False, Only greyvalues between percentiles [p0, p1] are considered in the filter. - Note that the result is truncated to 8 or 16 bit. + Note that the sum may overflow depending on the data type of the input + array. Parameters ---------- diff --git a/skimage/filter/rank/bilateral.py b/skimage/filter/rank/bilateral.py index 4f36e628..d01680db 100644 --- a/skimage/filter/rank/bilateral.py +++ b/skimage/filter/rank/bilateral.py @@ -174,6 +174,9 @@ def sum_bilateral(image, selem, out=None, mask=None, shift_x=False, Only pixels belonging to the structuring element AND having a greylevel inside this interval are summed. + Note that the sum may overflow depending on the data type of the input + array. + Parameters ---------- image : 2-D array (uint8, uint16) diff --git a/skimage/filter/rank/generic.py b/skimage/filter/rank/generic.py index d46c7436..ccc1166e 100644 --- a/skimage/filter/rank/generic.py +++ b/skimage/filter/rank/generic.py @@ -578,6 +578,9 @@ def pop(image, selem, out=None, mask=None, shift_x=False, shift_y=False): def sum(image, selem, out=None, mask=None, shift_x=False, shift_y=False): """Return the local sum of pixels. + Note that the sum may overflow depending on the data type of the input + array. + Parameters ---------- image : 2-D array (uint8, uint16)