Gaussian Smoothing an image in python Gaussian Smoothing an image in python numpy numpy

Gaussian Smoothing an image in python


Something like this perhaps?

import numpy as npimport scipy.ndimage as ndimageimport matplotlib.pyplot as pltimg = ndimage.imread('galaxies.png')plt.imshow(img, interpolation='nearest')plt.show()# Note the 0 sigma for the last axis, we don't wan't to blurr the color planes together!img = ndimage.gaussian_filter(img, sigma=(5, 5, 0), order=0)plt.imshow(img, interpolation='nearest')plt.show()

enter image description hereenter image description here

(Original image taken from here)