Dependencies
- rand [0.8.5]
- image [0.24.5]
About
The code features a simple implementation of a naive kmeans algorithm applied to processing of images.
Running the main function will cluster the colours of a provided image of the png format and save a version with only k-colours.
Example
The process applied to a picture would look like this for a set of values for k:
Original image
Original | k=2 |
---|---|
k=3 | k=5 |
---|---|
k=7 | k=11 |
---|---|