From b02b2b16cd0f9c72a8955671c3bcbb5afbe703ab Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Thu, 28 Jul 2016 09:29:24 +1000 Subject: [PATCH] Clarify that pepper noise can be signed --- skimage/util/noise.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skimage/util/noise.py b/skimage/util/noise.py index b6156a1c..6db8183e 100644 --- a/skimage/util/noise.py +++ b/skimage/util/noise.py @@ -21,8 +21,11 @@ def random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs): local variance at each point of `image` - 'poisson' Poisson-distributed noise generated from the data. - 'salt' Replaces random pixels with 1. - - 'pepper' Replaces random pixels with 0. - - 's&p' Replaces random pixels with 0 or 1. + - 'pepper' Replaces random pixels with 0 (for unsigned images) or + -1 (for signed images). + - 's&p' Replaces random pixels with either 1 or `low_val`, where + `low_val` is 0 for unsigned images or -1 for signed + images. - 'speckle' Multiplicative noise using out = image + n*image, where n is uniform noise with specified mean & variance. seed : int