image_pal {RImagePalette} | R Documentation |
Image palette
Description
Image palette function
Usage
image_pal(image, choice = mean, volume = FALSE)
Arguments
image |
Matrix The image from which the palette will be extracted from. Should
be a 3 (or more) dimensional matrix. The output of a function such as |
choice |
Function Defines how the color will be chosen from the final color cubes.
The default choice is to take the |
volume |
Logical volume controls the method for choosing which color cube to split
at each iteration of the algorithm. The default choice (when |
Examples
img <- jpeg::readJPEG(system.file("img", "Rlogo.jpg", package="jpeg"))
display_image(img)
scales::show_col(image_pal(img)(10))