An information theoretic framework for image segmentation