GitHunt
AS

asselinpaul/ImageSeg-KMeans

๐Ÿ’  Image Segmentation using K-Means

Image Segmentation using k-means clustering

The program reads in an image, segments it using K-Means clustering and outputs the segmented image.

python imageSegmentation.py K inputImageFilename outputImageFilename

It is worth playing with the number of iterations, low numbers will run quicker.

The result is an over-segmented image. With the correct parameters, it can be used to partition an image for further processing. Here is an example of that: Make3D

Output

Burma
Burma

Duomo
Duoma

tunnel
tunnel

Languages

Python100.0%

Contributors

Created December 21, 2016
Updated January 25, 2026
asselinpaul/ImageSeg-KMeans | GitHunt