Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 874 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 874 Bytes

K-Means Algorithm

Implementation of Image segmentation using K-Means algorithm in rust.

Code mostly taken from here

Usage

cargo run --release -- <input_image> <k>

saves the output image as <input_image>_segmented.jpg in the current directory.

Example

cargo run --release -- images/lena.png  5

Input and Output images for different values of k:

Input K = 2 K = 5 K = 10
Me K_2 K_5 K_7