Implementation of Image segmentation using K-Means algorithm in rust.
Code mostly taken from here
cargo run --release -- <input_image> <k>saves the output image as <input_image>_segmented.jpg in the current directory.
cargo run --release -- images/lena.png 5Input and Output images for different values of k:
| Input | K = 2 | K = 5 | K = 10 |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |



