The code in this repository allows for the creation of k-colour images, where k is a small number specified by the user, from an image containing many hundreds or thousands of colours. This is done by utilising the k-means algorithm to group the pixel colours used in the original images into k clusters. The colours used in the output image are determined by taking the mean RGB values of each cluster of pixels.
ireb15 / k-colour-images Goto Github PK
View Code? Open in Web Editor NEWThe code in this repository allows for the creation of k-colour images, where k is a small number specified by the user, from an image containing many hundreds or thousands of colours. This is done by utilising the k-means algorithm to group the pixel colours used in the original images into k clusters. The colours used in the output image are determined by taking the mean RGB values of each cluster of pixels.