combineList: Combine a list of cluster features into a single cluster set

Description Usage Arguments Note Examples

View source: R/03_cluster_averaging.R

Description

Combine a list of cluster features as returned by getHistList according to the specified method.

Usage

1
combineList(hist_list, method = "mean")

Arguments

hist_list

A list of cluster dataframes as returned by getHistList.

method

Method for combining color histograms. Default is "mean", but other generic functions ("median", "sum", etc) will work. String is evaluated using "eval" so any appropriate R function is accepted.

Note

While the function can also accept clusters generated using kmeans (getKMeansList followed by extractClusters), this is not recommended, as kmeans does not provide explicit analogous pairs of clusters, and clusters are combined by row number (all row 1 clusters are treated as analogous, etc). Color histograms are appropriate because the bins are defined the same way for each image.

Examples

1
2
3
hist_list <- getHistList(system.file("extdata", "Heliconius/Heliconius_A",
package="colordistance"), lower=rep(0.8, 3), upper=rep(1, 3))
median_clusters <- combineList(hist_list, method="median")

colordistance documentation built on March 21, 2021, 1:06 a.m.