Description Usage Arguments Value Examples
Get projection on kmeans for colors of image.
1 | colors_kmeans(im, kmeans)
|
im |
An image object of package Magick. |
kmeans |
An object of class kcca of package flexclust. |
A matrix of colors (in hex format, e.g. "#ffffff").
1 2 3 4 5 6 7 | im0 <- magick::image_read("https://goo.gl/nRQi5n")
im <- magick::image_resize(im0, "100")
kmeans <- kmeans_colors(im, 5)
im_small <- magick::image_resize(im0, "30")
plot(im_small)
table(colors <- colors_kmeans(im_small, kmeans))
plot_color_matrix(colors)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.