diff --git a/doc/examples/plot_watershed.py b/doc/examples/plot_watershed.py index a1cd18cf..9fce196f 100644 --- a/doc/examples/plot_watershed.py +++ b/doc/examples/plot_watershed.py @@ -26,7 +26,7 @@ See Wikipedia_ for more details on the algorithm. """ import numpy as np -from scipy import ndimage +e import matplotlib.pyplot as plt from skimage.morphology import watershed, is_local_maximum diff --git a/skimage/rank/tests/test_morph_contr_enh.py b/skimage/rank/tests/test_morph_contr_enh.py new file mode 100644 index 00000000..812e81c5 --- /dev/null +++ b/skimage/rank/tests/test_morph_contr_enh.py @@ -0,0 +1,28 @@ +import numpy as np +import matplotlib.pyplot as plt +import gdal + +from skimage.morphology import disk +import skimage.rank as rank + +filename = 'iko_pan_Ja1.tif' +im16 = gdal.Open(filename).ReadAsArray().astype(np.uint16) + +plt.figure() +plt.imshow(im16,cmap=plt.cm.gray) +plt.colorbar() + +f0 = rank.median(im16,disk(1)) +f1 = rank.bilateral_mean(im16,disk(20),s0=200,s1=200) +f2 = rank.equalize(f1,disk(10)) +f3 = rank.bottomhat(f1,disk(1)) + +plt.figure() +plt.imshow(f2,cmap=plt.cm.gray,interpolation='nearest') +plt.colorbar() + +plt.show() + + + +