Anisotropic diffusion 2d images
Here's my Python/numpy implementation of 2D and 3D anisotropic (Perona-Malik) diffusion. It's not quite as fast as C-code, but it did the job nicely for me.
Anisotropic diffusion is available in the medpy
package since 2013
import numpy as np
from medpy.filter.smoothing import anisotropic_diffusion
img = np.random.uniform(size=(32,32))
img_filtered = anisotropic_diffusion(img)