Next Article in Journal
Secure Fog Computing for Remote Health Monitoring with Data Prioritisation and AI-Based Anomaly Detection
Previous Article in Journal
Immunofluorescence Rapid Analysis of Bisphenol A in Water Based on Magnetic Particles and Quantum Dots
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Portable Multispectral Imaging System for Sodium Nitrite Detection via Griess Reaction on Cellulose Fiber Sample Pads

by
Chanwit Kataphiniharn
1,
Nawapong Unsuree
2,
Suwatwong Janchaysang
2,
Sumrerng Lumjeak
2,
Tatpong Tulyananda
3,
Thidarat Wangkham
1,
Preeyanuch Srichola
4,5,
Thanawat Nithiwutratthasakul
4,
Nattaporn Chattham
6 and
Sorasak Phanphak
6,*
1
Department of Industrial Physics and Medical Instrumentation, Faculty of Applied Science, King Mongkut’s University of Technology North Bangkok, Bangkok 10800, Thailand
2
Department of Physics, Academic Division, Chulachomklao Royal Military Academy, Nakhon Nayok 26001, Thailand
3
Plant Biology & Astrobotany Laboratory, School of Bioinnovation and Bio-Based Product Intelligence, Faculty of Science, Mahidol University, Bangkok 10400, Thailand
4
Kasetsart Agricultural and Agro-Industrial Product Improvement Institute, Kasetsart University, Chatuchak, Bangkok 10900, Thailand
5
Cellulose for Future Materials and Technologies Special Research Unit, Department of Biotechnology, Faculty of Agro-Industry, Kasetsart University, Chatuchak, Bangkok 10900, Thailand
6
Department of Physics, Faculty of Science, Kasetsart University, Bangkok 10900, Thailand
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(23), 7323; https://doi.org/10.3390/s25237323 (registering DOI)
Submission received: 27 October 2025 / Revised: 27 November 2025 / Accepted: 28 November 2025 / Published: 2 December 2025
(This article belongs to the Section Optical Sensors)

Abstract

This study presents a custom-built, portable multispectral imaging (MSI) system integrated with computer vision for sodium nitrite detection via the Griess reaction on paper-based substrates. The MSI system was used to investigate the absorption characteristics of sodium nitrite at concentrations from 0 to 10 ppm across nine spectral bands spanning 360–940 nm on para-aminobenzoic acid (PABA) and sulfanilamide (SA) substrates. Upon forming azo dyes with N-(1-naphthyl) ethylenediamine (NED), the PABA and SA substrates exhibited strong absorption near 545 nm and 540 nm, respectively, as measured by a spectrometer. This agrees with the 550 nm MSI images, in which higher sodium nitrite concentration regions appeared darker due to increased absorption. A concentration-correlation analysis was conducted for each spectral band. The normalized difference index (NDI), constructed from the most and least correlated bands at 550 nm and 940 nm, showed a stronger correlation with sodium nitrite concentration than the single best-performing band for both substrates. The NDI increased the coefficient of determination (R2) by approximately 19.32% for PABA–NED and 19.89% for SA–NED. This improvement was further confirmed under varying illumination conditions and through comparison with a conventional smartphone RGB imaging approach, in which the MSI-based NDI showed substantially superior performance. The enhancement is attributed to improved contrast, illumination normalization by the NDI, and the narrower spectral bands of the MSI compared with RGB imaging. In addition, the NDI framework enabled effective image segmentation, classification, and visualization, improving both interpretability and usability and providing a practical guideline for developing more robust models with larger training datasets. The proposed MSI system offers strong advantages in portability, sub-minute acquisition time, and operational simplicity, enabling rapid, on-site, and non-destructive chemical analysis.

Graphical Abstract

1. Introduction

Detection of sodium nitrite (NaNO2) is important in medical, and particularly in food safety applications [1]. The substance is commonly used as a preservative for processed meat products such as bacon, ham, and sausage. It is also used to enhance the appetizing taste and smell, as well as change the color of processed meat to a pink-red and improve its texture [2,3,4,5]. However, sodium nitrite poses an adverse effect on health, since it is known to react with stomach acid and secondary amine metabolites, changing their structure to nitrosamines, which have been identified as a cause of stomach and esophageal cancer [2,6,7,8]. Moreover, discharges and wastewater treatment from the meat processing industry are the main sources of sodium nitrite contamination in surface and groundwater [9]. Therefore, standards have been established for the amount of sodium nitrite used. Global health regulators’ safety standards typically limit nitrite to no greater than 1 part per million (ppm) in drinking water [10,11] and 80 ppm in processed meat products for safe consumption [12].
Traditional techniques for measuring sodium nitrite include high-performance liquid chromatography (HPLC) [13,14,15], mass spectrometry (MS) [16,17], and gas chromatography (GC) [18]. However, these methods suffer from significant practical limitations that hinder their use for rapid, on-site screening. Their drawbacks include expensive costs of equipment and maintenance, long analysis time, as well as a requirement for complicated sample preparation and highly skilled workers. Furthermore, their lack of portability makes them unsuitable for field applications where immediate results are needed.
Colorimetric Griess reaction provides a simpler and faster method for quantitative analysis of nitrite. The chemical reaction unfolds in two steps. First, an aromatic amine, such as sulfanilamide (SA) [19,20] and para-aminobenzoic acid (PABA) [21], reacts with nitrite under acidic conditions to form a diazonium salt. Second, the diazonium salt binds to electron-rich coupling agent (e.g., N-(1naphthyl) ethylenediamine-NED), causing electron transitions. The result is the formation of a pink-to-magenta azo dye that exhibits high absorbance at its peak wavelength (approx. 545 nm). This measured absorbance is directly proportional to the initial sodium nitrite concentration [1,22,23]. Several development platforms of Griess reactions, such as Griess reagent-doped hydrogel sensor [23,24], nanoparticles [20,25,26], and paper-based platforms [27,28,29,30,31,32] are designed and examined in order to enable the rapid, visual detection of nitrite without the need for sophisticated procedures.
The paper-based platforms are interestingly effective, particularly for colorimetric methods involving the NED reagent, due to the inherent properties of the cellulose matrix. Cellulose is naturally hydrophilic and porous, which allows for the spontaneous transport of aqueous samples via capillary action, ensuring consistent interaction with the pre-deposited reagents. Furthermore, its inert nature and brilliant white background paper provides a perfect high-contrast stage for the Griess reaction’s colorimetric endpoint. This makes even subtle changes in the resulting azo dye’s pink-to-magenta hue easily distinguishable by the naked eye, turning a simple piece of paper into a sensitive analytical device [25,32]. Although visually interpreting the results by comparing the color with a standard strip is the simplest and most economical method, it has limitations in accuracy and depends on the observers. To solve this problem, digital cameras, such as those on smartphones, are now popularly used to measure color intensity, which provides more accurate results and reduces the gap between observation and laboratory measurement [22,23,29,33,34]. However, being limited to only three broad color channels, conventional RGB cameras lack the chemical specificity required to distinguish subtle spectral changes from background noise and are sensitive to light variation, which can compromise quantitative accuracy [35,36,37,38]. Spectroscopic approaches such as ultraviolet–visible spectroscopy (UV-VIS), Fourier Transform Infrared spectroscopy (FTIR), and Raman spectroscopy can be used to provide significantly better spectral information than digital camera [20,39,40,41]. While spectrometers provide more accurate quantitative data, they can only obtain an average measurement of measured regions on the sample and cannot provide spatial distribution information.
To overcome this limitation, either multispectral imaging (MSI) or hyperspectral imaging (HSI) systems can be employed. Unlike a spectrometer, MSI and HSI systems capture images, providing critical spatial distribution information that spectrometers inherently lack. Multispectral cameras (MSC) and hyperspectral cameras (HSC) provide more detailed spectral information than conventional RGB camera because they can record information in multiple narrow spectral channels, allowing them to capture finer spectral features and subtle changes in material properties that are not possible with traditional broad RGB channels [35,36,37,38,42]. Although HSI systems offer more spectral bands than MSI systems, they are typically more expensive, more complex to operate, slower in acquisition, and require more extensive data processing. In contrast, MSI systems, with carefully selected spectral bands, provide a cost-effective solution that is well suited for performing specific targeted tasks. A number of field applications employ the normalized difference index (NDI) approach, which relies on only a few highly informative spectral bands for data analysis [43,44]. The advantages of the NDI method include rapid image acquisition and straightforward interpretation. Therefore, the MSI system combined with NDI-based spectral analysis represents an effective approach for studying the absorption characteristics of sodium nitrite at different concentrations on a paper-based platform.
In this paper, the cellulose paper-based Griess reaction for sodium nitrite detection with the custom-built portable MSI system is investigated. To the best of our knowledge, this approach of integrating MSI with the Griess reaction for sodium nitrite analysis on paper platforms has not yet been reported. The MSI system was constructed using a Raspberry Pi 5 (Raspberry Pi Ltd, Cambridge, UK) as the core processor and a motorized filter wheel equipped with nine bandpass filters, each having a full width at half maximum (FWHM) ranging from 12 nm to 40 nm. This configuration allows light at specific wavelengths to pass through, providing more selective measurements compared to conventional RGB cameras. The results demonstrate that the developed MSI system effectively transforms conventional colorimetric detection into a quantitative imaging approach through the application of the NDI. The proposed NDI-based method significantly enhances the correlation with sodium nitrite concentration compared with single-wavelength analysis across different substrates and lighting conditions and also outperforms a conventional smartphone RGB imaging approach. In addition, the NDI framework enables effective image segmentation, classification, and visualization, thereby improving interpretability and supporting rapid, on-site, and non-destructive chemical analysis.

