Skip to content

A C++ implementation of the winner-takes-all clustering algorithm to approximate the optimal subset of colors found in the image which can be used to reduce its color set.

Notifications You must be signed in to change notification settings

ahnilica/Image-Color-Reducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image-Color-Reducer

A C++ implementation of the winner-takes-all clustering algorithm to approximate the optimal subset of colors found in the image which can be used to reduce its color set. Running with 32 clusters will result in a new image that looks similar to the old image, but only has 32 colors present in it. It uses a matrix library, which has been included.

Results

original Image:

Original

64 Colors:

64

32 Colors:

32

16 Colors:

16

8 Colors:

8

4 Colors:

4

2 Colors:

2

    Usage: NumberOfClusters learningRate filename

note a good learning rate value is small, such as 0.01

About

A C++ implementation of the winner-takes-all clustering algorithm to approximate the optimal subset of colors found in the image which can be used to reduce its color set.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published