combineList {colordistance}R Documentation

Combine a list of cluster features into a single cluster set

Description

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

Usage

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

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")


[Package colordistance version 1.1.2 Index]