COLOR ANALYSIS IN PAPER-BASED SENSING WITH IMAGE PROCESSING AND MACHINE LEARNING ANALYSIS FOR PREDICTING CHEMICAL PROPERTIES IN LIQUID SAMPLE

Authors

  • Muhammad Allam Daffa Alhaqi Department of Mechanical Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand.
  • Bernadetha Grace Wisdayanti Department of Mechanical Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand.
  • Chatchawan Chaichana Department of Mechanical Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand.
  • Napassawan Wongmongkol Department of Mechanical Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand.
  • Zulfa Hana Maulida Department of Mechanical Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand.
  • Santi Phithakkitnukoon Department of Computer Engineering, Faculty of Engineering, Chiang Mai University, Chiang Mai 50200 Thailand

DOI:

https://doi.org/10.11113/aej.v16.25356

Keywords:

Colorimetric analysis, Image processing, Machine learning, Paper-based sensing, Regression analysis

Abstract

Monitoring chemical properties in liquid samples, such as pH, glucose, and protein concentration, is essential in applications ranging from environmental water analysis to early-stage healthcare diagnostics. Multi-parameter test strips offer a commonly used and straightforward method for assessing these parameters in liquid samples, particularly in urine analysis. However, observer-dependent variability was noted in the interpretation of color changes, indicating potential bias among different evaluators. This study proposes a low-cost and accessible sensing method by integrating paper-based colorimetric sensing with image processing and supervised machine learning models to enhance the assessment using reagent test strips. Paper test strips were used as the medium for capturing chemical reactions., with color changes recorded using a PhotoBox equipped with a microcomputer and a Raspberry Pi camera. Extracted color features, such as Red (R), Green (G), Blue (B), Grayscale, Hue (H), Saturation (S), and Value (V) were used as inputs for predictive models, including Random Forest Regressor (RFR), Support Vector Regression (SVR), Gradient Boosting Regressor (GBR), Linear Regression (LR), K-Nearest Neighbors (KNN), and Multi-Layer Perceptron Neural Network (MLP-NN). Experimental results demonstrate that the proposed approach can accurately predict target values with strong predictive performance, achieving R² scores exceeding 0.90 in several models. Outlier handling and hyperparameter optimization were also conducted to improve prediction performance. These results suggest that this accessible and portable approach has significant potential for precise, scalable chemical assessment of multiple parameters (pH, glucose, and protein content) in liquid samples, supporting reliable monitoring in both environmental and healthcare-related applications.

References

Li M, Yue T, Han J, Wang J, Xiao H, Shang F. 2024. Exogenous glucose irrigation alleviates cold stress by regulating soluble sugars, ABA and photosynthesis in melon seedlings. Plant Physiology and Biochemistry. 217: 109214. DOI: 10.1016/j.plaphy.2024.109214

[2] Boussakouran A, El Yamani M, Sakar EH, Rharrabti Y. 2024. Trend in yield and protein content relationship in a historical series of durum wheat varieties under rainfed and irrigated environments. Crop and Environment. 3(3): 171–176. DOI: 10.1016/j.crope.2024.05.001

[3] Jiang J, Zhang X, Wen G, Zhu M, Zheng Y. 2024. Purification Resistance Index: A new water quality assessment method toward drinking water production. Water Research. 267:122555. DOI: 10.1016/j.watres.2024.122555

[4] Meng R, Yu Z, Fu Q, Fan Y, Fu L, Ding Z, Yang S, Cao Z, Jia L. 2024. Smartphone-based colorimetric detection platform using color correction algorithms to reduce external interference. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy. 316:124350. DOI: 10.1016/j.saa.2024.124350

[5] Gauthama BU, Narayana B, Sarojini BK, Bello K, Suresh NK. 2020. Nitrate/Nitrite determination in water and soil samples accompanied by in situ azo dye formation and its removal by superabsorbent cellulose hydrogel. SN Applied Sciences 2(7): 1225. DOI: 10.1007/s42452-020-3016-5

[6] Shariati-Rad M, Heidari S. 2020. Classification and determination of total hardness of water using silver nanoparticles. Talanta. 219:121297. DOI: 10.1016/j.talanta.2020.121297

[7] Afsahi A, Ahmadi-hamedani M, Khodadi M. 2020. Comparative evaluation of urinary dipstick and pH-meter for cattle urine pH measurement. Heliyon. 6(2): e03316. DOI: 10.1016/j.heliyon.2020.e03316

[8] Tian Y, Sun L, Bai H, Lu X, Fu Z, Lv G, Zhang L, Li S. 2024. Quantitative detection of crude protein in brown rice by near-infrared spectroscopy based on hybrid feature selection. Chemometrics and Intelligent Laboratory Systems. 247: 105093. DOI: 10.1016/j.chemolab.2024.105093

