Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-backports > by-pkgid > e578866d55cd81fdb23827cdf3cec911 > files > 506

python-scikits-learn-0.6-1mdv2010.2.i586.rpm



.. _example_cluster_plot_lena_segmentation.py:


=========================================
Segmenting the picture of Lena in regions
=========================================

This example uses spectral clustering on a graph created from
voxel-to-voxel difference on an image to break this image into multiple
partly-homogenous regions.

This procedure (spectral clustering on an image) is an efficient
approximate solution for finding normalized graph cuts.


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

**Python source code:** :download:`plot_lena_segmentation.py <plot_lena_segmentation.py>`

.. literalinclude:: plot_lena_segmentation.py
    :lines: 13-