

.. _sphx_glr_auto_examples_edges:

Edges and lines
---------------



.. raw:: html

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

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="We use a marching squares method to find constant valued contours in an image. In skimage.measure.find_contours, array values are linearly interpolated to provide better precision of the output contours. Contours which intersect the image edge are open; all others are closed.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_contours_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_contours.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Contour finding</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The convex hull of a binary image is the set of pixels included in the smallest convex polygon that surround all white pixels in the input.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_convex_hull_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_convex_hull.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Convex Hull</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Canny filter is a multi-stage edge detector. It uses a filter based on the derivative of a Gaussian in order to compute the intensity of the gradients.The Gaussian reduces the effect of noise present in the image. Then, potential edges are thinned down to 1-pixel curves by removing non-maximum pixels of the gradient magnitude. Finally, edge pixels are kept or removed using hysteresis thresholding on the gradient magnitude.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_canny_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_canny.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Canny edge detector</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Marching cubes is an algorithm to extract a 2D surface mesh from a 3D volume. This can be conceptualized as a 3D generalization of isolines on topographical or weather maps. It works by iterating across the volume, looking for regions which cross the level of interest. If such regions are found, triangulations are generated and added to an output mesh. The final result is a set of vertices and a set of triangular faces.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_marching_cubes_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_marching_cubes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Marching Cubes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The active contour model is a method to fit open or closed splines to lines or edges in an image [1]_. It works by minimising an energy that is in part defined by the image and part by the spline&#x27;s shape: length and smoothness. The minimization is done implicitly in the shape energy and explicitly in the image energy.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_active_contours_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_active_contours.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Active Contour Model</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Ridge filters can be used to detect ridge-like structures, such as neurites [1]_, tubes [2]_, vessels [3]_, wrinkles [4]_ or rivers.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_ridge_filter_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_ridge_filter.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Ridge operators</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to draw several different shapes:">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_shapes_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_shapes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Shapes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Example of generating random shapes with particular properties.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_random_shapes_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_random_shapes.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Random Shapes</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to approximate (Douglas-Peucker algorithm) and subdivide (B-Splines) polygonal chains.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_polygon_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_polygon.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Approximate and subdivide polygons</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Hough transform in its simplest form is a method to detect straight lines [1]_.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_line_hough_transform_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_line_hough_transform.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Straight line Hough transform</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The Hough transform in its simplest form is a method to detect straight lines but it can also be used to detect circles or ellipses. The algorithm assumes that the edge is detected and it is robust against noise or missing points.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_circular_elliptical_hough_transform_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_circular_elliptical_hough_transform.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Circular and Elliptical Hough Transforms</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Skeletonization reduces binary objects to 1 pixel wide representations. This can be useful for feature extraction, and/or representing an object&#x27;s topology.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_skeleton_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_skeleton.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Skeletonize</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function.">

.. only:: html

  .. image:: /auto_examples/edges/images/thumb/sphx_glr_plot_edge_filter_thumb.png
    :alt:

  :ref:`sphx_glr_auto_examples_edges_plot_edge_filter.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Edge operators</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /auto_examples/edges/plot_contours
   /auto_examples/edges/plot_convex_hull
   /auto_examples/edges/plot_canny
   /auto_examples/edges/plot_marching_cubes
   /auto_examples/edges/plot_active_contours
   /auto_examples/edges/plot_ridge_filter
   /auto_examples/edges/plot_shapes
   /auto_examples/edges/plot_random_shapes
   /auto_examples/edges/plot_polygon
   /auto_examples/edges/plot_line_hough_transform
   /auto_examples/edges/plot_circular_elliptical_hough_transform
   /auto_examples/edges/plot_skeleton
   /auto_examples/edges/plot_edge_filter

