Clustering and optimization based image segmentation techniques