Images as occlusions of textures: a framework for segmentation