diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py index 6426d755..ff21b686 100644 --- a/skimage/exposure/exposure.py +++ b/skimage/exposure/exposure.py @@ -44,14 +44,14 @@ def histogram(image, nbins=256): bin_centers : array The values at the center of the bins. - See also + See Also -------- cumulative_distribution Examples -------- - >>> from skimage import data, exposure, util - >>> image = util.img_as_float(data.camera()) + >>> from skimage import data, exposure + >>> image = skimage.img_as_float(data.camera()) >>> np.histogram(image, bins=2) (array([107432, 154712]), array([ 0. , 0.5, 1. ])) >>> exposure.histogram(image, nbins=2) @@ -106,7 +106,7 @@ def cumulative_distribution(image, nbins=256): bin_centers : array Centers of bins. - See also + See Also -------- histogram @@ -116,8 +116,8 @@ def cumulative_distribution(image, nbins=256): Examples -------- - >>> from skimage import data, exposure, util - >>> image = util.img_as_float(data.camera()) + >>> from skimage import data, exposure + >>> image = skimage.img_as_float(data.camera()) >>> hi = exposure.histogram(image) >>> cdf = exposure.cumulative_distribution(image) >>> np.alltrue(cdf[0] == np.cumsum(hi[0])/float(image.size)) @@ -241,7 +241,7 @@ def rescale_intensity(image, in_range='image', out_range='dtype'): Image array after rescaling its intensity. This image is the same dtype as the input image. - See also + See Also -------- intensity_range, equalize_hist @@ -335,7 +335,7 @@ def adjust_gamma(image, gamma=1, gain=1): out : ndarray Gamma corrected output image. - See also + See Also -------- adjust_log @@ -353,12 +353,12 @@ def adjust_gamma(image, gamma=1, gain=1): Examples -------- - >>> from skimage import data, exposure, util - >>> image = util.img_as_float(data.moon()) + >>> from skimage import data, exposure + >>> image = skimage.img_as_float(data.moon()) >>> gamma_corrected = exposure.adjust_gamma(image, 2) >>> # Output is darker for gamma > 1 - >>> image.mean(), gamma_corrected.mean() - (0.43988067028574979, 0.19622774786391453) + >>> image.mean() > gamma_corrected.mean() + True """ _assert_non_negative(image) dtype = image.dtype.type @@ -394,7 +394,7 @@ def adjust_log(image, gain=1, inv=False): out : ndarray Logarithm corrected output image. - See also + See Also -------- adjust_gamma @@ -441,7 +441,7 @@ def adjust_sigmoid(image, cutoff=0.5, gain=10, inv=False): out : ndarray Sigmoid corrected output image. - See also + See Also -------- adjust_gamma