Segmentation of a given image on the basis of the dominant colors present in it So in this first we determine the dominant colors present in the image using the K-means Clustering algorithm and then we determine the cluster closer to each point and the point is assigned the same color as that of the cluster