From 8f0a207866e9de4cc8886c04016ef1b2c56f300e Mon Sep 17 00:00:00 2001 From: Olivier Debeir Date: Thu, 4 Oct 2012 18:02:54 +0200 Subject: [PATCH] add demo all (cont.) --- skimage/rank/tests/demo_all.py | 43 ++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/skimage/rank/tests/demo_all.py b/skimage/rank/tests/demo_all.py index a509db33..d005d61a 100644 --- a/skimage/rank/tests/demo_all.py +++ b/skimage/rank/tests/demo_all.py @@ -44,21 +44,54 @@ if __name__ == '__main__': # plt.colorbar() # plt.title(method) - for n in dir(crank8_percentiles): - method = eval('crank8_percentiles.%s'%n) +# for n in dir(crank8_percentiles): +# method = eval('crank8_percentiles.%s'%n) +# t = type(method) +# if t == type(crank8.maximum): +# print n,t +# f = method(a8,selem = selem,p0=.1,p1=.9) +# +# plt.figure() +# plt.subplot(1,2,1) +# plt.imshow(a8) +# plt.colorbar() +# plt.subplot(1,2,2) +# plt.imshow(f) +# plt.colorbar() +# plt.title(method) + +# for n in dir(crank16_percentiles): +# method = eval('crank16_percentiles.%s'%n) +# t = type(method) +# if t == type(crank8.maximum): +# print n,t +# f = method(a16,selem = selem,bitdepth=12,p0=.1,p1=.9) +# +# plt.figure() +# plt.subplot(1,2,1) +# plt.imshow(a16) +# plt.colorbar() +# plt.subplot(1,2,2) +# plt.imshow(f) +# plt.colorbar() +# plt.title(method) + + selem = disk(50) + for n in dir(crank16_bilateral): + method = eval('crank16_bilateral.%s'%n) t = type(method) if t == type(crank8.maximum): print n,t - f = method(a8,selem = selem,p0=.1,p1=.9) + f = method(a16,selem = selem,bitdepth=12,s0=300,s1=300) plt.figure() plt.subplot(1,2,1) - plt.imshow(a8) + plt.imshow(a16) plt.colorbar() plt.subplot(1,2,2) plt.imshow(f) plt.colorbar() plt.title(method) - # + # plt.show()