Model-Based Segmentation of Images