2. Materials and Methods

2.1. Sample Preparation for Standard Reagent Solutions

Sodium nitrite (NaNO2), sodium nitrate (NaNO3), sodium carbonate (Na2CO3), potassium nitrate (KNO3), hydrochloric acid (HCl), N-(1-naphthyl) ethylenediamine (NED), sulfanilamide (SA), para-aminobenzoic acid (PABA), and Cellulose fiber sample pads were purchased from Sigma-Aldrich (Singapore). All reagents and solvents obtained from commercial sources were of analytical grade. Deionized water (ELGA OPTION R-60, Celle, Germany) was used in all experiments. To obtain standard reagent solutions, stock solutions of sodium nitrite, sodium nitrate, sodium carbonate and potassium nitrate (100 ppm) were prepared by dissolving 10 mg of the substances in 100 mL of DI water. Then, a series of working standard solutions were obtained by diluting the original stock solutions to the required concentration (10 ppm) with DI water. SA (1 mM) was prepared by dissolving 17.2 mg of SA in 100 mL of DI water with strong stirring until dissolved. NED (2 mM) was prepared by dissolving 51.8 mg of NED in 100 mL of DI water. PABA (7 mM) was prepared by dissolving 4.8 mg of PABA and diluting it to a final volume of 5 mL with DI water, followed by 2 h of strong stirring at room temperature.

2.2. Characterization of SA-NED and PABA-NED Griess Reactions Using UV-VIS Spectrometer

To compare the Griess reactions of SA-NED and PABA-NED with nitrite ions, first, a series of standard sodium nitrite solutions (0, 0.5, 1, …, 10 ppm), described in Section 2.1, were mixed with SA solution in equal proportion by volume under acidic condition (HCl pH 1). After that, NED was added in ratio 2:1 v/v to obtain SA-NED Griess reaction. PABA-NED Griess reactions with sodium nitrite were also carried out under the same conditions. All solutions were characterized using LAMBDA 365 UV-VIS spectrometer (PerkinElmer, Shelton, CT, USA) to obtain standard spectral absorbance curves of the standard solutions at different sodium nitrite concentrations: 0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 ppm (0–0.145 mM), respectively.

2.3. Specificity Test of PABA-NED Griess Reaction

To test selectivity of the PABA-NED reaction, same experimental procedure and conditions, as in Section 2.2, were carried out with 10 ppm solutions of potential interfering ions (sodium nitrate, sodium carbonate, and potassium nitrate). The resulting reactions were photographed for visual confirmation, and the absorption spectra were recorded to determine whether these interfering ions produced a significant false-positive signal compared to true response from sodium nitrite.

2.4. Custom-Built Multispectral Imaging System

For the subsequent parts of our experiment, a multispectral imaging (MSI) system was utilized. The MSI system was custom-built using a Raspberry Pi 5 as the core processor, a monochrome CMOS camera (HuaTeng Vision, Shenzhen, China Model No. HT-SUA134GM-T) for image acquisition, and two halogen lamps (Osram, Munich, Germany Model No. 64250 HLX). The MSI system has approximate dimensions of 19 cm × 24 cm × 30 cm and a total weight of 1.4 kg. The core of the imaging system is a filter wheel equipped with nine distinct bandpass filters, selected based on availability at the time of development. Each filter permits transmission of a specific wavelength range, enabling the system to acquire images across a broad spectral span from the ultraviolet (UV) to the near-infrared (NIR) regions. The specifications of each bandpass filter are provided in Table 1.
To create a portable and reproducible measurement tool, the housing and structural components of the MSC, shown in Figure 1, were fabricated using 3D printing. The figure illustrates the self-contained and integrated design of the system. The 3D rendering (left panel) displays the enclosed, box-like housing that prevents light from outside to enter. The front view (middle panel) reveals the precise arrangement of the core imaging components: the monochrome camera is mounted centrally at the top, positioned above the motorized filter wheel. The sample area below is illuminated by two angled halogen lamps, a configuration designed to provide uniform and consistent lighting for every measurement. The rear view (right panel) shows the neatly integrated electronic control unit, where the Raspberry Pi and the motor driver are mounted externally for easy access and heat dissipation. This fully integrated design, made possible by the flexibility of 3D printing, ensures that all components are held in a fixed geometry, which is crucial for achieving reproducible results.

2.5. Sample Preparation for Paper-Based PABA-NED Nitrite Detection Kit

In this section we construct Griess-cellulose paper platform for nitrite detection. One advantage of using cellulose paper is that cellulose fibers possess a hydroxyl group can bind to a –COOH functional group at the end of PABA structure (Figure 2), allowing a resulting pink-to-magenta azo dye to be concentrated on the paper surface, hence enhancing the optical absorption signal [21]. To construct a detection kit, approximately 4 × 4 mm cellulose fiber paper pads were cut and immersed in the prepared 7 mM PABA solution. Then, they were left to dry at 37 °C for 2 h. The dried PABA-impregnated sample pads were then attached to a backing paper (Whatman No. 1 filter paper) to form a complete detection kit. Then, 1:1 sodium nitrite standard solution in HCl pH 1 were prepared at sodium nitrite concentrations of 0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 ppm, respectively. Then a drop of each nitrite solution concentration was dropped onto each sample pad, followed by a drop of NED solution at the same volume ratio as nitrite. They were then left for 5 min before either RGB or multispectral images would be taken.

