scikit-image/scikit-image — pull request #653 by iNand (2013-07-13 08:03:25+00:00)
Title: Added comment + isotropic denoising 

'''
Short test of plausibility:
Result
![lena_test](https://f.cloud.github.com/assets/416808/792382/8cf038ec-eb92-11e2-8794-09b20f180b36.png)
'''

import numpy as np
import matplotlib.pyplot as plt
from skimage import data, color, img_as_float
from skimage.filter import denoise_tv_bregman

lena = img_as_float(data.lena())
lena = lena[220:300, 220:320]
noisy = lena + 0.6 * lena.std() * np.random.random(lena.shape)
noisy = np.clip(noisy, 0, 1)

fig, ax = plt.subplots(nrows=2, ncols=3, figsize=(8, 5))
plt.gray()

ax[0, 0].imshow(noisy)
ax[0, 0].axis('off')
ax[0, 0].set_title('noisy')

ax[0, 1].imshow(denoise_tv_bregman(lena, weight=0.05, anisotropic=True))
ax[0, 1].axis('off')
ax[0, 1].set_title('TV Anistopic')

ax[0, 2].imshow(denoise_tv_bregman(lena, weight=0.05))
ax[0, 2].axis('off')
ax[0, 2].set_title('TV Isotropical')