Quantitative color profiling of images in a comparative framework using the R package colordistance

Department of Ecology and Evolutionary Biology, Brown University, Providence, Rhode Island, United States
Department of Organismal Biology and Anatomy, University of Chicago, Chicago, Illinois, United States
DOI
10.7287/peerj.preprints.26487v1
Subject Areas
Biodiversity, Evolutionary Studies, Statistics
Keywords
R packages, color, mimicry, image processing, phylogenetics, camouflage, earth mover's distance, statistics
Copyright
© 2018 Weller et al.
Licence
This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Preprints) and either DOI or URL of the article must be cited.
Cite this article
Weller H, Westneat M. 2018. Quantitative color profiling of images in a comparative framework using the R package colordistance. PeerJ Preprints 6:e26487v1

Abstract

Color is a central aspect of biology, with important impacts on ecology and evolution. Organismal color may be adaptive or incidental, seasonal or permanent, species- or population-specific, or modified for breeding, defense or camouflage. Thus, measuring and comparing color among organisms provides important biological insights. However, color comparison is limited by color categorization methods, with few universal tools available for quantitative color profiling and comparison. We present a package of R tools for processing images of organisms (or other objects) in order to quantify color profiles, gather color trait data, and compare color palettes in a reproducible way. The package treats image pixels as 3D coordinates in “color space", producing a multidimensional color histogram for each image. Pairwise distances between histograms are computed using earth mover's distance or a combination of more conventional distance metrics. The user sets parameters for generating color histograms, and comparative color profile analysis is performed through pairwise comparisons to produce a color distance matrix for a set of images. The toolkit provided in the colordistance R package can be used for analyses involving quantitative color variation in organisms with statistical testing. We illustrate the use of colordistance with three biological examples: hybrid coloration in butterflyfishes; mimicry in wing coloration in Heliconius butterflies; and analysis of background matching in camouflaging flounder fish. The tools presented for quantitative color analysis may be applied to a broad range of questions in biology and other disciplines.

Author Comment

This is a submission to PeerJ for review.