Description Usage Arguments Value Note Examples
View source: R/02c_kmeans_color_clustering.R
Extract a list of dataframes with the same format as those returned by
getHistList
, where each dataframe has 3 color attributes (R, G,
B or H, S, V) and a size attribute (Pct) for every cluster.
1 | extractClusters(getKMeansListObject, ordering = TRUE, normalize = FALSE)
|
getKMeansListObject |
A list of |
ordering |
Logical. Should clusters by reordered by color similarity? If
|
normalize |
Logical. Should each cluster be normalized to show R:G:B or
H:S:V ratios rather than absolute values? Can be helpful for inconsistent
lighting, but reduces variation. See |
A list of dataframes (same length as input list), each with 4 columns: R, G, B (or H, S, V) and Pct (cluster size), with one row per cluster.
Names are inherited from the list passed to the function.
1 2 3 4 | clusterList <- colordistance::getKMeansList(system.file("extdata",
"Heliconius/Heliconius_A", package="colordistance"), bins=3)
colordistance::extractClusters(clusterList)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.