This project implements the K-means clustering algorithm to segment an image based on its pixel colors.
- Read Image: Load an image from a file.
- K-means Clustering: Cluster the image pixels into K clusters.
- Output Image: Generate a new image with pixels replaced by their cluster centroids.