Source: http://aymeric.histace.free.fr/documents/Segmentation.pdf