Package: colordistance 1.1.2

colordistance: Distance Metrics for Image Color Similarity

Loads and displays images, selectively masks specified background colors, bins pixels by color using either data-dependent or automatically generated color bins, quantitatively measures color similarity among images using one of several distance metrics for comparing pixel color clusters, and clusters images by object color similarity. Uses CIELAB, RGB, or HSV color spaces. Originally written for use with organism coloration (reef fish color diversity, butterfly mimicry, etc), but easily applicable for any image set.

Authors:Hannah Weller [aut, cre]

colordistance_1.1.2.tar.gz
colordistance_1.1.2.zip(r-4.7)colordistance_1.1.2.zip(r-4.6)colordistance_1.1.2.zip(r-4.5)
colordistance_1.1.2.tgz(r-4.6-any)colordistance_1.1.2.tgz(r-4.5-any)
colordistance_1.1.2.tar.gz(r-4.7-any)colordistance_1.1.2.tar.gz(r-4.6-any)
colordistance_1.1.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
colordistance/json (API)

# Install 'colordistance' in R:
install.packages('colordistance', repos = c('https://hiweller.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hiweller/colordistance/issues

On CRAN:

Conda:

8.05 score 41 stars 2 packages 92 scripts 363 downloads 2 mentions 23 exports 87 dependencies

Last updated from:e602b243c5. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64NOTE214
source / vignettesOK274
linux-release-x86_64NOTE215
macos-release-arm64NOTE105
macos-oldrel-arm64NOTE82
windows-develNOTE102
windows-releaseNOTE93
windows-oldrelNOTE98
wasm-releaseOK149

Exports:combineClusterscombineListconvertColorSpaceexportTreeextractClustersgetColorDistanceMatrixgetHistListgetImageHistgetImagePathsgetKMeanColorsgetKMeansListgetLabHistgetLabHistListheatmapColorDistanceimageClusterPipelineloadImageplotClustersplotClustersMultiplotHistplotImageplotPixelsremoveBackgroundscatter3dclusters

Dependencies:abindapeaskpassbase64encbitopsbslibcachemcaToolscliclueclustercpp11crosstalkcurldata.tabledeldirdigestdplyremdistevaluatefarverfastmapfontawesomefsgenericsggplot2gluegplotsgtablegtoolshighrhtmltoolshtmlwidgetshttrisobandjpegjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelazyevallifecyclemagrittrMatrixmemoisemgcvmimenlmeopensslotelpillarpkgconfigplotlypngpolyclippromisespurrrR6rappdirsRColorBrewerRcpprlangrmarkdownS7sassscalesscatterplot3dspatstat.dataspatstat.geomspatstat.univarspatstat.utilsstringistringrsystibbletidyrtidyselecttinytexutf8vctrsviridisLitewithrxfunyaml

Color Distance Metrics
Introduction | Earth Mover's Distance | $\chi^{2}$ Distance | Color Distance | Weighted Pairs Distance | Choosing a distance metric | Cheatsheet

Last update: 2020-11-13
Started: 2017-05-16

Color Spaces
Introduction | Color spaces in colordistance | RGB | HSV | CIELAB | Why does the choice of color space matter? | Choosing a color space for analysis | Scientific merit | Type of comparison | Ease-of-use | Further reading

Last update: 2020-11-13
Started: 2018-06-25

Introduction
Acquiring and prepping images | Loading the images into R | Binning the pixels | Comparing color histograms | Visualizing results | Exporting data | Shortcut | References

Last update: 2020-10-26
Started: 2017-05-17

Pixel Binning Methods
Introduction | Why binning? | Note: any valid filepath will work; this line is specific to | example data that comes with the package | Histogram method | K-means method | Choosing a binning method & parameters | Cheatsheet

Last update: 2020-10-26
Started: 2017-05-16

CIELab Analyses
Choosing a reference white | Converting from RGB to CIELab | Clustering in CIELab space | Distance matrices

Last update: 2018-06-25
Started: 2018-06-25

Readme and manuals

Help Manual

Help pageTopics
Chi-square distance between vectorschisqDistance
Sum of Euclidean distances between color clusterscolorDistance
Average 3D color histograms by subdirectorycombineClusters
Combine a list of cluster features into a single cluster setcombineList
Convert between color spacesconvertColorSpace
Earth mover's distance between two sets of color clustersEMDistance
Export a distance matrix as a tree objectexportTree
Extract cluster values and sizes from kmeans fit objectsextractClusters
Distance matrix for a list of color cluster setsgetColorDistanceMatrix
Vector of hex colors for histogram bin colorationgetHistColors
Generate a list of cluster sets for multiple imagesgetHistList
Generate a 3D histogram based on color distribution in an imagegetImageHist
Fetch paths to all valid images in a given directorygetImagePaths
Fit pixels to clusters using KMeans clusteringgetKMeanColors
Get KMeans clusters for every image in a setgetKMeansList
Generate a 3D histogram based on CIE Lab color coordinates in an imagegetLabHist
Generate a list of cluster sets in CIE Lab color spacegetLabHistList
Plot a heatmap of a distance matrixheatmapColorDistance
Generate and plot a color distance matrix from a set of imagesimageClusterPipeline
Import image and generate filtered 2D pixel array(s)loadImage
Normalize pixel RGB ratiosnormalizeRGB
Order color clusters to minimize overall color distance between pairsorderClusters
Pause and wait for user inputpause
Plot clusters in 3D color spaceplotClusters
Plot several different cluster sets togetherplotClustersMulti
Color histogram of binned imageplotHist
Display an image in a plot windowplotImage
Plot pixels in color spaceplotPixels
Remove background pixels in imageremoveBackground
Plot 3D clusters in a 2D plotscatter3dclusters
Distance between color clusters with user-specified color/size weightsweightedPairsDistance