Color QR Codes for Smartphone-Based Analysis of Free Chlorine in Drinking Water
María González-Gómez, Ismael Benito-Altamirano, Hanna Lizarzaburu-Aguilar, David Martínez-Carpena, Joan Daniel Prades, Cristian Fàbrega

TL;DR
This paper introduces color QR codes for measuring free chlorine in drinking water using smartphones, making it easier for on-site testing.
Contribution
The novel use of color QR codes to embed colorimetric references for accurate smartphone-based chlorine testing.
Findings
Color QR codes achieved 88.10% accuracy for BTB strip measurements.
DPD powder measurements reached 84.62% accuracy using the same method.
Abstract
Free chlorine (FC) plays a crucial role in ensuring the safety of drinking water by effectively inactivating pathogenic microorganisms. However, traditional methods for measuring FC levels often require specialized equipment and laboratory settings, limiting their accessibility and practicality for on-site or point-of-use monitoring. QR Codes are powerful machine-readable patterns that are used worldwide to encode information (i.e., URLs or IDs), but their computer vision features allow QR Codes to act as carriers of other features for several applications. Often, this capability is used for aesthetics, e.g., embedding a logo in the QR Code. In this work, we propose using our technique to build back-compatible Color QR Codes, which can embed dozens of colorimetric references, to assist in the color correction to readout sensors. Specifically, we target two well-known products in the…
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12- —Agència per la Competitivitat de l’Empresa
- —MCIN (Spain)
- —Alexander von Humboldt Professorship of the Humboldt Foundation and the Federal Ministry for Education and Re-search (Germany)
- —zukunft.niedersachsen program of the Lower Saxony Ministry for Science and Culture and the Volkswagen Foundation
- —ERC
- —EIC
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBiosensors and Analytical Detection · QR Code Applications and Technologies · Advanced Chemical Sensor Technologies
1. Introduction
Ensuring food safety remains a critical global challenge, particularly in the context of water quality monitoring and sanitation. The European Union has established one of the most comprehensive food safety systems worldwide, featuring regulations and guidelines designed to shield consumers from potential hazards [1]. Despite these substantial endeavors, significant challenges remain in ensuring food safety across the complex supply chain. A primary issue lies in the deficiency of efficient verification and traceability systems, which hinders the monitoring and enforcement of compliance with safety standards. Furthermore, numerous food safety control methods rely on human interpretation, which is susceptible to errors and inconsistencies [2].
In response to this, the digitization of self-monitoring processes has emerged as a promising strategy to bolster the reliability and robustness of food safety plans. By harnessing the capabilities of technology, it becomes feasible to develop tools capable of objectively measuring and recording data, ensuring traceability while minimizing human error. Smartphone-based methods are becoming increasingly popular in the field of self-monitoring for food safety, as mobile devices are now equipped with digital cameras that can serve as optical readers for colorimetric sensors [3,4]. However, the practical deployment of such technologies to read out colorimetric sensors often still depends on the commercialization of additional hardware to house the colorimetric sensors. Even the most compact optical readers occupy additional space and cannot easily be embedded into products [5,6].
To overcome the limitations of current approaches, we propose a smartphone-based solution that combines image analysis with custom-designed Color QR Codes to digitize and interpret free chlorine (FC) tests, as QR Codes are easy to read machine-readable patterns [7], that can be recovered in adversarial scenarios [8,9,10]. This method is embedded in a user-friendly mobile application tailored to support routine self-monitoring in food safety workflows. Our system focuses on two widely used FC detection methods in drinking water: a test strip based on bromothymol blue (BTB), which offers a simple and rapid visual indication of chlorine concentration, and a cuvette-based assay using N,N-diethyl-p-phenylenediamine (DPD), a reference technique in water analysis used due to its high sensitivity and regulatory acceptance [11]. By adapting both tests to a digital format, we enable fast, accurate, and traceable chlorine measurements without the need for specialized instrumentation.
For both digitization pipelines we used a similar approach. At the core of both methods is the use of custom-designed Color QR Codes, which serve as both geometric references and color constancy charts [7]. Additionally, color correction was performed using the embedded references in a Color QR Code, as a simple white balance correction was insufficient for accurate colorimetric readout. To address this, we applied thin plate spline transformations. This approach outperforms simple white-balancing, which is often insufficient for accurately measuring the response of colorimetric dyes [12,13]. Finally, a machine learning framework was used to fit the response data from the colorimetric space to the FC expected response [14].
The performance of both systems was rigorously evaluated under various conditions, including different lighting, mobile devices, and image capture settings. The results demonstrate the potential of these systems to revolutionize water quality monitoring by providing accessible and user-friendly tools for rapid and accurate FC determination.
2. Material and Methods
2.1. Free Chlorine Sample Preparation and Reagent Methods
Free chlorine (FC) solutions ranging from 0.1 to 8.4 ppm were prepared using a stepwise dilution of sodium hypochlorite (NaClO, 37% w/w). A 100 ppm stock solution was first obtained by adding 0.57 mL of sodium hypochlorite to 1 L of distilled water. From this stock, a 10 ppm intermediate solution was prepared by diluting 10 mL of the 100 ppm solution into 100 mL of distilled water. Subsequent dilutions were performed in 200 mL volumetric flasks to obtain the desired final concentrations. All solutions were thoroughly mixed and stored in opaque containers to minimize photodegradation.
Concentrations in the low range (0–2.2 ppm) were verified using a DR300 Pocket Colorimeter (Hach Company, Loveland, CO, USA). The Hach DR300 colorimeter used has a reported LOD of 0.02 ppm, as specified by the manufacturer. Measurements below this threshold were not considered reliable and were excluded from quantitative analysis. For samples exceeding the instrument’s upper limit (2.2 ppm), dilution was carried out prior to measurement, ensuring all readings remained within the calibrated range of the device. The associated uncertainty for direct measurements was ±0.02 ppm, and for diluted samples, error propagation was applied according to standard dilution procedures to obtain the final concentration value.
Regarding commercially available reagents to digitize, we targeted two different reagent methods that evaluated different ways to prepare samples and obtain a FC measurement:
- BTB strip: We used the Free Chlorine Water Check test from Sensafe^®^ (Industrial Test Systems, Inc., Rock Hill, SC, USA), an assay approved by United States Environmental Protection Agency. This method is designed for testing 50 mL water samples. The procedure involves immersing a single test strip into the 50 mL water sample for 20 s while maintaining continuous back-and-forth motion. The immersion time is adjusted based on the sample temperature, as indicated in the manufacturer’s datasheet. After removal, the strip is gently shaken to eliminate excess liquid, followed by a 20-s wait period before evaluating the color change. The strip employs bromothymol blue (BTB) as a pH-sensitive dye, which exhibits a blue coloration in the presence of free chlorine.
- DPD powder: We employed a mixture of reagents commercially known as Permachem Reagents, which contain diethyl-p-phenylenediamine (DPD) dye (Hach^®^, Loveland, CO, USA). The reagent is supplied in single-dose powder packets designed to be mixed with 10 mL of the water sample. The liquid sample was held in custom-designed cuvettes specifically fabricated for this study. In the presence of free chlorine, the DPD reagent reacts to produce a pink coloration, enabling colorimetric quantification.
The DPD powder method required the use of a cuvette to hold liquid samples for colorimetric analysis. It is important to note that the perceived color of a translucent liquid depends not only on the depth of the liquid but also on how light is confined within the cuvette. To minimize color distortion during image acquisition, a custom cuvette was designed and fabricated in our laboratory. Several prototypes with varying shapes and internal dimensions were created using 3D printing, employing white polylactic acid (PLA) filament. The prototypes were printed using an Ultimaker 5 3D printer (Ultimaker, Utrecht, The Netherlands) (see Figure 1). The final design (far right in Figure 1), was selected based on its superior performance in minimizing color distortion, plus squared shapes were easy to find using computer vision algorithms, similar to QR Code ones. It features internal dimensions of 1.1 cm (height) × 3.3 cm (length) × 3.3 mm (width), yielding an approximate volume of 10 mL. Finally, once the size of the cuvette was refined in terms of light reflection and color acquisition, the edges of the final cuvette where painted black, which improved the accuracy of automatic cuvette detection within the image processing pipeline.
2.2. Design and Fabrication of Color QR Codes
We created two back-compatible Color QR Codes for the digitization of each free chlorine test (BTB strips and DPD powder); these QR Codes acted as colorimetric charts to color correct the scenes of the acquired images. The QR codes shared encoding properties, such as:
- Data: A URL to the Diesmar website (https://diesmar.com) along with a unique digital identifier that changes with each new QR code generated, i.e., “n87RXv6i3” (http://diesmar.com/#n87RXv6i3, accessed on 18 May 2025).
- Modules: version 3 of the QR Code standard was used, resulting in a 29 × 29 module matrix, which could properly store the data and the colorimetric references.
- Size: The physical size of the QR Codes was approximately 1 in^2^ (2.54 cm × 2.54 cm).
The primary difference between the QR codes is in their respective color palettes:
- BTB Strip QR Code: The color palette was created in the CMYK color space and was based on the suggested palette by Sensafe^®^ brand for the product calibration at different chlorine concentrations (see Figure 2a).
- DPD Powder QR Code: The color palette was created in the RGB color space and is based on the range of colors exhibited by the DPD reagent when reacting with different chlorine concentrations in our laboratory. To create such a palette, a set of concentration within the range (0.1–10 ppm) were tested and captured with 6500 K lighting and captured with Huawei P20 smartphone model (see Figure 2b).
The back-compatible Color QR Codes were developed using standard Python 3 (>3.9) libraries, with the widely used python-qrcode library serving as the foundation. The codes were printed via commercial offset printing on white Sappi Magno Matt 300 g/m^2^ paper with a polypropylene laminate (Sappi Limited, Johannesburg, South Africa). To ensure accurate color reproduction of the embedded color references, ICC FOGRA27 color profiling was applied during the printing process.
2.3. Experimental Setup and Data Acquisition
The series of water samples with known free chlorine concentrations—validated using a Hach colorimeter—were analyzed using both the DPD powder and BTB strip methods. Each sample was imaged within a custom-designed colorimetric setup that incorporated controlled variations in lighting and a standardized reference pattern. To ensure the robustness of the colorimetric models and the reliability of the results, several key factors were carefully considered during dataset construction. In particular, the impact of changing illumination conditions on image capture and color extraction was critically assessed to better emulate real-world scenarios. Furthermore, multiple mobile devices with varying camera specifications were employed to introduce hardware diversity and evaluate the generalizability of the proposed models. As a result, data acquisition was carried out under two distinct conditions: a Fixed Setup, featuring controlled lighting, and a Room Setup, representing standard ambient lighting and more realistic use-case scenarios.
In the Fixed Setup, samples were placed inside a Konseen Professional Photo Light Box (Shaoxing Shangyu Meisen Photography Co., Ltd., Shaoxing, China). To minimize shadows, LED strips were placed around the top of the box to provide uniform illumination from all directions. Variable light conditions were achieved using Phillips Hue Light^®^ LED strip (Signify N.V., Eindhoven, The Netherlands); see Figure 3. Light temperatures ranged from 2500 K to 6500 K in 500 K increments. For image acquisition, a Huawei P20 smartphone (featuring 20 megapixels (MP) Monochrome (f/1.6) + 12 MP RGB (f/1.8)) was mounted on a tripod to ensure consistent framing and focus. In the Room Setup, ambient lighting from the laboratory environment was used to simulate real-world conditions. Images were captured using four different smartphones: Huawei P20, iPhone SE (12 MP, (f/1.8)), Xiaomi Mi A2 (12 MP, (f/1.75) + 20 MP), and Motorola Moto G6 (12 MP (f/1.8) + 5 MP (f/2.2)). To assess the influence of additional lighting, each sample was photographed both with and without flash. Images were taken without fixed positioning, replicating user variability in typical real-life applications.
When available the Open Camera application was used across smartphones, in Android devices. For iPhone the native OS camera application was used; QR Codes were read out as a part of the post-processing pipeline using OpenCV [15]. Subsequent image processing, color analysis, and statistical modeling were carried out using mainly a Python distribution, with several Python packages such as the PyData NumPy stack [16], OpenCV [15] and scikit-learn [14]. Table 1 and Table 2 summarize all the variables for the Fixed Setup and the Room Setup experiments, respectively.
2.4. Pattern Recognition and Color Correction
The QR Code was used to locate the specific Region of Interest (ROI) in the captured scenes. Locating the barcode helped us to locate the subsequent hardware component, e.g., the strip or the cuvette, for both methods. Later, for each hardware, a method was implemented to obtain the measurement of color. Then color was corrected using the color references embedded in the QR Code. Next, we detail the pipeline in five steps:
- Image acquisition: An image of the QR Code placed adjacent to the reacted test strip or cuvette was captured using the smartphone camera.
- QR Code detection: The QR Code was located by computer vision algorithms to retrieve barcodes from different surfaces [8], then decoded, and the encoded URL and digital identifier were retrieved.
- Color correction: As the ID of the QR Code is known, our algorithm identified the predefined locations of the color patches within the QR Code. Then, it proceeded to register the colors against saved values of those colors (the same colors under the Fixed Setup with 6500 K light and the Huawei P20 smartphone). These pairs of colors, captured and reference, were used to construct an advanced color correction map, based on non-liner color maps using thin-plate splines [12,13].
- ROI extraction: For each of the specific hardware a ROI was extracted,
- BTB strip: a feature matcher, the Haar cascade scheme from OpenCV, was used to retrieve features like the strip ink window.
- DPD powder: a custom feature extractor was used based on a contour detection, plus some simple aspect ratio relations of the square depicted by the cuvette.
- Color measurement of the ROI: The average color value was measured from the captured image. Then, for each image the recovered color correction map was applied [13,17]. RGB measured values were converted to HLS (hue, light, saturation) to feed the different colorimetric models with both the RGB and HSL triplets.
2.5. Colorimetric Model
Following the pattern recognition and color correction process, the extracted color features were utilized to develop predictive models capable of estimating chlorine concentration levels in water. Two independent models were developed for each analytical method: a classification and a regression task. The classification task aimed to resolve whether the free chlorine concentration was in a certain low range specific for each test. The second task, regression, aimed to recover a measurement of the free chlorine concentration in reference to the tagged values from the Hach device.
For the classification task, a support vector machine (SVM) classifier [14] was trained using different colorimetric features for each sensor within their respective dataset. The classification was a 3-class classification task as samples were relabeled as: “low concentration”, “acceptable concentration” and “excess chlorine”. These classes meant something different in each of the datasets; for the BTB strip test:
- Low concentration: ≤0.2 ppm
- Acceptable range: 0.2–0.9 ppm
- Excess chlorine: ≥0.9 ppm
and, for the DPD powder test:
- Low concentration: ≤0.2 ppm
- Acceptable range: 0.2–1.1 ppm
- Excess chlorine: ≥1.1 ppm
following their respective manufacturers’ indications.
For the regression task, the relation between the RGB and HSL features and the free chlorine concentration was assessed, for both sensor tests. For the BTB strip test, one of the colorimetric features was directly used for this. For the DPD powder, a PCA was applied to reduce dimensionality and extract the component capturing the most variance in the feature space. This was then used as a univariate predictor in the regression model.
For both tasks, a train–test split of 80–20% was performed for both datasets; the test–train splits remained the same for each of the tasks within each dataset.
3. Results and Discussion
3.1. BTP Strip Method
A first qualitative result was obtained regarding the computer vision pipeline to capture the samples of the BTP strip test. Our object segmentation pipeline was based upon QR Code detection [8] and training a well-known Haar-cascade scheme worked precisely [15,18]. First, we detected the Color QR Code (see Figure 4a); then, we corrected the image to an intermediate image where the strip was to be expected at the right side of the barcode (see Figure 4b) Subsequently, the matching-pattern algorithm identified the location of the test strip within the image (see Figure 4c) Finally, the image was color-corrected following the previously mentioned spline fitting methods [12]; see Figure 4d. This pipeline was successfully applied to all images in the dataset without any noticeable issues.
Once all the images were preprocessed in such fashion, to identify the most informative color features for chlorine determination, six colorimetric features (red (R), green (G), blue (B), hue (H), saturation (S), and lightness (L) [19]) were extracted from images of test strips exposed to varying chlorine concentrations. Figure 5 illustrates the relationship between these color features and the labeled free chlorine concentration. Clear trends were observed between free chlorine concentration and the R, G, and L features, particularly in the 0–4 ppm range. The R component exhibited an approximately exponential decay, while G and L showed more linear decreases as concentration increased. In contrast, H remained relatively constant, and S showed non-monotonic behavior, peaking around 2–3 ppm.
To classify chlorine concentration into three discrete categories—low (≤0.2 ppm), medium (0.2–0.9 ppm), and high (≥0.9 ppm), as defined by the test strip manufacturer—we trained a support vector machine (SVM) classifier using the six extracted colorimetric features (R, G, B, H, L, and S). Prior to training, the features were normalized to ensure comparability across scales. To visually assess the separability of the data, a principal component analysis (PCA) was performed, reducing the six-dimensional feature space to two components. This transformation preserved over 97.9% of the original variance and revealed a clear clustering structure aligned with the target concentration classes (Figure 6a).
For model development, the dataset was randomly split into training (80%) and validation (20%) subsets, maintaining class balance. Prior to training, the features were auto-scaled using standard normalization (zero mean and unit variance) to ensure comparability across channels and to improve model performance. The resulting SVM model achieved an accuracy of 89% on the training set and 100% on the validation set. The confusion matrix for the validation set (Figure 6b) confirmed perfect agreement between predicted and actual classes, demonstrating the classifier’s capacity to reliably distinguish between the three concentration levels under the controlled conditions of the Fixed Setup dataset.
In parallel, we developed a simple regression model to estimate the chlorine concentration within the medium range (0.2–0.9 ppm). Rather than employing multivariate techniques, we focused on the red channel intensity, which showed the strongest monotonic relationship with concentration in this interval. A univariate model using the natural logarithm of the red channel (ln(R_a_)) yielded high R^2^ values and narrow confidence intervals, offering an interpretable sub-model that complements the classification approach.
Additionally, for samples classified within the medium 0.2–0.9 ppm range, a regression task was performed. A linear regression model was introduced to predict the precise free chlorine concentration. Based on the observed relationships in Figure 5, the natural logarithm of the corrected red channel value was used as the independent variable. The linear regression model, fitted to the training data, is shown in Figure 7, along with the results on the validation set. The model achieved an R^2^ of 0.97 on the training set and 0.93 on the validation set, indicating a strong linear correlation between and the free chlorine concentration. The equation of the fitted line, with a slope of −0.64 ± 0.05 and a y-intercept of 3.3 ± 0.2, can be used to predict chlorine concentration from values. The narrow confidence and prediction intervals further demonstrate the model’s precision.
Finally, for the BTB strip method, a test dataset built at room light conditions (Room Setup) was used as test split for a series of smartphones and images were taken for the same labeled chlorine concentrations as the Fixed Setup dataset. For each image, the same image was taken with flash and another one without it. Not all smartphones were used to capture every sample. Images from some devices were excluded from the evaluation dataset, as their lower image quality or inconsistent capture conditions introduced variability that interfered with model performance. Both tasks were tested under this dataset: (1) the classification task that used R, G, B, H, L, S features for the whole three chlorine ranges and (2) the regression task that used only the R features in the medium chlorine range. Figure 8 depicts the detailed metrics of one of the smartphone cameras for both tasks, e.g., a confusion matrix for the classification task and a linear fit against the expected values for the regression task. Figure 8b includes a few misclassified points that lie outside the valid 0.2–0.9 ppm range but were passed to the regression model due to incorrect classification. These points deviate from the linear trend and are shown to highlight the limitations of applying regression to misclassified samples. Table 3 details the results for both tasks for each smartphone and a global accuracy of the classification model. All regression against a perfect fit performed between 80 and 100%, except with Motorola G6, which exhibits the worst results in the dataset.
3.2. DPD Powder Method
Similarly to the BTP strip method, we successfully implemented a computer vision pipeline to extract the cuvette of the DPD powder method and measure a ROI region inside the cuvette with the powder colorant. The two main differences fell in the placement and volume of the object to be recognized and the volume of the object itself (bigger than the Color QR Code itself; see Figure 9a,b). For this pipeline, the cuvette was placed on the right side of the machine-readable pattern. This ensured the deformation of the projective transformation between the original image and the cropped image was minimized [8]. Plus, another algorithm was used to recover the color measurement, this was a classical edge-contour detection, using state-of-the-art OpenCV functions [15]. A centered inner ROI approximately 25 times smaller than the cuvette (5 times for x and y axis) was chosen (see Figure 9c,d).
Again, to determine the most effective color features for quantifying free chlorine concentration, six parameters (red (R), green (G), blue (B), hue (H), saturation (S), and lightness (L)) were extracted from the ROI of images representing various chlorine concentrations. Figure 10 displays the contribution of each component. Despite this, not all the features were used for the DPD powder models. First, as seen in Figure 10, the best contributions to the model were the blue and green channels;, therefore, we used those two components to build similar tasks, as before. For the SVC, both were used without any PCA. The next difference from the BTP strip models is that our boundaries changed due to following another manufacturer specifications, so the boundaries for the classification task were as follow: low was ≤0.2 ppm; medium, 0.2–1.1 ppm; and, high, ≥1.1 ppm. Later, for the medium concentration range, a regression task was trained against the first component of a PCA performed over the logarithm of the G and B features, as opposed to the model for the BTB strip method which used the R feature; this a logical approach as the DPD powder test changes color in the reddish gamut, hence following color theory does not present changes in the red channel of the measurement. We focused on the two most predictive features (G and B channels) and used PCA to construct a univariate representation capturing the dominant variance. This simplified model yielded good accuracy within the target range.
As with the BTB strip method, the DPD powder test also yielded strong quantitative results. For instance, using the Huawei P20 smartphone in the Room Setup without flash, the classification task achieved an accuracy of 84.6%, while the regression model reached an R^2^ of 0.94, as shown in Figure 11. The use of flash was avoided for the DPD powder test due to unwanted reflections caused by the cuvette. Table 4 summarizes the results obtained across all smartphones tested under the Room Setup conditions.
3.3. Smartphone Application
In parallel with the training of machine learning models and the digitization of the chlorine test samples, we developed a mobile application aimed at demonstrating the potential integration of this technology into a product for prospective clients in the HORECA (hotel/restaurant/café) sector. The resulting application, named Selfytest, was designed to assist non-specialist operators in performing fast and reliable free chlorine measurements on-site, using only a smartphone and a printed Color QR Code. The Selfytest app managed a local database that stored user information, sample metadata, and measurement results. Additionally, it communicated with a cloud infrastructure via a dedicated REST API, through which the trained colorimetric models were deployed. This architecture ensured platform independence and allowed model updates to be performed server-side without requiring user intervention.
Figure 12 illustrates the main components of the smartphone platform. Figure 12a shows a mockup of the SelfytestBot, a prototype messaging interface used in early-stage demonstrations to simulate image acquisition and classification. It displayed automatically extracted result alongside a visual comparison with predefined color references. Figure 12b presents screenshots of the actual Selfytest application: the central panel shows the home interface, which allowed users to access configuration options, sample management tools, and result history; the right panel shows the live acquisition screen, where the system detected the QR code and test strip prior to image capture. This system addressed specific needs of the HORECA sector, where decentralized and routine monitoring of water quality was essential, yet often constrained by the lack of laboratory infrastructure or trained personnel [20]. By integrating advanced computer vision and machine learning into a practical mobile interface, the Selfytest platform offered a promising, low-cost, and scalable solution for on-site chlorine monitoring.
4. Conclusions
In this work, we presented a complete pipeline for smartphone-based digitization of free chlorine (FC) colorimetric assays, combining computer vision techniques with custom-designed Color QR Codes for geometric alignment and color correction. Two commercially available methods—the BTB strip test and the DPD cuvette test—were analyzed using machine learning models tailored for both classification and regression tasks. High performance was achieved across diverse smartphone devices, with classification accuracies exceeding 88% and regression R^2^ values consistently above 0.8. The BTB method showed strong linearity in ln(R_a_) response, particularly in the medium concentration range, and benefited from flash illumination due to improved contrast. In contrast, the DPD method achieved its best results without flash, as cuvette reflections under artificial lighting negatively affected color consistency.
In parallel, a prototype mobile application, Selfytest, was developed to facilitate practical deployment. The app interfaces with a cloud-based inference engine and includes features for sample tracking and user management, addressing the operational needs of the HORECA sector [20]. Overall, the proposed system demonstrates the feasibility of using smartphones and QR-based references to digitize chemical assays with high reliability.
Future work should focus on revisiting the machine learning pipeline to propose new algorithms, i.e., a mix of both colorimetric sensor data could be studied to develop a sort of “colorimetric nose”, an analogy with the term “electronic nose” for gas sensing devices that use the data from several sensors to measure one or several quantities [21]. Also, the color correction step could be enhanced, and advanced color correction techniques involving deep-learning models could be implemented [22,23]. Moreover, advanced features could be developed for our user-friendly mobile application. Ultimately, these advancements represent significant progress in water quality monitoring, providing rapid, accurate, and accessible methods for determining free chlorine concentration, empowering communities to ensure access to safe drinking water.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1European Parliament and Council of the European Union Regulation (EC) No 852/2004 of the European Parliament and of the Council of 29 April 2004 on the Hygiene of Foodstuffs 2004 European Union Brussels, Belgium 2004
- 2Codex Alimentarius Commission Hazard Analysis and Critical Control Point (HACCP) System and Guidelines for Its Application Food and Agriculture Organization of the United Nations (FAO)Rome, Italy 2020
- 3Sivakumar R. Lee N.Y. Recent Progress in Smartphone-Based Techniques for Food Safety and the Detection of Heavy Metal Ions in Environmental Water Chemosphere 202127513009610.1016/j.chemosphere.2021.13009633677270 · doi ↗ · pubmed ↗
- 4Shang J. Yu L. Sun Y. Chen X. Kang Q. Shen D. On Site Determination of Free Chlorine in Water Samples by a Smartphone-Based Colorimetric Device with Improved Sensitivity and Reliability New J. Chem.201943144091441610.1039/C 9NJ 03954 F · doi ↗
- 5Alberti G. Magnaghi L.R. Iurato M. Zanoni C. Biesuz R. Colorimetric Paper-Based Analytical Devices (PA Ds) Backed by Chemometrics for Pd(II) Detection Sensors 202323742510.3390/s 2317742537687882 PMC 10490827 · doi ↗ · pubmed ↗
- 6Driau C. Fàbrega C. Benito-Altamirano I. Pfeiffer P. Casals O. Li H. Prades J.D. How to Implement a Selective Colorimetric Gas Sensor with off the Shelf Components?Sens. Actuators B Chem.2019293414410.1016/j.snb.2019.04.117 · doi ↗
- 7Benito-Altamirano I. Martínez-Carpena D. Casals O. Fábrega C. Waag A. Prades J.D. Back-Compatible Color QR Codes for Colorimetric Applications Pattern Recognit.202313310898110.1016/j.patcog.2022.108981 PMC 972051036478685 · doi ↗ · pubmed ↗
- 8Benito-Altamirano I. Martínez-Carpena D. Lizarzaburu-Aguilar H. Fàbrega C. Prades J.D. Reading QR Codes on Challenging Surfaces Using Thin-Plate Splines Pattern Recognit. Lett.2024184374310.1016/j.patrec.2024.06.004 · doi ↗
