Components for image segmentation