2.6. Image Acquisition and Data Analysis Methods

Each spectral band image was normalized using both the white and dark references. For each band, the white reference was captured using the same white cellulose filter paper on which the samples were placed, while the dark reference was acquired with the illumination turned off and the lens aperture fully closed to represent the camera’s dark current. Each band was then normalized using Equation (1):
I norm   =   I     I dark I white     I dark
where I norm is the normalized pixel intensity of the sample for a given band, I is the corresponding pixel intensity of the sample, I white is the corresponding pixel intensity of the white reference, and I dark is the corresponding pixel intensity of the dark reference.
For every sample pad with known nitrite concentration provided in a ground-truth image, the average image intensity of the corresponding sample pad was extracted for each spectral band. A correlation analysis was then performed to quantify the relationship between the normalized image intensity in each spectral band and the known sodium nitrite concentration. From this analysis, the spectral band exhibiting the strongest correlation (the most sensitive band) and the band with the weakest correlation (the least sensitive band) were identified. The least sensitive band effectively serves as a baseline, helping to correct for variations in illumination. To create a bounded normalized metric ranging from −1 to 1, a Normalized Difference Index (NDI) was calculated [35]. This index utilizes the best and worst correlating bands to enhance image contrast. The NDI for each pixel was calculated using the following Equation (2):
NDI   =   I best     I worst I best   +   I worst
where I best   is the intensity of the pixel in the best correlating band, and I worst is the intensity of the same pixel in the worst correlating band. The resulting NDI image provides a powerful representation of the nitrite concentration, normalized against potential experimental variations. To validate this approach, the relationship between the mean NDI value of each sample pad and its known concentration was evaluated using statistical methods, such as calculating the coefficient of determination (R2) and Pearson correlation coefficient (r).

2.7. Smartphone-Based RGB Imaging and Comparative Validation

To validate the efficacy of the MSI-based NDI, a comparative analysis was performed against a conventional mobile phone RGB imaging approach using a commercially available smartphone (Xiaomi Redmi Note 13 Pro, Xiaomi Corporation, Beijing, China). For data processing, the RGB images were decomposed into individual red, green, and blue channels using a Python 3.13.5 script executed in Visual Studio Code 1.104.2 (Universal). In addition to the individual channels, the Normalized Grayscale Intensity (NGI) was also calculated using Equation (3) [45]:
NGI = 255 − (0.2126 × R + 0.7152 × G + 0.0722 × B)
where R, G, and B correspond to the pixel intensities of the red, green, and blue channels, respectively. The NGI and all individual RGB channels were then subjected to correlation analysis to assess their relationships with sodium nitrite concentration and to compare their performance against the MSI-based NDI approach.

2.8. Image Segmentation and Classification Strategy

Finally, computer vision techniques were employed for image segmentation and classification to isolate the region of interest and subsequently categorize sodium nitrite concentrations based on mean NDI values. In the preprocessing stage, a median filter with a 5 × 5 kernel was applied to the 550 nm and 940 nm images to suppress salt-and-pepper noise while preserving edge integrity. This was achieved by replacing each pixel intensity with the median of its 25-pixel (5 × 5) neighborhood. Following noise reduction, segmentation was performed using a predefined NDI threshold to automatically remove the background and exclude samples corresponding to 0 ppm sodium nitrite. Morphological operations were then applied to refine the segmentation mask and eliminate small, isolated artifacts. Mean NDI values were calculated for the segmented regions and used to classify the samples into four concentration levels: low, medium, high, and very high. The performance of the segmentation and classification procedures was assessed using the Intersection over Union (IoU) metric computed against the ground truth using Equation (4) [46]:
IoU   =   | A B | | A B |
where A∩B represents the overlapping area between the predicted classification and the ground truth regions, and A∪B represents their combined area.

3. Results and Discussion

3.1. Comparison of PABA-NED and SA-NED Spectral Characteristics

In this section, we compared the sodium nitrite UV-VIS absorption curves of SA-NED and PABA-NED, as described in Section 2.2. Figure 3a,c show the absorption spectra of PABA-NED and SA-NED, respectively, with the sample solutions at sodium nitrite concentrations ranging from 0.5 to 10 ppm. The results showed that both methods yielded consistent outcomes: as the sodium nitrite concentration increased, the absorbance also increased. Then, the maximum absorbance values at 540–545 nm obtained from the spectra were used to create calibration curves Figure 3b,d, to analyze the linear relationship between concentration and absorbance. It was found that both methods gave excellent linearity in the tested concentration range. Both SA-NED and PABA-NED methods yielded a coefficient of determination (R2) of 0.99, confirming that the measurements have high accuracy and can be reliably used for quantitative analysis. The method also proved highly selective on nitrite detection.

3.2. Selectivity of the PABA-NED Griess Reaction

This section shows the results of the specificity test with nitrite ion from the UV-VIS absorption spectra. The absorption spectra in Figure 4a clearly shows that the sodium nitrite at concentration of 1 and 10 ppm exhibit a clear absorption peak at a wavelength of approximately 545 nm. The other three interfering ion solutions, even at concentrations as high as 10 ppm, did not show any significant absorbance signal, with the curves overlapping close to the reference line.
From the inset in Figure 4b, the bar chart and solution photograph further confirm this result. It can be seen that the absorbance of sodium nitrite at 1 and 10 ppm is significantly higher than that of the other interfering ions. This is consistent with the color changes observed with the naked eye, with only sodium nitrite producing pink (1 ppm) and magenta (10 ppm) colors, while the other interfering ion solutions remained colorless. This experimental result confirms that the developed PABA-NED detection method has high selectivity for nitrite ion detection. There are no significant false-positive signals from common interfering ions, e.g., nitrate; only nitrite is specific for this detection method. The double-bond of nitrogen is required to create the magenta AZO dye, where nitrate cannot directly form the bond via the Griess process.

3.3. Absorption Study with the MSI System

