.. _example_plot_join_segmentations.py:


==========================================
Find the intersection of two segmentations
==========================================

When segmenting an image, you may want to combine multiple alternative
segmentations. The `skimage.segmentation.join_segmentations` function
computes the join of two segmentations, in which a pixel is placed in
the same segment if and only if it is in the same segment in _both_
segmentations.


.. image:: images/plot_join_segmentations_1.png
    :align: center


.. literalinclude:: plot_join_segmentations.py
    :lines: 13-



**Python source code:** :download:`download <plot_join_segmentations.py>`
(generated using ``skimage`` |version|)



**IPython Notebook:** :download:`download <./notebook/plot_join_segmentations.ipynb>`
(generated using ``skimage`` |version|)

