Python, Machine Learning, Artificial Intelligence, Data Science, Data Analytics.
gauss_denoised=ndimage.gaussian_filter(noisy,2) To preserve the edges, we use a median filter: >>> median_denoised=ndimage.median_filter(noisy,3) Image Processing with SciPy and NumPy — Denoising For figures with straight boundaries and low curvature, a median filter provides a better result: >>>