[9] Attia H, Mahnashi Y, Qaid A, Mohamed NE, Qureshi KK. 2024. Near-infrared spectroscopy for glucose detection in aqueous solution. Results in Optics. 16: 100738. DOI: 10.1016/j.rio.2024.100738

[10] Rostom NG, Shalaby AA, Issa YM, Afifi AA. 2017. Evaluation of Mariut Lake water quality using Hyperspectral Remote Sensing and laboratory works. The Egyptian Journal of Remote Sensing and Space Science. 20: S39–S48. DOI:10.1016/j.ejrs.2016.11.002

[11] Mercan ÖB, Kılıç V, Şen M. 2021. Machine learning-based colorimetric determination of glucose in artificial saliva with different reagents using a smartphone coupled μ PAD. Sensors and Actuators B Chemical 329: 129037. DOI: 10.1016/j.snb.2020.129037

[12] Syahputra WNH, Chaichana C, Manggala B, Wongwilai W. 2023. The Use of Neural Network Coupled with Image Processing for Water Quality Assessment (Location: Hot Spring Mae-Khachan, Thailand). International Energy Journal. 23(1): 47–54.

[13] Pohanka M, Zakova J. 2024. Urine Test Strip Quantitative Assay with a Smartphone Camera.Ahmed M, editor. International Journal of Analytical Chemistry 2024:1–8. DOI: 10.1155/2024/6004970

[14] Putra BTW, Wirayuda HC, Syahputra WNH, Prastowo E. 2022. Evaluating in-situ maize chlorophyll content using an external optical sensing system coupled with conventional statistics and deep neural networks. Measurement. 189: 110482. DOI: 10.1016/j.measurement.2021.110482

[15] Balbach S, Jiang N, Moreddu R, Dong X, Kurz W, Wang C, Dong J, Yin Y, Butt H, Brischwein M, et al. 2021. Smartphone-based colorimetric detection system for portable health tracking. Analytical Methods. 13(38):4361–4369. DOI:10.1039/D1AY01209F

[16] Hema D, Kannan DrS. 2019. Interactive Color Image Segmentation using HSV Color Space. Science & Technology Journal. 7(1): 37–41. DOI: 10.22232/stj.2019.07.01.05

[17] Jayaraman P, Nagarajan KK, Partheeban P, Krishnamurthy V. 2024. Critical review on water quality analysis using IoT and machine learning models. International Journal of Information Management Data Insights. 4(1):100210. DOI: 10.1016/j.jjimei.2023.100210

[18] Kotsiopoulos T, Sarigiannidis P, Ioannidis D, Tzovaras D. 2021. Machine Learning and Deep Learning in smart manufacturing: The Smart Grid paradigm. Computer Science Review 40:100341. DOI: 10.1016/j.cosrev.2020.100341

[19] Otchere DA, Ganat TOA, Ojero JO, Tackie-Otoo BN, Taki MY. 2022. Application of gradient boosting regression model for the evaluation of feature selection techniques in improving reservoir characterisation predictions. Journal of Petroleum Science and Engineering 208: 109244. DOI: 10.1016/j.petrol.2021.109244

[20] Cobb JS, Seale MA, Janorkar A V. 2021. Evaluation of machine learning algorithms to predict the hydrodynamic radii and transition temperatures of chemo-biologically synthesized copolymers. Computers in Biology and Medicine 128: 104134. DOI: 10.1016/j.compbiomed.2020.104134

[21] Belyadi H, Haghighat A. 2021. Supervised learning. In: Machine Learning Guide for Oil and Gas Using Python. [place unknown]: Elsevier; p. 169–295. DOI:10.1016/B978-0-12-821929-4.00004-4

[22] Ngadi MO, Liu L. 2010. Hyperspectral Imaging for Food Quality Analysis and Control. [place unknown]: Elsevier. DOI:10.1016/C2009-0-01853-4

[23] Jafarbiglu H, Pourreza A. 2022. A comprehensive review of remote sensing platforms, sensors, and applications in nut crops. Computers and Electronics in Agriculture 197: 106844. DOI: 10.1016/j.compag.2022.106844

[24] Kim S, Cho Y. 2022. Predictive System Implementation to Improve the Accuracy of Urine Self-Diagnosis with Smartphones : Application of a Confusion Matrix-Based Learning Model through RGB Semiquantitative Analysis.

[25] Kim HJ, Ph D, Kim M, Ph D, Zhang H, Kim HR, Ph D, Jeon JW, Ph D, Seo Y, et al. 2025. Artificial Intelligence in Diagnostics : Enhancing Urine Test Accuracy Using a Mobile Phone – Based Reading System. :178–184

Downloads

Published

2026-08-31

Issue

Section

Articles