Quantification of combined color and shade changes in colorimetry and image analysis: water pH measurement as an example†
Color-based analysis has been widely used in many resource-limited situations. However, one of the challenges for this type of application is to quantify the color information, especially when the color changes and shade changes occur together. In this work, pH sensing with paper strips, where both the color and the shade vary with changing pH and are easily influenced by ambient illumination, was used as an example to develop a color quantification method based on image analysis. The images were obtained by photographing the pH strips in aqueous solution. The color information was then extracted from the images, and its relationship with pH was explored in both red, green, blue (RGB) and hue, saturation, value (HSV) color spaces. It was found that the hue of the HSV space has a good correlation with the pH, despite changes in both the shade and the color of the sensing strips. The color of the sensing strips was then quantified by transforming the color to hue and a reverse model to predict the pH of water was established. It was found that the R2 of the model is 0.952 and the root mean square error (RMSE) is 0.219, better than the visual interpretation precision of pH strips (0.5). Finally, the applicability of the model under different lighting conditions was discussed. Thus, color quantization with both color and shade changes has been achieved with high accuracy. We believe that this could find wide application in various point-of-use devices where both color and shade changes are encountered, such as in outdoor scenarios.