From b5966dd267f8696edb9ef20e705ff15968416a11 Mon Sep 17 00:00:00 2001 From: Mgosi Date: Thu, 8 Nov 2018 20:21:54 -0500 Subject: [PATCH 1/2] Update README.md --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index be17100..4fa22bf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ # Color-Ouantization -Coloring an image with 'K' Colors using K-Means Coloring +Coloring an image with 'K' Colors using K-Means Coloring. Here we implement K-Means Clustering by using only basic Numpy operations and opencv.imread() to perform Color Quantization on an Image. -Here we implement K-Means Clustering by using only basic Numpy operations and opencv.imread() to perform Color Quantization on an Image. +##Color Quantization Definition : + It refers to reducing the number of colors used to represent an image. We color the image in 'k' number of colors by using K-Means Clustering. + +##Flow of Code : +1. Take an input image with the desired number of colors (k) and add the threshold of when to stop updating. +2. Randomly initialize the centers of the Clusters. +3. Calculating distance of each point w.r.t each Centroid and Classifing the Points to the corresponding Centroid. +4. Store all points in terms of the Centroid to which they are assigned. +5. Recompute the Mean of each Centroid +6. Paint the image with the Mu value of each Cluster to the corresponding pixel value. From a628e671fb0e30b336b6f397e1c29c643877bc4b Mon Sep 17 00:00:00 2001 From: Mgosi Date: Thu, 8 Nov 2018 20:23:45 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4fa22bf..bf46f87 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Color-Ouantization Coloring an image with 'K' Colors using K-Means Coloring. Here we implement K-Means Clustering by using only basic Numpy operations and opencv.imread() to perform Color Quantization on an Image. -##Color Quantization Definition : +## Color Quantization Definition : It refers to reducing the number of colors used to represent an image. We color the image in 'k' number of colors by using K-Means Clustering. -##Flow of Code : +## Flow of Code : 1. Take an input image with the desired number of colors (k) and add the threshold of when to stop updating. 2. Randomly initialize the centers of the Clusters. 3. Calculating distance of each point w.r.t each Centroid and Classifing the Points to the corresponding Centroid.