The samples were placed inside the multispectral imaging (MSI) system and captured using a Python script executed in Visual Studio Code. The MSI system sequentially acquired one image per spectral band across nine central wavelengths including 360 nm, 475 nm, 550 nm, 670 nm, 710 nm, 800 nm, 808 nm, 850 nm, and 940 nm, with the entire acquisition completed under one minute. The raw multispectral images, along with the combined RGB image constructed from the 475 nm, 550 nm, and 670 nm bands, are presented in Figure 5a. The regions of interest in each spectral band image were spatially mapped to corresponding regions with known sodium nitrite concentrations, as defined in the ground-truth image shown in Figure 5b. The mean intensity of each concentration region was then calculated for every spectral band and plotted as spectral curves representing different concentrations, as illustrated in Figure 5c. The results from Figure 5 enable the analysis of the absorption characteristics of sodium nitrite on a paper-based platform (in this case, PABA-NED) through the reflectance intensities captured by the MSI system. For instance, in the 550 nm image, regions with higher sodium nitrite concentrations appear darker (indicating higher absorption) than those with lower concentrations. Similarly, the 475 nm image exhibits a trend but with lighter intensity variations. In contrast, minimal intensity variation is observed across the remaining spectral bands. These findings indicate that sodium nitrite on the PABA-NED substrate exhibits its strongest absorption at 550 nm, followed by 475 nm, while showing minimal absorption at 360 nm, 670 nm, 710 nm, 800 nm, 808 nm, 850 nm, and 940 nm. This behavior is further confirmed by the spectral curves in Figure 5c, where the reflectance at 550 nm decreases markedly (indicating higher absorption) with increasing sodium nitrite concentration—consistent with the spectroscopy measurements presented in Figure 3a.
To determine which spectral bands, exhibit the strongest and weakest correlation with sodium nitrite concentration, a correlation analysis was performed. For each band, the mean intensity of every concentration region was plotted against the corresponding known concentrations, and the relationship was modeled using linear regression. From these fits, the coefficient of determination (R2) and the Pearson correlation coefficient (r) were extracted to quantify the strength of the correlation between each spectral band and sodium nitrite concentration. As shown in Figure 6, the 550 nm band demonstrated the strongest correlation, with R2 and |r| values of 0.62558 and 0.7909, respectively. In contrast, the 940 nm band exhibited the weakest correlation, with R2 and |r| values of 0.00006 and 0.0080, respectively. It is worth noting that the correlations of most other bands—except for the 475 nm band—are relatively similar. Therefore, any band with a correlation level comparable to that of the weakest-correlated band may also be used in constructing the NDI map.
The NDI image, shown in Figure 7a, was computed using the spectral band images with the highest and lowest correlations identified previously, and the results of the fitting are shown in Figure 7b,c, respectively. The correlation analysis for the NDI image was conducted following the same procedure as before. As presented in Figure 7d, the NDI exhibited an enhanced correlation with sodium nitrite concentration compared to the best single-correlated band (550 nm), achieving R2 and |r| values of 0.74644 and 0.8640, respectively. The improvements of 19.32% in R2 and 9.24% in |r| are attributed to the NDI’s increased robustness against illumination variations and its improved contrast, resulting from the combination of the strongly correlated and weakly correlated spectral band images.
To validate these findings at different substrates, the same correlation analysis was performed using the SA-NED substrate. The results exhibited a consistent trend, with the strongest absorption occurring at 550 nm, followed by 475 nm, and minimal absorption observed at 360 nm, 670 nm, 710 nm, 800 nm, 808 nm, 850 nm, and 940 nm. Moreover, the correlation between the NDI image (computed using the 550 nm and 940 nm images) and sodium nitrite concentration showed improvements of 19.89% and 9.49% in R2 and |r|, respectively, compared to the 550 nm image. The fitted results for the 550 nm and NDI images are presented in Figure 8a,b, respectively.
In addition, a comparative correlation analysis under different illumination conditions was performed to verify the enhancement of the NDI–sodium nitrite concentration correlation. The brightness of the halogen lamps was adjusted by setting their input voltages to 3.5 V, 4.0 V, and 4.5 V. The corresponding linear regression fits and R2 values for each condition are presented in Figure 9a–f. Across all lighting levels, the NDI approach (computed using the 550 nm and 940 nm bands) consistently outperformed the best single-band method (550 nm), yielding an average improvement of 24.22% in R2.

3.4. Comparison of MSI-Based NDI and Mobile Phone RGB Imaging for Sodium Nitrite Detection

To validate the efficacy of the MSI-based NDI, a comparative analysis was conducted against a traditional mobile phone RGB imaging approach. A Xiaomi Redmi Note 13 Pro was used to capture RGB images of sodium nitrite deposited on a PABA-NED substrate under standard room lighting conditions. Figure 10a–c show the extracted red, green, and blue channels, respectively, from the RGB image presented in Figure 10d. The Normalized Grayscale Intensity (NGI) map, computed using Equation (3), is shown in Figure 10e for comparison with the NDI map generated by the MSI system (Figure 10f).
Correlation analyses for the red, green, and blue channels, as well as the NGI and NDI, were performed in the same manner as previously described. The results, presented in Figure 11, reveal that the RGB channels and the NGI map exhibit weak correlations with sodium nitrite concentration, yielding low R2 values of 0.0009, 0.1376, 0.0302, and 0.0723, respectively, with the green channel performing the best among them. In contrast, the NDI approach demonstrated a substantially stronger correlation, achieving an R2 value of 0.7823. A comparison of these R2 values, shown in Figure 11f, highlights the markedly enhanced correlation achieved by the NDI relative to the mobile phone RGB imaging approach.

3.5. Segmentation and Classification

This section provides a practical guideline for developing a classification of sodium nitrite concentrations. In this example, five samples with sodium nitrite concentrations of 0, 5, 20, 55, and 80 ppm were arranged from top to bottom on the ground-truth image, as shown in Figure 12.
First, noise reduction was applied to both the best-correlating band (550 nm) and the weakest-correlating band (940 nm) using a median filter to remove salt-and-pepper noise while preserving edge features. The NDI image in Figure 13a was then calculated using these two spectral band images. By applying a specific NDI threshold (0.12 in this case), the background and the 0 ppm sample were segmented out, leaving only the regions containing sodium nitrite, as shown in Figure 13b. Morphological cleaning was subsequently performed to remove small isolated regions, improving the segmentation of relevant samples. At this stage, four samples with different sodium nitrite concentrations were clearly segmented, as shown in Figure 13c. The mean NDI value for each segmented region was then calculated and plotted in Figure 13d. Based on these mean NDI values, classification was performed using defined NDI thresholds to categorize four concentration levels: low (0.12 ≤ NDI < 0.16), medium (0.16 ≤ NDI < 0.31), high (0.31 ≤ NDI < 0.35), and very high (NDI ≥ 0.35), as shown in Figure 13e. Finally, object detection boxes with class labels were overlaid for improved visualization and interpretation, as shown in Figure 14.
To evaluate the performance of the segmentation and classification, a pixel-level analysis was performed by comparing the predicted classification map with the ground truth. The results, summarized in Figure 15, present the Intersection over Union (IoU) metric calculated using Equation (4). The system achieved a mean IoU (mIoU) of 80.10%, with IoU scores of 98.11%, 91.28%, 75.74%, 68.17%, and 67.19% for the Background (0 ppm), Low, Medium, High, and Very High classes, respectively.
This example demonstrates the effectiveness of using NDI-based imaging with defined thresholds combined with computer vision techniques to enhance the visualization and interpretation of sodium nitrite concentrations. At this stage, the threshold values for each class were manually selected to align with the ground truth, serving as an initial guideline for classification. In our subsequent work, we plan to develop a more robust approach by collecting additional data to determine these thresholds statistically or by employing machine-learning methods in combination with various NDI maps to achieve more accurate and reliable classification.

4. Conclusions

This study demonstrates the application of a custom-built, portable multispectral imaging (MSI) system integrated with computer vision for the quantitative analysis of sodium nitrite on a paper-based platform using the Griess reaction. By employing the normalized difference index (NDI), conventional colorimetric detection was effectively transformed into a robust quantitative imaging approach, yielding enhanced correlation with sodium nitrite concentration for both PABA and SA substrates and under varying illumination conditions. Compared with single-wavelength analysis, the NDI achieved stronger analytical performance due to its improved image contrast and robustness against illumination variation. The spectral behavior observed from the MSI system closely agreed with UV–VIS spectroscopic measurements, confirming the accuracy and reliability of the proposed method while additionally providing spatial information unavailable from conventional spectroscopy. Furthermore, the MSI-based NDI significantly outperformed a conventional smartphone RGB imaging approach, attributable to the narrower spectral bandwidths of the MSI system. The NDI framework also enabled effective image segmentation, classification, and visualization, improving both interpretability and usability. With its portability, sub-minute acquisition time, and operational simplicity, the developed MSI system is well suited for rapid, on-site, and non-destructive chemical analysis. Future work will focus on developing more robust nitrite concentration estimation models by integrating NDI features with advanced machine learning techniques to further enhance the system’s analytical and diagnostic capabilities.

