Back to search

Nanyang Technological University

Intelligent anthocyanin colorimetric sensing for freshness monitoring

Abstract

dc:description.abstract

Due to its high water content, loose tissue structure and susceptibility to microbial contamination, tofu is prone to quality deterioration during storage and circulation. Therefore, achieving rapid, accurate, and visual evaluation of tofu freshness is of great significance for ensuring food safety and meeting terminal consumer demands. This paper focuses on the color response characteristics of anthocyanins to pH changes, and constructs a visual discrimination framework for tofu freshness based on anthocyanin pH regression. Furthermore, a quantitative identification and visualization platform for consumers is designed. This paper conducts multi-dimensional feature engineering based on color representation information, extracting statistical features in multiple color spaces such as RGB, HSV, Lab, grayscale and color ratios. At the same time, correlation analysis and redundant feature elimination are carried out to reduce the impact of multicollinearity on model stability. On this basis, six machine learning models, including Support Vector Regression (SVR), K-Nearest Neighbor Regression (KNN), Random Forest Regression (RF), and Extra Light Gradient Boosting Machine (LightGBM), are used to establish pH regression models. Grid Search and K-fold Cross Validation are combined to systematically optimize the model hyperparameters, thereby enhancing the model’s generalization ability and prediction accuracy. The results show that all six models can achieve quantitative prediction of pH values from anthocyanin color images, with LightGBM having the best overall performance, followed by Extra Trees. In contrast, the SVR model performs relatively weakly. This indicates that models based on boosting trees and ensemble trees are more suitable for handling the nonlinear mapping relationship between anthocyanin image color features and pH values. Further, a tofu freshness interval mapping method is constructed, which discretely maps the continuous pH prediction results into fresh, sub-fresh and spoiled grades, thereby achieving an interpretable transformation from anthocyanin color response to tofu quality status. A UI visualization platform for consumers is designed to uniformly display the predicted pH values by anthocyanins and the tofu freshness grades, providing a low-cost and intuitive method reference for intelligent tofu packaging and terminal consumption judgment. In conclusion, the anthocyanin pH regression-based tofu freshness mapping method shows good application potential in tofu quality discrimination. The research results not only verify the effectiveness of multi-color space feature engineering and ensemble learning models in anthocyanin color perception tasks, but also provide a theoretical basis and technical reference for the integration of natural color-sensitive materials with machine vision and machine learning methods in food quality monitoring.

Degree

thesis:*
College dc:contributor.school
School of Electrical and Electronic Engineering
Grantor dc:publisher
Nanyang Technological University
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Xiao, Yuxin
Advisor dc:contributor.supervisor
  • Y. C. Chen

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10356/216893

Chain of custody

source
Harvested from
Nanyang Technological University
Base URL
dr.ntu.edu.sg/oai/request
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
related terms
citation

Xiao, Yuxin. Intelligent anthocyanin colorimetric sensing for freshness monitoring. Nanyang Technological University, 2026. https://hdl.handle.net/10356/216893