1. Introduction
Understanding the water movement and particle transport in the ocean and rivers is crucial for giving a fast response to environmental disasters. Although numerous mathematical models predict how these agents are transported, they often come with high computational costs and may not be adaptable to the highly variable conditions encountered in real-world scenarios, limiting their effectiveness for quick responses [
1]. Thus, to understand and track hazardous agents in oceans and waterways, new techniques and tools are necessary [
2].
Dye tracers offer a simpler and effective solution. They are widely used to study the transport and dispersion of particles in aqueous environments, such as in the ocean [
3], coastal areas [
4,
5], rivers [
6], and lakes [
7]. Rhodamine is a synthetic dye commonly used as a tracer in environmental studies due to its distinctive colour and high visibility. Its applications include monitoring water flow, tracking pollutant dispersion, and studying hydrodynamic processes in aquatic environments. Rhodamine is a key tool for understanding complex water movement and contamination patterns. Current methods of measuring rhodamine concentration involve collecting samples for later laboratory analysis [
8] or using fluorimeters for in situ measurements [
9]. However, these techniques are costly and spatially limited, capturing information only at the local levels [
10]. In this context, aerial and near-field remote sensing emerges as a promising alternative, offering greater spatial coverage than traditional in situ sampling methods [
11].
Multispectral and hyperspectral remote sensing have proven to be effective in detecting and mapping the concentrations of dye tracers in aquatic environments [
12]. Several studies successfully utilized multispectral and hyperspectral sensors onboard piloted aerial platforms to identify rhodamine, also in diverse aquatic environments, including the ocean [
13,
14,
15], coasts [
16], rivers [
10,
17], and lakes [
1]. Some studies focused on comparing the intensity of RGB images [
18,
19], while others utilized hyperspectral sensors to capture surface reflectance [
20]. Combining spectral technology with the emerging use of uncrewed aerial vehicles (UAVs) allows for conducting studies in much detail, with greater flexibility and detecting patterns at sub-meter resolution [
12]. In addition, the development of lighter and more specialized optical sensors represents an opportunity to have a sensor with specialized spectral bands for rhodamine detection and concentration estimation at a low price [
21].
Despite these advancements, several knowledge gaps remain. The widely used Optimum Band Ratio Analysis (OBRA) [
10,
22] method for selecting bands in hyperspectral and multispectral sensors to detect rhodamine requires in situ concentration measurements for calibration, limiting its transferability to different locations. Furthermore, most rhodamine studies are conducted in controlled environments, such as experimental channels, water tanks, or deep lakes, where the impact of background reflections is minimized (optically deep waters) [
12]. Only a few studies have analyzed real-world scenarios, such as rivers with varying degrees of turbidity or optically shallow waters where the bottom reflects light [
12,
22]. The optical characterization of rhodamine in aquatic environments presents several challenges, especially in coastal areas, shallow rivers or turbid environments. As a semi-transparent solution, its spectral signature captured by sensors is influenced by the optical properties of suspended components and background reflections. However, more in-depth work is needed to understand the effect of water properties and bottom reflections of optically shallow waters on rhodamine’s spectral signature and the transferability of detection models across varied conditions.
In this study, we conducted experiments to measure rhodamine concentrations with the goal of improving detection methods. We first spectrally analyzed the rhodamine in the laboratory with different backgrounds and water types. Using artificial intelligence algorithms, specifically Sequential Feature Selection (SFS) and Random Forest (RF) models, we identified the key spectral bands for rhodamine detection and concentration estimation. We then evaluated the transferability of these bands and the trained classifiers across different water types and backgrounds. This approach aimed to minimize the need for in situ calibration and enhance the robustness of detection models.
In our paper, we present the identification of key spectral bands for rhodamine estimation, the influence of background types on spectral signatures, and the transferability of detection models. We found that combining all samples to train the classification model, and also applying the first derivative [
23] to favor the distinction of spectral signatures, improved the transfer of the models to all samples. These findings provide valuable insights for developing effective and affordable remote sensing tools to monitor rhodamine and, by extension, other pollutants in aquatic environments, especially in optically shallow waters. This research is particularly significant, as it supports the development of low-cost, multispectral cameras for environmental monitoring, contributing to more efficient and scalable pollution reduction strategies.
2. Materials and Methods
The methodology followed in this experiment can be divided into preparing the rhodamine samples, performing their spectral analysis, and employing the band selection methodology for classifying rhodamine concentrations. Rhodamine samples were prepared in beakers with distilled and seawater at concentrations of 1 mg/L, 15 mg/L, and 30 mg/L. The spectral signatures of samples on two different backgrounds were obtained with hyperspectral cameras. The spectral signatures of each concentration were provided to the band selection algorithm to obtain the most influential bands for classifying the rhodamine concentration.
2.1. Rhodamine Samples
The Rhodamine Water Tracer, hereafter referred to as rhodamine, is a fluorescent dye primarily used as a tracer in aquatic environments. The company Elittoral [
24] from Las Palmas de Gran Canaria, Spain, has procured the rhodamine from ThermoFisher Scientific [
25] from Massachusetts, USA, identified by the chemical codes CAS 37299-86-8 and 7732-18-5, with catalogue number 446971000. Initially, the rhodamine is highly concentrated at 20%, or 200 g/L, requiring dilution in water to achieve an appropriate concentration for its discharge into the sea. The beakers are from Labbox [
26] in Barcelona, Spain, reference BKT3-250-012. They have a measurable volume of 250 mL, an outer diameter of 60 mm, and a height of 123 mm. When the beaker is filled with 250 mL of liquid, the height of the fluid will be 100 mm.
This study uses 250 mL solutions of seawater and distilled water with varying concentrations of rhodamine provided by Elittoral. Solutions with different concentrations of rhodamine are produced: 1 mg/L, 15 mg/L, and 30 mg/L (
Figure 1). In addition to the rhodamine dilutions, pure seawater and distilled water samples are also included in the study. These pure samples serve as reference spectra and are essential for the comparative analysis of rhodamine-contaminated samples.
Hyperspectral signatures of all samples were collected over two different backgrounds. Since the rhodamine solutions are semi-transparent, the background signature likely influences the signature captured by the sensor. We placed two backgrounds underneath the beaker to observe these differences: a white sheet of paper as the light background and a low-reflective black foam material [
27] as the dark background.
2.2. Hyperspectral Setup
We took images of the rhodamine samples in the Hyperspectral Laboratory at IUMA [
27] in Las Palmas de Gran Canaria, Spain. The system shown in
Figure 2 aims to acquire images with pushbroom hyperspectral cameras. It includes a motorized linear stage for linear motion and a light source emitting uniformly. Illumination comes from a 150 W Quartz Tungsten-Halogen (QTH) lamp with broadband emission between 400 nm and 2500 nm (VIS and NIR spectral range). Images were captured using a Specim FX10 camera (Konica Minolta Company, Oulu, Finland) [
28]. The FX10 is a hyperspectral camera covering the visible and near-infrared range (VNIR) from 400 nm to 1000 nm, with 224 bands, a spectral resolution of 5.5 nm, a spatial sampling of 1024 pixels, and a field of view (FoV) of 38 degrees. This spectral range was chosen because rhodamine has the greatest response in the VNIR.
We performed single-point reflectance calibration (Equation (
1)) before starting measurements to avoid sensor saturation. This pre-processing involves white and dark (0-photon) references to calculate the reflectance of each pixel from its radiance. The white reference is a high-reflectance Zenith Polymer [
29], and the dark reference is obtained by covering the camera lens:
The measurements are taken by scanning the FX10 camera over the different beakers. Since the light source is positioned ahead of the camera as shown in
Figure 2, this setup produces glints on the beaker, shadows in certain areas, and increased intensity in others due to internal reflections and external refractions of the glass.
The datasets used for the artificial intelligence model are generated by extracting pixels from the bottom areas of the beaker where no glints are present, while avoiding shadows. However, due to the varying brightness within the beaker, the standard deviation of the classes will be high, indicating variation in intensity, though not in the shape of the spectral signature. The number of pixels per class will not be uniform, as shown in
Table 1.
Efforts have been made to balance the glints and shadowed areas within the beaker. However, the primary goal of this study was to develop a generalizable classifier, and having data with variability is advantageous, as it better reflects the reality of experimental conditions.
2.3. Methodology
The methodology is divided into training, result analysis, and transfer (
Figure 3). During training, data are provided to the band selection model. This model provides evaluation metrics, which are analyzed to determine the optimal number of bands. The band selection model [
30] also identifies the best bands and provides pre-trained classifiers for the optimal number of bands. The final stage involves transferring the best bands and pre-trained models to other scenarios to assess their performance and determine if the classifier is generalizable.
The methodology integrates hyperparameterized classifiers with feature selectors to provide optimized bands of interest for classification [
30]. The procedure is illustrated in
Figure 4. The data are divided into training sets for the feature selectors and classifiers, as well as a validation set. Employing the information provided by the classifiers, the feature selectors determine the bands of interest. Subsequently, the classifiers are retrained exclusively with these bands. Finally, the performance of the updated classifiers is assessed using the validation dataset to obtain classification metrics.
For this study, we combined two feature selectors, Sequential Feature Selector (SFS) and Select From Model (SFM) [
31], with three classifiers, Random Forest (RF) [
32], Logistic Regression (LR) [
33], and Linear Support Vector Machine (SVM) [
34]. SFS is a sequential search technique that iteratively adds or removes features to improve the classifier’s performance. SFM ranks features based on a model’s coefficients or importance, facilitating the selection of efficient feature subsets [
31]. RF is a widely used classifier, employing ensemble learning to combine predictions from multiple decision trees [
35]. LR is a linear model for binary classification [
36]. Linear SVM identifies hyperplanes for optimal class separation [
37].
We evaluated the performance of rhodamine concentration classification using the classification metrics on the validation dataset. The overall accuracy (OAC), also called accuracy, represents the proportion of correct predictions out of the total samples [
38]. The F1 score is particularly useful with imbalanced class distributions, as it emphasizes the accuracy of the smaller classes [
39]. The Kappa statistic (
) measures inter-rater agreement for categorical items, adjusting for chance agreement, and is particularly relevant for uneven datasets [
40]. The confusion matrix provides a detailed decomposition of predicted classification labels versus real labels [
41].
The performance of all pairs of feature selectors and classifiers was evaluated for different numbers of bands of the FX10 camera [
28]. By plotting the accuracy values for each band on a graph, we were able to use the elbow method [
42] to determine the optimal number of bands. This method selects the number of bands at the point where the curve bends, forming an elbow and indicating a slowdown in accuracy improvement [
42]. For the optimal number of bands, all classification metrics were calculated.
We also analyzed whether the different feature selector–classifier pairs identify the optimal bands in the same area of the electromagnetic spectrum. For this purpose, we grouped the wavelengths into sections of 25 nm wide for several reasons. First, the spectral signatures of different concentrations of rhodamine are continuous and do not exhibit abrupt changes, making it practical to group the wavelengths for better visualization of large-scale behavior. Second, grouping the bands helps us understand their potential utility in multispectral sensors. The hyperspectral camera used in this study has a spectral resolution of 5.5 nm [
28], so it is appropriate to group them, given that multispectral sensors typically have a bandwidth of approximately 20 nm or 30 nm. Third, several studies support that a high level of spectral detail is unnecessary for rhodamine detection, indicating that sensors with broader bands could still provide reliable concentration estimates [
20,
22].
Finally, we can assess the transferability of the results to different scenarios. We can define different levels of transfer, such as the transfer of the bands of interest or the transfer of pre-trained classification models. Transferring the bands of interest is a straightforward way to transmit part of the knowledge acquired from one sample to another. It involves using the bands identified by the classification model in one scenario to train the classifier (exclusively with those wavelengths) with another scenario, whether it has a different type of water or a different background.
Transferring pre-trained classification models is more complex because these models learn the specific characteristics of each scenario, i.e., the reflectance value of the spectral signature. One strategy that can be employed to improve the transfer of pre-trained models is to provide the classifier with a combination of samples from all types of water and backgrounds for training. Another strategy is calculating the first derivative of the spectral signatures, which helps identify variations and trends in the data, thereby aiding in the differentiation of spectral signatures.
If the spectral behavior is similar enough across different scenarios, it is possible to successfully transfer the models, and the classifiers can be used in multiple scenarios without retraining. This would decrease the required in situ calibration measurements and reduce computational time.
4. Discussion
Significant differences were observed in the spectral response of samples with light and dark backgrounds in
Section 3.2, with discrepancies of nearly 0.5 reflectance units. Small differences were observed based on the water type, but they are not sufficiently representative (between 0.1 and 0.3) to determine their influence. A curve around 810 nm appeared in all samples, consistent with studies [
12,
22], likely due to a local minimum in liquid water absorption common in shallow waters. The spectral regions most affected by rhodamine concentration were between 550 nm and 650 nm and from 400 nm to 500 nm, independently of the sample. These results aligned with the findings of Clark et al. [
11], who observed that upwelling spectral radiance from a water body containing dye decreases in the green portion of the visible spectrum (530–570 nm) due to dye absorption and increases in the red and near-infrared wavelengths (570–750 nm) due to dye reflectance. It should be noted that the influence of the 400 to 500 nm range is affected by the scene’s illumination and the scattering properties of the water and the background. In our case study, this range is particularly impacted by the high reflectance caused by the reflections from the beaker.
The use of classifiers demonstrated high accuracy in differentiating rhodamine concentrations and determining that the optimal number of bands for the classification is two (
Section 3.3). Classifiers combined with the SFS feature selector yielded more satisfactory results than SFM, with all classification metrics exceeding 90%. Several samples even achieved 100% accuracy, indicating that all pixels in the validation subset were correctly classified. These results were expected, as the dataset consists of controlled samples measured in a laboratory setting, with a limited number of pixels. This dataset will be extended to include more variability in future work, leading to more realistic classification metrics.
The study identified that for all the samples, the two most influential spectral bands were consistently within the 400–500 nm and 550–650 nm regions, corresponding to the regions identified in the spectral analysis of
Section 3.2. We combined the bands identified by the best models (SFS + RF, LR, and SVM) to obtain enough data to determine if any patterns emerged in the bands of interest. A notable difference was observed between samples with light and dark backgrounds regardless of water type. Specifically, the 400–500 nm wavelengths are more relevant on light backgrounds, while the 550–650 nm range is more influential on dark backgrounds. This is a direct consequence of the background’s influence and the rhodamine’s semi-transparency, which is more critical on dark backgrounds due to lower reflection.
Transferring the results is a crucial phase of the study, as one of the primary objectives is to estimate the rhodamine concentration without specific scene calibration (
Section 3.4). The successful transfer of bands of interest determined from one sample to another demonstrated that band transfer is feasible. The transfer of pre-trained models has been highly effective among light background samples, achieving an accuracy exceeding 95%. Nevertheless, the transfer of models between samples with different background types was not as effective, which was expected, given the difference in spectral areas of interest between light and dark backgrounds analyzed in
Section 3.3. Also, the spectral range between 600 nm and 650 nm was both an area of interest for the classifiers and a region of significant discrepancy between the spectral signatures of distilled and seawater as shown in
Section 3.2. This discrepancy further complicated the transfer between water types.
To overcome the impediments in model transfer caused by background reflectance differences and spectral signature variations due to water type, two essential measures were implemented: training the classifier with samples from different backgrounds and water types, and calculating the first derivative. When applying this approach, accuracy surpassed 85% in all cases except for the distilled light sample (50%). The optimal bands were between 580 and 610 nm. The primary difficulty improved by the first derivative was the differentiation between the 15 mg/L and 30 mg/L concentrations, as the reflectance of the 30 mg/L samples on dark backgrounds decreased, making it resemble the 15 mg/L samples on light backgrounds. This approach in
Section 3.4.3 prevented overfitting in the classifier and highlighted variations in the spectral trends, improving the generalizability of the models.
This new proposed methodology can achieve a generalizable model that overcomes the limitations of current models. Clark et al. [
11] show that band ratio linearity with rhodamine concentration becomes nonlinear above 0.03 mg/L, a problem that our method overcomes. Additionally, the Optimum Band Ratio Analysis (OBRA) [
20], the most widely used method for determining rhodamine concentration, still requires on-site calibration for each specific scenario. Furthermore, the identified spectral areas of interest (400–500 nm and 550–650 nm) and the transfer of models had direct applications in the design and optimization of multispectral cameras [
21]. These findings can be integrated into existing camera systems to enhance the detection and quantification of dye concentrations, which is crucial for applications such as tracking pollutant dispersion in water bodies.
Another approach to consider is radiative transfer models (RTMs), such as Hydrolight [
43], which simulate light propagation through water and provide insights into environmental factors like depth, bottom types, and constituent concentrations. These models can be useful for predicting the behavior of substances like rhodamine in various aquatic environments, but they rely on precise input parameters that may not fully capture real-world complexity [
44]. While complementary to laboratory measurements, which offer controlled and empirical data, RTMs may struggle with the complexity of optically shallow environments, where factors like bottom reflectance and water column effects introduce significant variability [
2]. Given these challenges, we chose to rely on laboratory measurements combined with artificial intelligence models in our study. This approach allowed us to more effectively manage the inherent variability and complexity of optically shallow environments, providing a more robust and generalizable method for detecting and analyzing rhodamine in such settings.
Our study presents an exhaustive spectral analysis of different water types and backgrounds to improve the identification of various rhodamine concentrations. The key findings reveal significant spectral discrepancies based on the background type, highlighting the importance of considering background reflectivity in optically shallow waters. The transfer of bands of interest was successful, ensuring that multispectral cameras with a few bands can effectively determine rhodamine concentration. Additionally, training the classification model with combined samples and applying the first derivative enabled the successful transfer of pre-trained classification models. This advancement aimed to develop a classifier that works in several scenarios without the need for on-site calibration, bringing us one step closer to improving the remote detection of dye in aquatic environments.
Future research should focus on further refining the classification models by incorporating more diverse sample types and environmental conditions. Additionally, there is an interest in testing the implementation of a regressor to estimate rhodamine concentration and conducting experiments with lower concentrations in real-world scenarios. Exploring advanced machine learning techniques and integrating them with hyperspectral imaging can provide deeper insights and better transference. Expanding the spectral analysis to include other fluorescent dyes and pollutants can broaden the applicability of this research. Moreover, the development of real-time monitoring systems using these enhanced models could significantly benefit environmental monitoring, pollution control, and water quality assessment.
5. Conclusions
This study provided new insights into the generalization of spectral semi-transparent solutions detection across different water types and backgrounds. The spectral analysis identified relevant regions for rhodamine classification between 400 nm and 500 nm, and 550 nm and 600 nm, related to solution concentration. These wavelengths are commonly found in sensors and satellites such as Landsat 8 [
45], Sentinel-2 [
46], and WorldView-2 [
47]. The significant differences observed between samples on dark and light backgrounds, especially with maximum reflectance captured, underscore the necessity of the spectral characterization of backgrounds when using rhodamine in optically shallow waters.
The classification results are promising, indicating the feasibility of transferring classification results with high accuracy, especially when integrated with the SFS feature selector. Our study identified the two most influential spectral bands consistently within the 400–500 nm and 550–650 nm regions for all samples, correlating with regions identified in the spectral analysis. While the transfer of spectral bands was successful (>80%), the transfer of trained models was only successful among light background samples. To improve these results, a model was trained by combining all samples to avoid overfitting, and applying the first derivative to enhance the identification of variations in the spectral signature. As a result, accuracy surpassed 85% in all cases except for the distilled light sample, where the concentrations of 15mg/L and 30mg/L were misclassified.
Therefore, the transfer of pre-trained classifiers between different backgrounds is feasible. This would potentially eliminate the need for on-site calibration each time rhodamine dispersion is studied in aquatic environments, saving materials and providing a generalizable classifier. Future research will focus on extending the dataset to include more variability and backgrounds, exploring the practical applicability of the models in outdoor scenarios. This expansion will ensure that the model can accurately generalize across diverse aquatic environments. By doing so, we can advance towards establishing standardized protocols for remote sensing and monitoring solutions dispersion, facilitating broader applications in environmental monitoring and water dynamics.