Author Contributions

Conceptualization, C.K., N.U., S.P. and S.J.; methodology, C.K. and N.U.; validation, N.U. and S.P.; formal analysis, C.K., N.U., S.P. and S.J.; software and hardware, T.T., N.U. and S.L.; resources, T.W., P.S. and T.N.; data curation, C.K.; investigation, C.K., N.U. and S.J.; writing—original draft preparation, C.K.; writing—review and editing, C.K., N.U., S.P. and S.J.; visualization, C.K. and N.U.; supervision, T.W. and S.P.; funding acquisition, S.P., P.S. and N.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Kasetsart University Research and Development Institute, KURDI (YF(KU)19.67), and has also received funding support from the NSRF via the Program Management Unit for Human Resources & Insti-tutional Development, Research and Innovation [grant number B11F670109 and B36G660006].

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Acknowledgments

We acknowledge administrative support from the Department of Industrial Physics and Medical Instrumentation at King Mongkut’s University of Technology North Bangkok, Department of Physics at Chulachomklao Royal Military Academy, and S.P.’s Lab from Department of Physics at Kasetsart University. During the preparation of this manuscript, the author(s) used Google’s Gemini 3 Pro, Chat GPT-4o, and Claude 3.5 Sonnet for the purposes of language editing and grammar correction. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Hamoudi, T.A.; Jalal, A.F.; Fakhre, N.A. Determination of nitrite in meat by azo dye formation. Syst. Rev. Pharm. 2020, 11, 535–542. [Google Scholar]
  2. Shakil, M.H.; Trisha, A.T.; Rahman, M.; Talukdar, S.; Kobun, R.; Huda, N.; Zzaman, W. Nitrites in Cured Meats, Health Risk Issues, Alternatives to Nitrites: A Review. Foods 2022, 11, 3355. [Google Scholar] [CrossRef]
  3. Deng, S.; Liu, H.; Zhang, C.; Yang, X.; Blecker, C. LMOF serve as food preservative nanosensor for sensitive detection of nitrite in meat products. LWT 2022, 169, 114030. [Google Scholar] [CrossRef]
  4. Giménez-Campillo, C.; Hernández, J.D.D.; Guillén, I.; Campillo, N.; Arroyo-Manzanares, N.; Torre-Minguela, C.D.; Viñas, P. Reddish Colour in Cooked Ham Is Developed by a Mixture of Protoporphyrins Including Zn-Protoporphyrin and Protoporphyrin IX. Foods 2022, 11, 4055. [Google Scholar] [CrossRef]
  5. Ramanathan, R.; Hunt, M.C.; Mancini, R.A.; Nair, M.N.; Denzer, M.L.; Suman, S.P.; Mafi, G.G. Recent Updates in Meat Color Research: Integrating Traditional and High-Throughput Approaches. Meat Muscle Biol. 2020, 4, 9598. [Google Scholar] [CrossRef]
  6. Ruiz-Saavedra, S.; Pietila, T.K.; Zapico, A.; de Los Reyes-Gavilán, C.G.; Pajari, A.M.; González, S. Dietary Nitrosamines from Processed Meat Intake as Drivers of the Fecal Excretion of Nitrosocompounds. J. Agric. Food Chem. 2024, 72, 17588–17598. [Google Scholar] [CrossRef]
  7. Seyyedsalehi, M.S.; Mohebbi, E.; Tourang, F.; Sasanfar, B.; Boffetta, P.; Zendehdel, K. Association of Dietary Nitrate, Nitrite, and N-Nitroso Compounds Intake and Gastrointestinal Cancers: A Systematic Review and Meta-Analysis. Toxics 2023, 11, 190. [Google Scholar] [CrossRef] [PubMed]
  8. Qin, X.; Jia, G.; Zhou, X.; Yang, Z. Diet and Esophageal Cancer Risk: An Umbrella Review of Systematic Reviews and Meta-Analyses of Observational Studies. Adv. Nutr. 2022, 13, 2207–2216. [Google Scholar] [CrossRef]
  9. Bakare-Abidola, T.; Elabor, I.; Onwuchekwa, N.; Onwuchekwa, C.; Oladeji, J.; Olawale, A.O.; Adeiza, A.A. Environmental Impact Assessment of Abattoir Wastewater. Path Sci. 2025, 11, 5001. [Google Scholar] [CrossRef]
  10. Li, H.; Song, Y.; Zhou, B.; Xu, H. Nitrite: From Application to Detection and Development. Appl. Sci. 2024, 14, 9027. [Google Scholar] [CrossRef]
  11. Ward, M.H.; Jones, R.R.; Brender, J.D.; De Kok, T.M.; Weyer, P.J.; Nolan, B.T.; Villanueva, C.M.; Van Breda, S.G. Drinking water nitrate and human health: An updated review. Int. J. Environ. Res. Public Health 2018, 15, 1557. [Google Scholar] [CrossRef]
  12. EFSA Panel on Food Additives and Nutrient Sources added to Food (ANS); Mortensen, A.; Aguilar, F.; Crebelli, R.; Di Domenico, A.; Dusemund, B.; Frutos, M.J.; Galtier, P.; Gott, D.; Gundert-Remy, U.; et al. Re-evaluation of potassium nitrite (E 249) and sodium nitrite (E 250) as food additives. EFSA J. 2017, 15, e04786. [Google Scholar]
  13. Sadaphal, P.; Dhamak, K. Review article on High-Performance Liquid Chromatography (HPLC) Method Development and Validation. Int. J. Pharm. Sci. Rev. Res. 2022, 74, 23–29. [Google Scholar] [CrossRef]
  14. Mazumdar, R.M.; Sharif, M.; Khan, T.A.; Rahman, M.M.; Abdullah, A.T.M. Simultaneous determination of nitrite and nitrate in meat and meat products using ion-exchange chromatography. Food Res. 2022, 6, 145–152. [Google Scholar] [CrossRef]
  15. Genualdi, S.; Jeong, N.; DeJager, L. Determination of endogenous concentrations of nitrites and nitrates in different types of cheese in the United States: Method development and validation using ion chromatography. Food Addit. Contam. Part A 2018, 35, 615–623. [Google Scholar] [CrossRef]
  16. Ahn, I.; Lee, S.; Jung, M.J.; Jeong, Y.; Kim, J.Y.; Kim, M.; Kim, P.S.; Lee, B.H.; Lee, Y.M.; Son, K.H. Development and Application of Analytical Methods to Quantitate Nitrite in Excipients and Secondary Amines in Metformin API at Trace Levels Using Liquid Chromatography–Tandem Mass Spectrometry. Chemosensors 2025, 13, 307. [Google Scholar] [CrossRef]
  17. Kwon, S.; Ahn, S.H.; Chang, Y.; Park, J.S.; Cho, H.; Kim, J.B. Development and Validation of a Sensitive LC-MS/MS Method for the Determination of N-Nitroso-Atenolol in Atenolol-Based Pharmaceuticals. Separations 2025, 12, 122. [Google Scholar] [CrossRef]
  18. Tsikas, D. Gc-ms analysis of biological nitrate and nitrite using pentafluorobenzyl bromide in aqueous acetone: A dual role of carbonate/bicarbonate as an enhancer and inhibitor of derivatization. Molecules 2021, 26, 7003. [Google Scholar] [CrossRef] [PubMed]
  19. Sun, J.; Zhang, X.; Broderick, M.; Fein, H. Measurement of Nitric Oxide Production in Biological Systems by Using Griess Reaction Assay. Sensors 2003, 3, 276–284. [Google Scholar] [CrossRef]
  20. Han, E.; Zhang, M.; Pan, Y.; Cai, J. Electrochemical Self-Assembled Gold Nanoparticle SERS Substrate Coupled with Diazotization for Sensitive Detection of Nitrite. Materials 2022, 15, 2809. [Google Scholar] [CrossRef] [PubMed]
  21. Ibrahim, M.H.; Xue, Z.; Abdu, H.I.; Shinger, M.I.; Idris, A.M.; Edris, M.M.; Shan, D.; Lu, X. Sensitive and selective colorimetric nitrite ion assay using silver nanoparticles easily synthesized and stabilized by AHNDMS and functionalized with PABA. Nanoscale Adv. 2019, 1, 1207–1214. [Google Scholar] [CrossRef]
  22. Guembe-García, M.; González-Ceballos, L.; Arnaiz, A.; Fernández-Muiño, M.A.; Sancho, M.T.; Osés, S.M.; Ibeas, S.; Rovira, J.; Melero, B.; Represa, C.; et al. Easy Nitrite Analysis of Processed Meat with Colorimetric Polymer Sensors and a Smartphone App. ACS Appl. Mater. Interfaces 2022, 14, 37051–37058. [Google Scholar] [CrossRef]
  23. Wongniramaikul, W.; Kleangklao, B.; Boonkanon, C.; Taweekarn, T.; Phatthanawiwat, K.; Sriprom, W.; Limsakul, W.; Towanlong, W.; Tipmanee, D.; Choodum, A. Portable Colorimetric Hydrogel Test Kits and On-Mobile Digital Image Colorimetry for On-Site Determination of Nutrients in Water. Molecules 2022, 27, 7287. [Google Scholar] [CrossRef]
  24. Liu, S.; Qu, H.; Yao, L.; Mao, Y.; Yan, L.; Dong, B.; Zheng, L. Hydrogel microsphere-based portable sensor for colorimetric detection of nitrite in food with matrix influence-eliminated effect. Sens. Actuators B Chem. 2023, 397, 134707. [Google Scholar] [CrossRef]
  25. Wang, M.; Liu, B.; Liu, J.; Zhu, H.; Bai, Q.; Hu, P.; Pan, J.; Liang, H.; Niu, X. Bifunctional manganese-doped silicon quantum dot-responsive smartphone-integrated paper sensor for visual multicolor/multifluorescence dual-mode detection of nitrite. Sens. Actuators B Chem. 2023, 392, 134143. [Google Scholar] [CrossRef]
  26. Pogăcean, F.; Varodi, C.; Măgeruşan, L.; Pruneanu, S. Highly Sensitive Graphene-Based Electrochemical Sensor for Nitrite Assay in Waters. Nanomaterials 2023, 13, 1468. [Google Scholar] [CrossRef]
  27. Zhang, X.X.; Song, Y.Z.; Fang, F.; Wu, Z.Y. Sensitive paper-based analytical device for fast colorimetric detection of nitrite with smartphone. Anal. Bioanal. Chem. 2018, 410, 2665–2669. [Google Scholar] [CrossRef] [PubMed]
  28. Jayawardane, B.M.; Wei, S.; McKelvie, I.D.; Kolev, S.D. Microfluidic paper-based analytical device for the determination of nitrite and nitrate. Anal. Chem. 2014, 86, 7274–7279. [Google Scholar] [CrossRef] [PubMed]
  29. Shariati-Rad, M.; Irandoust, M.; Mohammadi, S. Multivariate analysis of digital images of a paper sensor by partial least squares for determination of nitrite. Chemom. Intell. Lab. Syst. 2016, 158, 48–53. [Google Scholar] [CrossRef]
  30. Charbaji, A.; Heidari-Bafroui, H.; Anagnostopoulos, C.; Faghri, M. A new paper-based microfluidic device for improved detection of nitrate in water. Sensors 2021, 21, 102. [Google Scholar] [CrossRef]
  31. Ratnarathorn, N.; Dungchai, W. Paper-based Analytical Device (PAD) for the Determination of Borax, Salicylic Acid, Nitrite, and Nitrate by Colorimetric Methods. J. Anal. Chem. 2020, 75, 487–494. [Google Scholar] [CrossRef]
  32. Gregucci, D.; Calabretta, M.M.; Nazir, F.; Arias, R.J.R.; Biondi, F.; Desiderio, R.; Michelini, E. An origami colorimetric paper-based sensor for sustainable on-site and instrument-free analysis of nitrite. Sens. Diagn. 2025, 4, 239–246. [Google Scholar] [CrossRef]
  33. Kılıç, V.; Alankus, G.; Horzum, N.; Mutlu, A.Y.; Bayram, A.; Solmaz, M.E. Single-Image-Referenced Colorimetric Water Quality Detection Using a Smartphone. ACS Omega 2018, 3, 5531–5536. [Google Scholar] [CrossRef]
  34. Wang, J.; Yang, J.; Dong, C.; Wang, Y.; Shuang, S. A smartphone-adaptable dual-signal readout chemosensor for rapid detection of nitrite in food samples. J. Food Compos. Anal. 2023, 118, 105179. [Google Scholar] [CrossRef]
  35. Cao, X.; Liu, Y.; Yu, R.; Han, D.; Su, B. A Comparison of UAV RGB and Multispectral Imaging in Phenotyping for Stay Green of Wheat Population. Remote Sens. 2021, 13, 5173. [Google Scholar] [CrossRef]
  36. Li, X.; Niu, Z.; Morales-Ona, A.G.; Chen, Z.; Zhao, T.; Quinn, D.J.; Jin, J. A Portable High-Resolution Snapshot Multispectral Imaging Device Leveraging Spatial and Spectral Features for Non-Invasive Corn Nitrogen Treatment Classification. Sensors 2025, 25, 1320. [Google Scholar] [CrossRef]
  37. van Hoorn, H.; Schraven, A.; van Dam, H.; Meijer, J.; Sillé, R.; Lock, A.; van den Berg, S. Performance Characterization of an Illumination-Based Low-Cost Multispectral Camera. Sensors 2024, 24, 5229. [Google Scholar] [CrossRef] [PubMed]
  38. Airado-Rodríguez, D.; Høy, M.; Skaret, J.; Wold, J.P. From multispectral imaging of autofluorescence to chemical and sensory images of lipid oxidation in cod caviar paste. Talanta 2014, 122, 70–79. [Google Scholar] [CrossRef]
  39. Singhaphan, P.; Unob, F. Thread-based platform for nitrite detection based on a modified Griess assay. Sens. Actuators B Chem. 2021, 327, 128938. [Google Scholar] [CrossRef]
  40. Choodum, A.; Tiengtum, J.; Taweekarn, T.; Wongniramaikul, W. Convenient environmentally friendly on-site quantitative analysis of nitrite and nitrate in seawater based on polymeric test kits and smartphone application. Spectrochim. Acta A Mol. Biomol. Spectrosc. 2020, 243, 118812. [Google Scholar] [CrossRef]
  41. Zhang, X.; Wang, H.; Fu, N.-N.; Zhang, H.-S. A fluorescence quenching method for the determination of nitrite with Rhodamine 110. Spectrochim. Acta A Mol. Biomol. Spectrosc. 2003, 59, 1667–1672. [Google Scholar] [CrossRef]
  42. Tantinantrakun, A.; Thompson, A.K.; Terdwongworakul, A.; Teerachaichayut, S. Assessment of Nitrite Content in Vienna Chicken Sausages Using Near-Infrared Hyperspectral Imaging. Foods 2023, 12, 2793. [Google Scholar] [CrossRef]
  43. Cian, F.; Marconcini, M.; Ceccato, P. Normalized Difference Flood Index for rapid flood mapping: Taking advantage of EO big data. Remote Sens. Environ. 2018, 209, 712–730. [Google Scholar] [CrossRef]
  44. Aini Rahmi, M.A.; Parikesit, P.; Withaningsih, S. Vegetation change analysis using Normalized Difference Vegetation Index (NDVI) in Sumedang Regency. E3S Web Conf. 2024, 495, 02007. [Google Scholar] [CrossRef]
  45. Chanu, O.R.; Savitha, R.; Kapoor, A.; Gopalakrishnan, S.; Karthik, V.; Pushpavanam, S. A Facile Colorimetric Sensor for Sensitive Detection of Nitrite in the Simulated Saliva. Sens. Imaging 2024, 25, 16. [Google Scholar] [CrossRef]
  46. Everingham, M.; Van Gool, L.; Williams, C.K.I.; Winn, J.; Zisserman, A. The pascal visual object classes (VOC) challenge. Int. J. Comput. Vis. 2010, 88, 303–338. [Google Scholar] [CrossRef]
