Tests pass and example works on build.

This commit is contained in:
Steven Silvester
2012-12-07 17:22:40 -06:00
parent c6d0acfdab
commit 9eeb990898
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
from .exposure import histogram, equalize, cumulative_distribution
from .exposure import histogram, equalize, cumulative_distribution, adapthist
from .exposure import rescale_intensity
+2
View File
@@ -5,6 +5,7 @@ import skimage
from skimage import data
from skimage import exposure
from skimage.color import rgb2gray
from skimage.util.dtype import dtype_range
# Test histogram equalization
@@ -94,6 +95,7 @@ def test_adapthist_float():
img = skimage.img_as_float(data.lena())
adapted = exposure.adapthist(img, nx=10, ny=9, clip_limit=0.01,
nbins=128, out_range='original')
assert_almost_equal = np.testing.assert_almost_equal
assert_almost_equal(adapted.min() , img.min())
assert_almost_equal(adapted.min(), img.min())
assert img.shape == adapted.shape