graph based image segmentation thesis