kmeans_colors | R Documentation |
Perform K-means on RGB colors
kmeans_colors(im, ncolors = 8)
im |
An image object of package magick. |
ncolors |
Number of colors (clusters). Default is 8. |
An object of class kcca of package flexclust.
im0 <- magick::image_read("https://goo.gl/nRQi5n")
im <- magick::image_resize(im0, "100")
kmeans <- kmeans_colors(im)
kmeans@centers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.