palette_extract: Extract the color palette of an image This function performs...

View source: R/pictplot.R

palette_extractR 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.

Description

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.

Usage

palette_extract(im, bandwidth = 0.03, bound = 40, iterations = 1000)

Arguments

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.

Examples

palette = palette_extract(regatta)
palette$df
plot(palette$im)

tsuda16k/pictplot documentation built on March 1, 2023, 8:44 p.m.