mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 05:08:02 +08:00
Fix return value of deprecated equalize function.
This commit is contained in:
@@ -19,7 +19,6 @@ that fall within the 2nd and 98th percentiles [2]_.
|
||||
"""
|
||||
|
||||
from skimage import data, img_as_float
|
||||
from skimage.util.dtype import dtype_range
|
||||
from skimage import exposure
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
@@ -57,7 +57,7 @@ img = data.moon()
|
||||
# Contrast stretching
|
||||
p2 = np.percentile(img, 2)
|
||||
p98 = np.percentile(img, 98)
|
||||
img_rescale = exposure.equalize(img)
|
||||
img_rescale = exposure.equalize_hist(img)
|
||||
|
||||
# Equalization
|
||||
selem = disk(30)
|
||||
|
||||
@@ -81,7 +81,7 @@ def cumulative_distribution(image, nbins=256):
|
||||
|
||||
@deprecated('equalize_hist')
|
||||
def equalize(image, nbins=256):
|
||||
equalize_hist(image, nbins)
|
||||
return equalize_hist(image, nbins)
|
||||
|
||||
|
||||
def equalize_hist(image, nbins=256):
|
||||
|
||||
Reference in New Issue
Block a user