Segmentation by clustering