

.. _sphx_glr_auto_examples_numpy_operations:

Operations on NumPy arrays
--------------------------



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This script illustrates how to use basic NumPy operations, such as slicing, masking and fancy indexing, in order to modify the pixel values of an image.">

.. only:: html

  .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_camera_numpy_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_numpy_operations_plot_camera_numpy.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Using simple NumPy operations for manipulating images</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use functions in :pyskimage.morphology to generate footprints (structuring elements) for use in morphology operations. The title of each plot indicates the call of the function.">

.. only:: html

  .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_structuring_elements_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_numpy_operations_plot_structuring_elements.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Generate footprints (structuring elements)</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example illustrates the use of view_as_blocks from :pyskimage.util.  Block views can be incredibly useful when one wants to perform local operations on non-overlapping image patches.">

.. only:: html

  .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_view_as_blocks_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_numpy_operations_plot_view_as_blocks.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Block views on images/arrays</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Many footprints (structuring elements) can be decomposed into an equivalent series of smaller structuring elements. The term &quot;flat&quot; refers to footprints that only contain values of 0 or 1 (i.e., all methods in skimage.morphology.footprints). Binary dilation operations have an associative and distributive property that often allows decomposition into an equivalent series of smaller footprints. Most often this is done to provide a performance benefit.">

.. only:: html

  .. image:: /auto_examples/numpy_operations/images/thumb/sphx_glr_plot_footprint_decompositions_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_numpy_operations_plot_footprint_decompositions.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Decompose flat footprints (structuring elements)</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/numpy_operations/plot_camera_numpy
   /auto_examples/numpy_operations/plot_structuring_elements
   /auto_examples/numpy_operations/plot_view_as_blocks
   /auto_examples/numpy_operations/plot_footprint_decompositions

