Automated Image Color Correction Script

Natural History Museum, Tring - UK


This custom color-correction Python script adjusts image RGB values in a systematic way that minimizes differences between images taken using different set-ups or lighting conditions. This correction allows for accurate reproduction of colors within a Euclidean distance of 0.08 (mean error plus 2 sigma) of their true RGB values, even when using different camera setups.

See manuscript for details: Quantitative photography for rapid, reliable measurement of marine macro‐plastic pollution – Razzell Hollis – Methods in Ecology and Evolution – Wiley Online Library

This color correction script is accompanied by an image database intended for the analysis of physical and colorimetric properties of plastic litter consumed by fledgling seabird.
Marine Plastic Pollution Ingested by Flesh-Footed Shearwaters – Data – Data Portal (

Example image of camera setup from publication:

Details are in the caption following the image