mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-12 12:50:49 +08:00
small comparison with denoise_bilateral
This commit is contained in:
@@ -5,6 +5,7 @@ from skimage import data
|
|||||||
from skimage.morphology.selem import disk
|
from skimage.morphology.selem import disk
|
||||||
import skimage.filter.rank as rank
|
import skimage.filter.rank as rank
|
||||||
|
|
||||||
|
from skimage.filter import denoise_bilateral
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
a8 = data.camera()
|
a8 = data.camera()
|
||||||
@@ -15,6 +16,16 @@ if __name__ == '__main__':
|
|||||||
f16= rank.autolevel(a16,selem)
|
f16= rank.autolevel(a16,selem)
|
||||||
f16p= rank.percentile_autolevel(a16,selem,p0=.0,p1=1.)
|
f16p= rank.percentile_autolevel(a16,selem,p0=.0,p1=1.)
|
||||||
|
|
||||||
|
den = denoise_bilateral(a8,win_size=10,sigma_range=10,sigma_spatial=2)[:,:,0]
|
||||||
|
f16b= rank.bilateral_mean(a8.astype(np.uint16),disk(10),s0=10,s1=10)
|
||||||
|
|
||||||
|
plt.figure()
|
||||||
|
plt.subplot(1,2,1)
|
||||||
|
plt.imshow(den)
|
||||||
|
plt.subplot(1,2,2)
|
||||||
|
plt.imshow(f16b)
|
||||||
|
plt.show()
|
||||||
|
|
||||||
print f16==f16p
|
print f16==f16p
|
||||||
|
|
||||||
plt.figure()
|
plt.figure()
|
||||||
|
|||||||
Reference in New Issue
Block a user