Flexible color segmentation of biological images with the R package recolorize

Color is an important source of biological information in fields ranging from disease ecology to sexual selection. Despite its importance, most metrics for color are restricted to point measurements. Methods for moving beyond point measurements rely on color maps, where every pixel in an image is assigned to one of a set of discrete color classes (color segmentation). Manual methods for color segmentation are slow and subjective, while existing automated methods often fail due to biological variation in pattern, technical variation in images, and poor scalability for batch clustering. As a result, color segmentation is the common bottleneck step for a majority of existing downstream analyses. Here we present recolorize, an R package for color segmentation that succeeds in many cases where existing methods fail. Recolorize has three major components: (1) an effective two-part clustering algorithm where color distributions are binned and combined according to perceived similarity in a frequency-independent manner; (2) a toolkit for minor manual adjustments to automatic output where needed; and (3) flexible export options. This paper illustrates how to use recolorize and compares it to existing methods, including examples where we segment formerly intractable images, and demonstrates the downstream use of methods that rely on color maps.

[1]  Talia Y. Moore,et al.  Batch-Mask: An automated Mask R-CNN workflow to isolate non-standard biological specimens for color pattern analysis , 2021, bioRxiv.

[2]  Shawn T. Schwartz,et al.  Sashimi: A toolkit for facilitating high‐throughput organismal image segmentation using deep learning , 2021, Methods in Ecology and Evolution.

[3]  K. Hughes,et al.  Using Delaunay triangulation to sample whole‐specimen color from digital images , 2021, Ecology and evolution.

[4]  C. Cicero,et al.  Plumage balances camouflage and thermoregulation in Horned Larks (Eremophila alpestris) , 2021, bioRxiv.

[5]  Sybill K. Amelon,et al.  COUNTCOLORS, AN R PACKAGE FOR QUANTIFICATION OF THE FLUORESCENCE EMITTED BY PSEUDOGYMNOASCUS DESTRUCTANS LESIONS ON THE WING MEMBRANES OF HIBERNATING BATS , 2020, The Journal of Wildlife Diseases.

[6]  C. Jiggins,et al.  The genomics of coloration provides insights into adaptive evolution , 2020, Nature Reviews Genetics.

[7]  B. Counterman,et al.  Perfect mimicry between Heliconius butterflies is constrained by genetics and development , 2020, bioRxiv.

[8]  Hugo Gruson,et al.  pavo 2.0: new tools for the spectral and spatial analysis of colour in R , 2018, bioRxiv.

[9]  Jolyon Troscianko,et al.  Quantitative Colour Pattern Analysis (QCPA): A Comprehensive Framework for the Analysis of Colour Patterns in Nature , 2019, bioRxiv.

[10]  M. Westneat,et al.  Quantitative color profiling of digital images with earth mover’s distance using the R package colordistance , 2018, PeerJ.

[11]  Peter A. Todd,et al.  pat‐geom: A software package for the analysis of animal patterns , 2019, Methods in Ecology and Evolution.

[12]  J. Endler,et al.  Boundary Strength Analysis: Combining colour pattern geometry and coloured patch visual properties for use in predicting behaviour and fitness , 2018, bioRxiv.

[13]  Humberto Ortiz-Zuazaga,et al.  patternize: An R package for quantifying colour pattern variation , 2017, Methods in ecology and evolution.

[14]  Sönke Johnsen,et al.  AcuityView: An r package for portraying the effects of visual acuity on scenes observed by an animal , 2017 .

[15]  M. Stevens,et al.  Quantifying camouflage: how to predict detectability from appearance , 2017, BMC Evolutionary Biology.

[16]  A. Møller,et al.  Do common cuckoos (Cuculus canorus) possess an optimal laying behaviour to match their own egg phenotype to that of their Oriental reed warbler (Acrocephalus orientalis) hosts , 2016 .

[17]  Martin Stevens,et al.  Image calibration and analysis toolbox – a free software suite for objectively measuring reflectance, colour and pattern , 2015, Methods in ecology and evolution.

[18]  Mark W. Westneat,et al.  StereoMorph: an R package for the collection of 3D landmarks and curves using a stereo camera set‐up , 2015 .

[19]  Bao Zhou Image Segmentation using SLIC Superpixels and Affinity Propagation Clustering , 2015 .

[20]  Anjali Goswami,et al.  Phylogenetic Principal Components Analysis and Geometric Morphometrics , 2013 .

[21]  D. Adams,et al.  geomorph: an r package for the collection and analysis of geometric morphometric shape data , 2013 .

[22]  John A. Endler,et al.  A framework for analysing colour pattern geometry: adjacent colours , 2012 .

[23]  Sönke Johnsen,et al.  The Optics of Life , 2012 .

[24]  C. Klingenberg MorphoJ: an integrated software package for geometric morphometrics , 2011, Molecular ecology resources.

[25]  P. D. Polly,et al.  Geometric morphometrics: recent applications to the study of evolution and development , 2010 .

[26]  F. Rohlf,et al.  Geometric morphometrics: Ten years of progress following the ‘revolution’ , 2004 .

[27]  J. V. Remsen,et al.  High Incidence of "Leapfrog" Pattern of Geographic Variation in Andean Birds: Implications for the Speciation Process , 1984, Science.

[28]  F. Vuilleumier Pleistocene Speciation in Birds living in the High Andes , 1969, Nature.