Smartphone Camera-Based Prediction of Water pH Using Multispectral Image Simulation and Machine Learning Models
Author : M Allam Daffa Alhaqi, Bernadetha Grace Wisdayanti Wahyu Nurkholis Hadi Syahputra, Chatchawan Chaichana, Nappasawan Womongkol, Suwimon Wicharuck
Abstract :This study presents an evaluation of several model for predicting water pH using smartphone cameras with different resolutions (13 MP and 48 MP). The prediction models were used from numerical data extracted from images processed to simulate multispectral properties. Water samples were prepared by adjusting tap water pH using a 5% nitric acid (HNO3) and 10% potassium hydroxide (KOH), covering a range of pH values 4 - 8. Each sample was captured using both 13 MP and 48 MP smartphone cameras, and digital filtering over the visible spectrum (380-780 nm) was applied through image processing. From these images, the value of Red, Green, Blue, and Grayscale values were extracted, along with derived metrics as well as luminance, hue, saturation, and coloration index. These features were used as inputs for machine learning models to predict pH value. Among the algorithms tested, the Decision Tree (DT) model achieved the highest prediction accuracy, outperforming Random Forest (RF) and Multi-Layer Perceptron Neural Network (MLP-NN), while 48 MP camera outperforming 13 MP camera. These findings show the feasibility of predicting water pH from smartphone-captured images processed to simulate multispectral characteristics. Further work with an expanded dataset may enhance the model's accuracy and precision.
Keywords :Digital image processing, Multispectral simulation, Machine learning, Model development, pH Prediction.
Conference Name :International Conference on Engineering and Natural Science (ICENASCI-25)
Conference Place Singapore, Singapore
Conference Date 8th Jan 2025