recolorize: An R package for flexible colour segmentation of biological images

Ecol Lett. 2024 Feb;27(2):e14378. doi: 10.1111/ele.14378.

Abstract

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.

MeSH terms

  • Algorithms*
  • Color
  • Humans
  • Image Processing, Computer-Assisted* / methods