Image Segmentation Algorithm using clustering
This script compute image segmentation using KMeans algorithm for clustering: once a cluster of pixels is computed, each pixel in cluster receives the color belonging to the centroid. To run the script type on terminal:
- python clustering.py <imagepath> <number of cluster>
This script require:
- Python 2.7.9;
- NumPy library;
- Matplotlib library;
- PIL Image library for Python;
- Scikit-learn library for Machine Learning in Python.