palette_extract | R Documentation |
Extract the color palette of an image This function performs color palette extraction of an image using the mean shift algorithm. It uses the meanShift function in the meanShiftR package.
palette_extract(im, bandwidth = 0.03, bound = 40, iterations = 1000)
im |
an image |
bandwidth |
This value is used in the kernel density estimate for color classification. The smaller the value of this parameter, the more colors are extracted. |
bound |
Input image is resized before color classification. The input image will be reduced in size, with the shorter side equal to this value. |
iterations |
The number of iterations to perform mean shift classification. |
palette = palette_extract(regatta) palette$df plot(palette$im)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.