Figure 1. The custom-built multispectral camera (MSC) system. The figure displays (left) a 3D rendering of the device housing, (middle) a front view showing the internal imaging components including the camera, filter wheels, and halogen lamps, and (right) a rear view showing the electronic control unit composed of the Raspberry Pi and motor driver.
Figure 1. The custom-built multispectral camera (MSC) system. The figure displays (left) a 3D rendering of the device housing, (middle) a front view showing the internal imaging components including the camera, filter wheels, and halogen lamps, and (right) a rear view showing the electronic control unit composed of the Raspberry Pi and motor driver.
Sensors 25 07323 g001
Figure 2. Chemical reaction schematic diagram of the Griess reaction for the determination of sodium nitrite, showing the formation of a diazo-dye from the reaction between PABA and NED in acidic conditions (HCl pH 1) on the cellulose fiber sample pads [21].
Figure 2. Chemical reaction schematic diagram of the Griess reaction for the determination of sodium nitrite, showing the formation of a diazo-dye from the reaction between PABA and NED in acidic conditions (HCl pH 1) on the cellulose fiber sample pads [21].
Sensors 25 07323 g002
Figure 3. The comparison of sodium nitrite measurement results using PABA-NED and SA-NED: (a) The UV-VIS absorbance spectrum of standard solution using PABA-NED; (b) Standard curve of PABA-NED using maximum absorbance at 545 nm (R2 = 0.993); (c) The UV-VIS absorbance spectrum of standard solution using SA-NED; (d) Standard curve of SA-NED using maximum absorbance at 540 nm (R2 = 0.996).
Figure 3. The comparison of sodium nitrite measurement results using PABA-NED and SA-NED: (a) The UV-VIS absorbance spectrum of standard solution using PABA-NED; (b) Standard curve of PABA-NED using maximum absorbance at 545 nm (R2 = 0.993); (c) The UV-VIS absorbance spectrum of standard solution using SA-NED; (d) Standard curve of SA-NED using maximum absorbance at 540 nm (R2 = 0.996).
Sensors 25 07323 g003
Figure 4. Specificity test results of the PABA-NED method: (a) UV-VIS absorption spectra comparing sodium nitrite (1 and 10 ppm) and sodium nitrate, sodium carbonate, potassium nitrate at a concentration of 10 ppm; (b) Bar chart comparing the maximum absorbance at 545 nm and the color photograph of the actual solution (inset) after the reaction.
Figure 4. Specificity test results of the PABA-NED method: (a) UV-VIS absorption spectra comparing sodium nitrite (1 and 10 ppm) and sodium nitrate, sodium carbonate, potassium nitrate at a concentration of 10 ppm; (b) Bar chart comparing the maximum absorbance at 545 nm and the color photograph of the actual solution (inset) after the reaction.
Sensors 25 07323 g004
Figure 5. (a) The raw multispectral images (nine spectral bands) and the combined RGB image (constructed from the 475 nm, 550 nm, and 670 nm bands); (b) Ground-truth image defining the regions of interest (ROIs) with known sodium nitrite concentrations; (c) The spectral curves showing the mean intensity of each concentration region plotted against the different spectral bands (wavelengths).
Figure 5. (a) The raw multispectral images (nine spectral bands) and the combined RGB image (constructed from the 475 nm, 550 nm, and 670 nm bands); (b) Ground-truth image defining the regions of interest (ROIs) with known sodium nitrite concentrations; (c) The spectral curves showing the mean intensity of each concentration region plotted against the different spectral bands (wavelengths).
Sensors 25 07323 g005
Figure 6. Correlation analysis summary for the nine spectral bands: (a) Coefficient of Determination (R2) and (b) Pearson Correlation Coefficient (r).
Figure 6. Correlation analysis summary for the nine spectral bands: (a) Coefficient of Determination (R2) and (b) Pearson Correlation Coefficient (r).
Sensors 25 07323 g006
Figure 7. Analysis and validation of the Normalized Difference Index (NDI): (a) The computed NDI image, derived from the 550 nm and 940 nm bands; (b) Linear regression fitting for the strongly correlated 550 nm band; (c) Linear regression fitting for the weakly correlated 940 nm band; (d) Linear regression plot for the NDI, demonstrating an enhanced correlation with sodium nitrite concentration compared to the best single band.
Figure 7. Analysis and validation of the Normalized Difference Index (NDI): (a) The computed NDI image, derived from the 550 nm and 940 nm bands; (b) Linear regression fitting for the strongly correlated 550 nm band; (c) Linear regression fitting for the weakly correlated 940 nm band; (d) Linear regression plot for the NDI, demonstrating an enhanced correlation with sodium nitrite concentration compared to the best single band.
Sensors 25 07323 g007
Figure 8. Validation of the correlation analysis using the SA-NED substrate: (a) Linear regression fitting for the best single-correlated band (550 nm); (b) Linear regression fitting for the NDI (computed using the 550 nm and 940 nm bands), showing an enhanced correlation.
Figure 8. Validation of the correlation analysis using the SA-NED substrate: (a) Linear regression fitting for the best single-correlated band (550 nm); (b) Linear regression fitting for the NDI (computed using the 550 nm and 940 nm bands), showing an enhanced correlation.
Sensors 25 07323 g008
Figure 9. Validation of the correlation analysis across different lighting conditions by varying illumination voltages (3.5 V, 4.0 V, and 4.5 V): (a,c,e) Linear regression fitting for the best single-correlated band (550 nm) at 3.5 V, 4.0 V, and 4.5 V, respectively; (b,d,f) Linear regression fitting for the NDI (computed using the 550 nm and 940 nm bands) at 3.5 V, 4.0 V, and 4.5 V, respectively.
Figure 9. Validation of the correlation analysis across different lighting conditions by varying illumination voltages (3.5 V, 4.0 V, and 4.5 V): (a,c,e) Linear regression fitting for the best single-correlated band (550 nm) at 3.5 V, 4.0 V, and 4.5 V, respectively; (b,d,f) Linear regression fitting for the NDI (computed using the 550 nm and 940 nm bands) at 3.5 V, 4.0 V, and 4.5 V, respectively.
Sensors 25 07323 g009aSensors 25 07323 g009b
Figure 10. Visual comparison of smartphone RGB imaging and the MSI: (ac) Decomposed smartphone channels showing (a) red, (b) green, and (c) blue; (d) original RGB image; (e) NGI image computed from the smartphone RGB data; (f) NDI image generated using the MSI system (computed using the 550 nm and 940 nm bands).
Figure 10. Visual comparison of smartphone RGB imaging and the MSI: (ac) Decomposed smartphone channels showing (a) red, (b) green, and (c) blue; (d) original RGB image; (e) NGI image computed from the smartphone RGB data; (f) NDI image generated using the MSI system (computed using the 550 nm and 940 nm bands).
Sensors 25 07323 g010
Figure 11. Correlation analysis of sodium nitrite concentration on the PABA-NED substrate for: (a) red channel, (b) green channel, and (c) blue channel of the smartphone RGB image; (d) NGI image computed from the smartphone RGB data; (e) NDI image generated using the MSI system (using the 550 nm and 940 nm bands); and (f) summary bar chart comparing the R2 values, demonstrating the superior performance of the MSI-based NDI over all smartphone-based approaches.
Figure 11. Correlation analysis of sodium nitrite concentration on the PABA-NED substrate for: (a) red channel, (b) green channel, and (c) blue channel of the smartphone RGB image; (d) NGI image computed from the smartphone RGB data; (e) NDI image generated using the MSI system (using the 550 nm and 940 nm bands); and (f) summary bar chart comparing the R2 values, demonstrating the superior performance of the MSI-based NDI over all smartphone-based approaches.
Sensors 25 07323 g011aSensors 25 07323 g011b
Figure 12. The ground-truth image showing the arrangement of the five sodium nitrite samples used in the processing pipeline, with concentrations of 0, 5, 20, 55, and 80 ppm arranged from top to bottom.
Figure 12. The ground-truth image showing the arrangement of the five sodium nitrite samples used in the processing pipeline, with concentrations of 0, 5, 20, 55, and 80 ppm arranged from top to bottom.
Sensors 25 07323 g012
Figure 13. The NDI-based image processing and classification pipeline: (a) The calculated NDI image, computed from the 550 nm and 940 nm bands after noise reduction; (b) Segmentation result after applying an NDI threshold (0.12) to remove the background and 0 ppm sample; (c) The four segmented sample regions after morphological cleaning; (d) A plot of the mean NDI value calculated for each of the four segmented regions; (e) The final classification map showing the four concentration levels (Low, Medium, High, Very High) based on defined NDI thresholds.
Figure 13. The NDI-based image processing and classification pipeline: (a) The calculated NDI image, computed from the 550 nm and 940 nm bands after noise reduction; (b) Segmentation result after applying an NDI threshold (0.12) to remove the background and 0 ppm sample; (c) The four segmented sample regions after morphological cleaning; (d) A plot of the mean NDI value calculated for each of the four segmented regions; (e) The final classification map showing the four concentration levels (Low, Medium, High, Very High) based on defined NDI thresholds.
Sensors 25 07323 g013
Figure 14. The final visualization of the classification results showing object detection boxes with their corresponding class labels overlaid on the image for interpretation.
Figure 14. The final visualization of the classification results showing object detection boxes with their corresponding class labels overlaid on the image for interpretation.
Sensors 25 07323 g014
Figure 15. Intersection over Union (IoU) scores for each class, demonstrating a mean IoU (mIoU) of 80.10%.
Figure 15. Intersection over Union (IoU) scores for each class, demonstrating a mean IoU (mIoU) of 80.10%.
Sensors 25 07323 g015
Table 1. Specifications of the bandpass filters used in the MSI system.
Table 1. Specifications of the bandpass filters used in the MSI system.
Bandpass FiltersCWLFWHMModel/Part No.Manufacturers
UV360 nm~40 nmBP360HuaTeng Vision, Shenzhen, China
Blue475 nm~18 nmBP475Nano Macro Optics Co., Ltd., Shenzhen, China
Green550 nm~22 nmBP550Nano Macro Optics Co., Ltd., Shenzhen, China
Red670 nm~26 nmBP670Nano Macro Optics Co., Ltd., Shenzhen, China
Red Edge710 nm~12 nmBP710Nano Macro Optics Co., Ltd., Shenzhen, China
NIR800 nm~30 nmBP800Nano Macro Optics Co., Ltd., Shenzhen, China
NIR808 nm~40 nmBP808HuaTeng Vision, Shenzhen, China
NIR850 nm~40 nmFS03-BP850HuaTeng Vision, Shenzhen, China
NIR940 nm~40 nmFS03-BP940HuaTeng Vision, Shenzhen, China
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kataphiniharn, C.; Unsuree, N.; Janchaysang, S.; Lumjeak, S.; Tulyananda, T.; Wangkham, T.; Srichola, P.; Nithiwutratthasakul, T.; Chattham, N.; Phanphak, S. Portable Multispectral Imaging System for Sodium Nitrite Detection via Griess Reaction on Cellulose Fiber Sample Pads. Sensors 2025, 25, 7323. https://doi.org/10.3390/s25237323

