This project is about seperating colours in an image into larger groups. Colour segmentation is useful because grouping the colours into larger chunks of colours makes it a lot simpler and easier to analyze. The chunks of colour are better at representing the RGB values rather than tiny pixels.
- Choose a number of clusters.
- Choose a some points to be centroids.
- Assign all points to the nearest centroid.
- Calculate new centroid locations based on clusters.
Clustering result changes each iteration because the centroids are being recalculated every time. You should stop the algorithm when the error graph is at its lowest. The error is how different your image is to the original.