.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "advanced/image_processing/auto_examples/plot_blur.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_advanced_image_processing_auto_examples_plot_blur.py: Blurring of images =================== An example showing various processes that blur an image. .. GENERATED FROM PYTHON SOURCE LINES 7-31 .. image-sg:: /advanced/image_processing/auto_examples/images/sphx_glr_plot_blur_001.png :alt: plot blur :srcset: /advanced/image_processing/auto_examples/images/sphx_glr_plot_blur_001.png :class: sphx-glr-single-img .. code-block:: default import scipy as sp import matplotlib.pyplot as plt face = sp.datasets.face(gray=True) blurred_face = sp.ndimage.gaussian_filter(face, sigma=3) very_blurred = sp.ndimage.gaussian_filter(face, sigma=5) local_mean = sp.ndimage.uniform_filter(face, size=11) plt.figure(figsize=(9, 3)) plt.subplot(131) plt.imshow(blurred_face, cmap=plt.cm.gray) plt.axis('off') plt.subplot(132) plt.imshow(very_blurred, cmap=plt.cm.gray) plt.axis('off') plt.subplot(133) plt.imshow(local_mean, cmap=plt.cm.gray) plt.axis('off') plt.subplots_adjust(wspace=0, hspace=0., top=0.99, bottom=0.01, left=0.01, right=0.99) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.323 seconds) .. _sphx_glr_download_advanced_image_processing_auto_examples_plot_blur.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_blur.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_blur.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_