Skip to content

K-means algorithm implemented in java to reduce the size of an image

Notifications You must be signed in to change notification settings

ohoadit/image-compressor

Repository files navigation

How to use the algorithm?

Download the code and compile, run the K-means.java file.

Following are the outcomes for different values of K after running the algorithm on different images:

Image: Koala.jpg

Original size: 762.53 KB

Compressed size: 152.5 KB, for K = 20

K = 2 k-2

K = 5 k-5

K = 10 k-10

K = 15 k-15

K = 20 k-20

Image: Penguins.jpg

Original size: 759.60 KB

Compressed size: 117.26 KB, for K = 20

K = 2 p-2

K = 5 p-5

K = 10 p-10

K = 15 p-15

K = 20 p-20

About

K-means algorithm implemented in java to reduce the size of an image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages