Colour pattern variation provides biological information in fields ranging from disease ecology to speciation dynamics. Comparing colour pattern geometries across images requires colour segmentation, where pixels in an image are assigned to one of a set of colour classes shared by all images. Manual methods for colour segmentation are slow and subjective, while automated methods can struggle with high technical variation in aggregate image sets. We present recolorize, an R package toolbox for human-subjective colour segmentation with functions for batch-processing low-variation image sets and additional tools for handling images from diverse (high-variation) sources. The package also includes export options for a variety of formats and colour analysis packages. This paper illustrates recolorize for three example datasets, including high variation, batch processing and combining with reflectance spectra, and demonstrates the downstream use of methods that rely on this output.
Keywords: R; colour; colour pattern; image segmentation; software; trait analysis.
© 2024 The Authors. Ecology Letters published by John Wiley & Sons Ltd.