https://github.com/piyushsuthar/k-means-algo
Implementation of Image segmentation using K-Means algorithm in rust.
https://github.com/piyushsuthar/k-means-algo
image-processing kmeans-algorithm kmeans-clustering
Last synced: about 2 months ago
JSON representation
Implementation of Image segmentation using K-Means algorithm in rust.
- Host: GitHub
- URL: https://github.com/piyushsuthar/k-means-algo
- Owner: PiyushSuthar
- Created: 2023-07-15T11:24:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-15T12:19:14.000Z (almost 2 years ago)
- Last Synced: 2025-01-12T01:17:17.297Z (3 months ago)
- Topics: image-processing, kmeans-algorithm, kmeans-clustering
- Language: Rust
- Homepage:
- Size: 2.99 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# K-Means Algorithm
Implementation of Image segmentation using K-Means algorithm in rust.
> Code mostly taken from [here](https://applied-math-coding.medium.com/data-science-implementing-k-means-in-rust-457e4af55ece)
## Usage
```bash
cargo run --release --
```saves the output image as `_segmented.jpg` in the current directory.
## Example
```bash
cargo run --release -- images/lena.png 5
```_Input_ and _Output_ images for different values of `k`:
| Input | K = 2 | K = 5 | K = 10 |
| ------------------------ | ------------------------ | ------------------------ | ------------------------- |
|  |  |  |  |