-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/allengu01/image_palette
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# k-Means Visualizer | ||
This program uses the k-means clustering algorithm to determine k colors that are representative of a provided image. The visualization for the algorithm is made from 3D scatter plots of pixel values with Matplotlib. | ||
|
||
## What is k-means clustering? | ||
K-means clustering is an unsupervised machine learning algorithm that finds k clusters within a given dataset. The algorithm begins by defining k centroids, around which each cluster will be created. A cluster of a centroid is defined as all members of the dataset (in this case, pixels RGB values) which are closest to that given centroid. Next, when all members of the data set are assigned to the closest centroid, the algorithm moves each centroid to the mean of the cluster. The algorithm continues to iterate by creating clusters and updating the centroids until no centroids move during an iteration. | ||
|
||
## Examples | ||
<p align="center"> | ||
<img width="400" align="center" src="images/minimalist_landscape1.jpg"> | ||
<img width="500" align="center" src="examples/rotate_animation.gif"> | ||
<img align="center" src="examples/iterate_animation.gif"> | ||
|
||
</p> |