AMA Style

Kataphiniharn C, Unsuree N, Janchaysang S, Lumjeak S, Tulyananda T, Wangkham T, Srichola P, Nithiwutratthasakul T, Chattham N, Phanphak S. Portable Multispectral Imaging System for Sodium Nitrite Detection via Griess Reaction on Cellulose Fiber Sample Pads. Sensors. 2025; 25(23):7323. https://doi.org/10.3390/s25237323

Chicago/Turabian Style

Kataphiniharn, Chanwit, Nawapong Unsuree, Suwatwong Janchaysang, Sumrerng Lumjeak, Tatpong Tulyananda, Thidarat Wangkham, Preeyanuch Srichola, Thanawat Nithiwutratthasakul, Nattaporn Chattham, and Sorasak Phanphak. 2025. "Portable Multispectral Imaging System for Sodium Nitrite Detection via Griess Reaction on Cellulose Fiber Sample Pads" Sensors 25, no. 23: 7323. https://doi.org/10.3390/s25237323

APA Style

Kataphiniharn, C., Unsuree, N., Janchaysang, S., Lumjeak, S., Tulyananda, T., Wangkham, T., Srichola, P., Nithiwutratthasakul, T., Chattham, N., & Phanphak, S. (2025). Portable Multispectral Imaging System for Sodium Nitrite Detection via Griess Reaction on Cellulose Fiber Sample Pads. Sensors, 25(23), 7323. https://doi.org/10.3390/s25237323

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop