- recolorize_obj
A recolorize object from recolorize()
,
recluster()
, or imposeColors()
.
- dist_method
Method passed to stats::dist for calculating distances
between colors. One of "euclidean", "maximum", "manhattan", "canberra",
"binary" or "minkowski".
- hclust_method
Method passed to stats::hclust for clustering colors
by similarity. One of "ward.D", "ward.D2", "single", "complete", "average"
(= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (=
UPGMC).
- channels
Numeric: which color channels to use for clustering. Probably
some combination of 1, 2, and 3, e.g., to consider only luminance and
blue-yellow (b-channel) distance in CIE Lab space, channels = c(1, 3) (L
and b).
- color_space
Color space in which to cluster centers, passed to
[grDevices]{convertColor}
. One of "sRGB", "Lab", or "Luv".
Default is "Lab", a perceptually uniform (for humans) color space.
- ref_white
Reference white for converting to different color spaces.
D65 (the default) corresponds to standard daylight.
- cutoff
Numeric similarity cutoff for grouping color centers
together. The range and value will depend on the chosen color space (see
below), but the default is in absolute Euclidean distance in CIE Lab space,
which means it is greater than 0-100, but cutoff values between 20 and 80
will usually work best. See details.
- n_final
Final number of desired colors; alternative to specifying
a similarity cutoff. Overrides cutoff
if provided.
- plot_hclust
Logical. Plot the hierarchical clustering tree for
color similarity? Helpful for troubleshooting a cutoff.
- refit_method
Method for refitting the image with the new color
centers. One of either "imposeColors" or "mergeLayers". imposeColors()
refits the original image using the new colors (slow but often better
results). mergeLayers()
merges the layers of the existing
recolored image. This is faster since it doesn't require a new fit, but can
produce messier results.
- resid
Logical. Get final color fit residuals with
colorResiduals()
?
- plot_final
Logical. Plot the final color fit?
- color_space_fit
Passed to imposeColors()
. What
color space should the image be reclustered in?