Image Segmentation Using Graph Theory