Mug extraction and segmentation