Abstract
BACKGROUND
Non‐destructive assessment of tomato internal quality, including soluble solids content (SSC) and firmness, is important for grading and postharvest management. However, the varying capabilities of reflectance and transmittance hyperspectral imaging for predicting biochemical and mechanical quality attributes have not been sufficiently compared.
RESULTS
In this study, a dual‐mode hyperspectral imaging system covering 500–950 nm was developed to evaluate SSC and firmness in 160 ‘Yuan Wei No. 1’ tomatoes. Four preprocessing methods, including Savitzky–Golay smoothing (SG), standard normal variate (SNV), multiplicative scatter correction (MSC), and orthogonal signal correction (OSC), and three feature‐wavelength selection strategies, including uninformative variable elimination (UVE), competitive adaptive reweighted sampling (CARS), and UVE–CARS, were compared using partial least squares regression. Transmittance spectra outperformed reflectance spectra for SSC prediction. The CARS filtered transmittance model achieved the best performance, with R p = 0.9256 and residual predictive deviation (RPD) = 2.4208. Firmness prediction was less accurate; the best model was obtained using reflectance spectra combined with SG–SNV preprocessing and UVE–CARS feature selection, yielding R p = 0.8008 and RPD = 1.6696.
CONCLUSION
Dual‐mode hyperspectral imaging is effective for non‐destructive SSC prediction in tomatoes, whereas firmness prediction remains limited because mechanical quality attributes are less directly represented by visible–near‐infrared spectral information. The results provide a basis for tomato quality assessment and suggest that future firmness prediction may benefit from multi‐modal data fusion. © 2026 Society of Chemical Industry.
Keywords: tomato, hyperspectral imaging, soluble solids content (SSC), firmness, non‐destructive detection
INTRODUCTION
Tomato is one of the most widely consumed horticultural crops worldwide owing to its nutritional value, sensory attributes, and economic significance. However, its quality fluctuates considerably during postharvest handling and distribution, driven by environmental conditions, storage duration, and cultivar characteristics. 1 Commercial grading systems still rely predominantly on external traits, such as size, color, and surface appearance. These indicators, however, do not reliably represent internal quality attributes – particularly soluble solids content (SSC) and firmness – which directly influence flavor, texture, and consumer preference. 2 The lack of rapid, objective, and non‐destructive standards for these internal parameters remains a major constraint to the use of high‐precision grading technologies. 3
To overcome the limitations of purely visual evaluation, numerous non‐destructive sensing technologies – such as electronic noses, dielectric spectroscopy, and hyperspectral imaging (HSI) – have been explored for fruit quality assessment.4, 5, 6 Among these, HSI has attracted particular attention because it integrates spectral and spatial information, enabling simultaneous characterization of surface features and internal biochemical composition. 7 Hyperspectral methods have been applied successfully to estimate SSC, firmness, acidity, and moisture content in various fruits, including strawberries, apples, peaches, pears, and blueberries.8, 9, 10 Recent studies have further demonstrated the potential of HSI combined with deep learning for fruit quality evaluation, including quality‐parameter monitoring during jujube hot‐air drying, jujube variety differentiation using dual hyperspectral imaging, and discrimination of dried jujubes from fresh jujubes with different varieties and maturity levels.11, 12, 13 These studies indicate that HSI has strong potential for non‐destructive fruit quality assessment, while also suggesting that sample maturity, variety, acquisition mode, and modeling strategy can influence prediction performance significantly. However, hyperspectral imaging performance is influenced strongly by optical geometry. For fruits with high internal scattering, reflectance spectra are often dominated by surface reflection, whereas transmittance imaging is more sensitive to internal absorption features. 14 Despite this distinction, systematic comparisons of reflectance and transmittance modes for tomato‐quality prediction – especially for SSC and firmness – remain limited. 15
Tomato quality evolves substantially during storage and ripening: SSC generally increases due to conversion of starch to sugars, and firmness declines as a result of cell wall degradation and turgor loss. These biochemical and structural changes alter tissue absorption and scattering characteristics, producing distinct spectral responses under different imaging modes. Understanding how SSC and firmness interact with optical sensing is crucial for improving prediction accuracy and designing robust non‐destructive inspection systems.
Although previous research has demonstrated the potential of hyperspectral imaging for fruit quality assessment, 16 current studies often evaluate only one imaging mode, one quality parameter, or a limited set of preprocessing methods. 17 As a result, a comprehensive understanding of the ways in which optical geometry, spectral preprocessing, and feature‐wavelength selection jointly influence the prediction of tomato SSC and firmness is still lacking.18, 19 This limits the development of reliable, fast, and deployable non‐destructive grading systems for tomatoes. 20
The present study therefore systematically investigated the capability of reflectance and transmittance hyperspectral imaging (500–950 nm) to non‐destructively predict SSC and firmness in tomatoes from a single cultivar. Using 160 samples, multiple preprocessing methods – Savitzky–Golay smoothing (SG), multiplicative scatter correction (MSC), standard normal variate (SNV), and orthogonal signal correction (OSC)21, 22, 23, 24 – and three wavelength‐selection approaches – uninformative variable elimination (UVE), competitive adaptive reweighted sampling (CARS), and UVE–CARS25, 26, 27 – were applied to optimize spectral information.25, 26, 27 Partial least squares regression (PLSR)24, 28, 29 models were developed for each configuration. By comparing the performance across imaging modes, preprocessing strategies, and feature‐selection techniques, this study provided a detailed characterization of the spectral behavior of tomato biochemical and mechanical attributes. The results offer a quantitative foundation for developing high‐accuracy, non‐destructive tomato grading systems.
MATERIALS AND METHODS
Sample collection
One hundred and sixty ‘Yuan Wei No. 1’ tomatoes were selected as samples. They were purchased from an agricultural technology development base in Beijing (Daxing Siji Yangkun Agricultural Base, Beijing, China). This cultivar produces medium‐ to small‐sized fruits with a round shape, thin peel, firm and juicy flesh, and a balanced sweet and sour flavor with a pleasant aftertaste 30 and a distinctive tomato aroma. To ensure the accuracy of experimental data and minimize the impact of ripeness variations on SSC and firmness, tomatoes with similar commercial ripeness were selected based on their color and surface characteristics. Only fruits with uniform, rosy color, similar size, and no obvious mechanical damage or disease were selected. Prior to hyperspectral analysis and physicochemical testing, samples that were overripe, unevenly colored, or had surface defects were excluded. The tomatoes were stored for 24 h in an environment maintained at 20 °C and 60% relative humidity to minimize the interference of external environmental fluctuations on the experimental results.
Hyperspectral imaging system
Figure 1(A),(B) shows the hyperspectral imaging system employed in this study, which includes the SOC710VP hyperspectral imager (Surface Optics Corporation, USA). It included three main components: a computer for system control and data acquisition, the hyperspectral camera itself, and two 150 W SLS CL‐150 fiber‐optic halogen lamps (Techniquip, Pleasanton, CA, USA) serving as illumination sources. The system provided spectral coverage from 400 to 1000 nm, comprising 256 spectral bands with a resolution of 2.8 nm. Data acquisition is highly sensitive to ambient light interference, so the entire setup was enclosed with a blackout cloth during measurements.
Figure 1.

(A) Hyperspectral imaging transmittance system. (B) Hyperspectral imaging reflectance system.
Acquisition of hyperspectral image information
Prior to image acquisition, the hyperspectral system was preheated for 30 min to ensure stable performance and to minimize optical distortion. During reflectance imaging, the distance between the tomato apex and the camera lens was fixed at 25 cm, with halogen lamps illuminating the fruit surface at a 45° angle. For transmittance imaging, a custom platform with adjustable rings was used to secure tomatoes of varying sizes within circular apertures. The vertical distance between the fruit surface and the lens was maintained at 20 cm, and the transmittance light source was positioned 10 cm below the fruit base. To correct for spectral non‐uniformity and sensor dark current, raw hyperspectral images were calibrated using a standard white reference panel (99% reflectance). The calibrated reflectance, , was computed as:
| (1) |
where , , and represent the raw image, dark reference image, and white reference image, respectively. A hyperspectral image was acquired for each tomato sample under identical experimental conditions. The dark reference was collected by switching off the illumination and blocking the camera lens, whereas the white reference was obtained from a 99% reflectance calibration panel. All hyperspectral images were corrected using these white and dark references prior to further processing in MATLAB R2020a (MathWorks, Natick, MA, USA). Regions of interest (ROIs) corresponding to intact samples were manually delineated, and the mean spectrum within each ROI was extracted as the representative spectral signature. Spectral bands at both ends of the wavelength range that exhibited excessive noise were removed prior to analysis.
Reference measurement values
Measurement of SSC values
The tomatoes were juiced manually and the extract was filtered through cheesecloth. A few drops of the filtrate were placed on the prism of a digital refractometer (PAL‐1; Atago, Tokyo, Japan) to measure the SSC. Each sample was measured three times, and the mean value was reported.
Measurement of firmness values
Tomato firmness was measured with a texture analyzer (GY‐4; Aidebao, Suzhou, China) fitted with a 6 mm diameter probe. The probe penetrated the fruit at a constant speed of 1 mm s−1 to a depth of 10 mm. Four measurements were taken at different positions on the fruit apex and the mean value was used as the firmness index.
Sample segmentation and preprocessing
In this study, the Kennard–Stone (KS) algorithm was used to split 160 tomato samples into a calibration set (128 samples) and a validation set (32 samples) in a 4:1 ratio. This splitting method was applied to both reflectance and transmittance spectra to reduce bias caused by sample partitioning. This approach ensured that any observed differences in model performance were entirely attributable to the spectral acquisition mode and modeling method, rather than to uneven sample distribution. Savitzky–Golay smoothing 23 was applied to minimize noise and systematic errors during hyperspectral image acquisition. It was followed by further spectral preprocessing using a combination of MSC,22, 31 SNV, 21 and OSC. 32 The results of the four spectral preprocessing methods were compared, and the optimal preprocessing methods for reflectance and transmittance spectra were selected.
Selection of characteristic wavelengths
Hyperspectral data generally contain a large number of densely spaced wavelengths, many of which exhibit strong inter‐band collinearity leading to substantial redundancy within the full spectral matrix. Reducing this redundancy and isolating the most informative variables is therefore crucial to improve the robustness and computational efficiency of subsequent modeling. Three wavelength‐selection strategies were adopted in this study to address this issue: 25 UVE, 26 CARS,27, 33 and an integrated UVE–CARS approach.
Uninformative variable elimination identifies informative wavelengths by analyzing the stability of regression coefficients obtained from PLSR. By constructing a coefficient matrix and evaluating the magnitude and variability of individual coefficients, UVE removes variables that contribute little to the predictive model while retaining those carrying meaningful spectral information.
Competitive adaptive reweighted sampling uses a stochastic variable‐selection framework based on repeated Monte Carlo sampling. In each sampling iteration, a subset of calibration samples is randomly selected, and the proportion of retained wavelengths is reduced gradually according to an exponential decay function. This process enhances variables with strong and stable contributions while eliminating those with weak relevance. An additional adaptive weighting step further refines the selection, and the final subset is determined at the point where the cross‐validated root mean square error (RMSE) reaches its minimum, indicating the most informative spectral combination.
Partial least squares regression model
Partial least squares regression24, 28, 29 is a widely used multivariate calibration method that combines the strengths of multiple linear regression, principal component analysis, and canonical correlation analysis. Unlike the ordinary least squares approach, which often fails in the presence of strong multicollinearity or when the predictor dimension greatly exceeds the sample size, PLSR projects both the predictor matrix X and the response matrix Y into a latent variable space, where the covariance between the two is maximized. Mathematically, PLSR decomposes the predictor matrix X ∈ R n×p and response matrix Y ∈ Rn×φ as
| (2) |
where T and U are score matrices, P and Q are loading matrices, and E and F are residuals. The key objective of PLSR is to identify latent components t and u such that their covariance is maximized:
| (3) |
The regression model is established by linking the X scores (T) to the Y scores (U) through an inner relation, U = TB + H, where B is a regression coefficient matrix and H is the residual. Substituting this relation into the decompositions yields the final regression equation:
| (4) |
By iteratively extracting orthogonal latent variables, PLSR reduces dimensionality while retaining predictive information most strongly associated with the response variable. This makes it particularly effective for spectral modeling, where data are high‐dimensional and strongly collinear.
Model performance evaluation
The calibration correlation coefficient (R c), root mean square error of calibration (RMSEC), prediction correlation coefficient (R p), root mean square error of prediction (RMSEP), and residual predictive deviation (RPD) were used to compare and evaluate model performance.29, 34, 35 R c and R p reflect the degree of linear correlation between the predicted and actual values. Root mean square error of calibration and RMSEP indicate the deviations between predicted and actual values. A PLSR model that performs well is characterized by higher R c and R p values, along with lower RMSEC and RMSEP values. RPD is defined as the ratio of the standard deviation of the reference data to RMSEP. By accounting for both model prediction error and the intrinsic variability of the samples, RPD provides a more comprehensive evaluation of predictive performance. An RPD value greater than 2 is generally considered indicative of acceptable predictive accuracy.
Integrated software platform for spectral modeling
As Fig. 2 illustrates, this study independently developed a visualized spectral analysis platform based on Python and PyQt5 to achieve standardization and reproducibility in spectral data processing workflows. This software integrates a comprehensive analytical workflow encompassing data import, spectral visualization, preprocessing, feature wavelength screening, modeling, and prediction. Figure 3 shows the overall workflow of this interface, summarizing the sequential operations implemented within the graphical user interface. As the spectral modeling pipeline involves multiple sequential steps, manual execution of these processes may lead to inconsistent user operations. The graphical user interface ensures workflow reproducibility and reduces operator‐dependent variability. This is crucial for maintaining consistency in modeling experiments.
Figure 2.

Spectral modeling integration software interface.
Figure 3.

Spectral modeling integration software workflow.
The interface integrates multiple spectral preprocessing methods (SG, SNV, MSC, OSC) to enhance spectral quality and mitigate interference from illumination and physical variations. It also incorporates three feature wavelength screening algorithms (UVE, CARS, and UVE–CARS) to reduce multicollinearity and enhance model generalization capability. Kennard–Stone‐based sample set partitioning was used to ensure that the calibration and validation sets covered the main spectral variation of the samples across both transmittance and reflectance modes. The modeling module employed PLSR technology for latent variable optimization and modeling without requiring external libraries.
The system possesses predictive capabilities for unknown samples and supports batch data processing, meeting rapid quality assessment demands in practical scenarios. Real‐time display of modeling performance metrics (R c, R p, RMSEC, RMSEP, RPD) facilitates comparison between different preprocessing and feature‐selection strategies. This interface achieves visualization, standardization, and reusability of the spectral analysis workflow, providing technical support for the engineering application of spectral technology in fruit and vegetable quality inspection.
RESULTS AND DISCUSSION
Statistical analysis of SSC and firmness measurements
Table 1 presents the statistical characteristics of SSC and firmness under reflectance and transmittance spectral modes. Data for both modes were derived from the same batch of samples, with identical partitioning between calibration and validation sets. This ensures model performance discrepancies stem solely from spectral acquisition methods, rather than sample distribution variations.
Table 1.
Statistical data on soluble solids content (SSC) and firmness of tomatoes measured under two hyperspectral acquisition modes
| Parameter | Data set | Samples | Range | Mean | Standard deviation |
|---|---|---|---|---|---|
| SSC (g kg−1) | Total | 160 | 74–106.7 | 90.4 | 6.4 |
| Calibration | 128 | 74–106.7 | 90.2 | 6.3 | |
| Validation | 32 | 78–101.7 | 91.3 | 6.5 | |
| Firmness (N) | Total | 160 | 8.4–23.65 | 15.63 | 3.28 |
| Calibration | 128 | 8.4–23.65 | 15.40 | 3.26 | |
| Validation | 32 | 9.05–22.90 | 16.56 | 3.18 |
As Table 1 shows, the SSC and firmness values of the 160 tomato samples exhibited well‐distributed ranges across both the calibration and validation sets. For SSC, the calibration set (128 samples) ranged from 74 to 106.7 g kg−1, with a mean of 90.2 g kg−1 and a standard deviation of 6.3 g kg−1, closely representing the overall population. The validation set (32 samples) showed a range of 78 to 101.7 g kg−1, with a mean of 91.3 g kg−1 and a standard deviation of 6.5 g kg−1, covering the primary variability required for reliable model evaluation.
For firmness, both the full dataset and the calibration set shared a range of 8.40–23.65 N, with the calibration set exhibiting a mean of 15.40 N and a standard deviation of 3.26 N. The validation set ranged from 9.05–22.90 N, with a mean of 16.56 N and a standard deviation of 3.18 N. Although the validation set did not include the extreme ends of the full range, it captured the dominant distribution characteristics and maintained comparable dispersion, providing a stable basis for assessing model generalization.
Spectral analysis
Figure 4(A) shows the corrected reflectance spectra and Fig. 4(B) shows the transmittance spectra. The effective spectral range for both reflectance and transmittance was set to 500–950 nm, as spectral information outside this range is dominated by noise due to low original signal intensity. In the transmittance spectra, an absorption peak near 680 nm 36 was attributed to chlorophyll absorption, as chlorophyll is a key pigment in photosynthesis with strong absorption in this region. The absorption peak around 820 nm 37 is likely associated with overtone absorption of N—H bonds in compounds such as proteins, whereas the peak near 970 nm 38 can be ascribed to overtone absorption of O—H bonds in water molecules. In the reflectance spectrum, a pronounced absorption valley near 680 nm was caused by strong chlorophyll a absorption, with the reflectance intensity in this region further modulated by other constituents. The range of 700–800 nm exhibited considerable fluctuations due to molecular vibrations of water and organic compounds. The region of 800–900 nm was primarily associated with overtone absorptions of N—H and C—H functional groups, whereas in the 900–950 nm range strong overtone absorption of O—H bonds in water molecules led to a gradual decline in reflectance intensity.
Figure 4.

(A) Sample reflectance spectrum curve. (B) Sample transmittance spectrum curve.
Soluble solids content prediction
Using both raw and preprocessed transmittance and reflectance spectra as input variables, PLSR models were developed to predict tomato SSC. Table 2 summarizes the prediction results.
Table 2.
Soluble solids content (SSC) prediction results from partial least squares regression (PLSR) modeling using different spectral preprocessing methods (reflectance and transmittance spectra)
| Spectrum | Pretreatment | R c | RMSEC | R p | RMSEP | RPD |
|---|---|---|---|---|---|---|
| Reflectance spectrum | SG | 0.7994 | 0.3925 | 0.6696 | 0.4172 | 1.3414 |
| SG–SNV | 0.8208 | 0.3692 | 0.7974 | 0.3584 | 1.6472 | |
| SG–MSC | 0.8409 | 0.3536 | 0.7109 | 0.4084 | 1.3705 | |
| SG–OSC | 0.7993 | 0.3926 | 0.6699 | 0.4179 | 1.3391 | |
| Transmittance spectrum | SG | 0.9027 | 0.2705 | 0.9312 | 0.2584 | 2.5252 |
| SG–SNV | 0.9227 | 0.2424 | 0.9247 | 0.2707 | 2.4104 | |
| SG–MSC | 0.9224 | 0.2429 | 0.9276 | 0.2677 | 2.4372 | |
| SG–OSC | 0.8303 | 0.3505 | 0.9000 | 0.2991 | 2.1812 |
Abbreviations: SSC, soluble solids content; PLSR, partial least squares regression; R c, calibration correlation coefficient; RMSEC, root mean square error of calibration; R p, prediction correlation coefficient; RMSEP, root mean square error of prediction; RPD, residual predictive deviation; SG, Savitzky–Golay smoothing; SNV, standard normal variate; MSC, multiplicative scatter correction; OSC, orthogonal signal correction.
As Table 2 shows, four preprocessing methods (SG, SG–SNV, SG–MSC, and SG–OSC) were applied to both transmittance and reflectance spectra. Based on R p, RMSEP, and RPD values, the transmittance models consistently outperformed the reflectance models. The application of SG preprocessing improved the predictive performance of both transmittance and reflectance spectra, likely because this method reduces the influence of surface conditions (e.g., granularity and flatness) and extraneous noise. Among all models, the transmittance spectrum combined with SG–SNV preprocessing yielded the best performance, achieving R p, RMSEP, and RPD values of 0.9227, 0.2424, and 2.4104, respectively. These findings demonstrate that SG–SNV preprocessing effectively reduces spectral noise and optical interference, enhancing model robustness and predictive accuracy. Consequently, SG–SNV preprocessed spectra were selected as the input for subsequent modeling analyses. In the reflectance spectra, the SG–SNV method also achieved the best RPD value (1.6472), although it remained below the threshold of 2. Nevertheless, it was retained to obtain a more accurate reflectance‐based model through feature selection. The scatter plots in Fig. 5(A),(B) illustrate the prediction results of the PLSR models for tomato SSC; the vertical and horizontal axes represent predicted and measured values, respectively.
Figure 5.

Comparison of optimal scatter plots for measured versus predicted tomato soluble solids content (SSC) values using hyperspectral imaging. (A) Transmittance optimal scatter plot. (B) Reflectance optimal scatter plot.
Firmness prediction
In the PLSR models, the target variable was replaced with the measured firmness values, and multiple forms of preprocessed transmittance and reflectance spectra were used as input variables. The prediction results are summarized in Table 3.
Table 3.
Firmness prediction results from PLSR modeling using different spectral preprocessing methods (reflectance and transmittance spectra)
| Spectrum | Pretreatment | R c | RMSEC | R p | RMSEP | RPD |
|---|---|---|---|---|---|---|
| Reflectance spectrum | SG | 0.7786 | 2.0369 | 0.5856 | 2.8270 | 1.1794 |
| SG–SNV | 0.7859 | 2.0254 | 0.7786 | 2.0432 | 1.5877 | |
| SG–MSC | 0.7946 | 1.9707 | 0.6992 | 2.5049 | 1.3310 | |
| SG–OSC | 0.7787 | 2.0366 | 0.6066 | 2.8516 | 1.1692 | |
| Transmittance spectrum | SG | 0.5184 | 2.7900 | 0.3953 | 2.9290 | 1.0671 |
| SG–SNV | 0.6859 | 2.3771 | 0.6144 | 2.4740 | 1.2341 | |
| SG–MSC | 0.5100 | 2.8063 | 0.4447 | 2.8517 | 1.0960 | |
| SG–OSC | 0.3995 | 2.9909 | 0.3692 | 3.2083 | 0.9742 |
Abbreviations: PLSR, partial least squares regression; R c, calibration correlation coefficient; RMSEC, root mean square error of calibration; R p, prediction correlation coefficient; RMSEP, root mean square error of prediction; RPD, residual predictive deviation; SG, Savitzky–Golay smoothing; SNV, standard normal variate; MSC, multiplicative scatter correction; OSC, orthogonal signal correction.
As Table 3 shows, the reflectance‐based firmness models outperformed the transmittance‐based ones; however, the overall predictive performance remained unsatisfactory. This outcome can be attributed to the complex mechanisms underlying firmness formation, which involves both cell structure (e.g., microstructure of cell walls and cell arrangement) and chemical composition (e.g., cellulose and lignin content).39, 40 The relatively low residual prediction error further indicates that relying solely on hyperspectral information to predict fruit firmness has limited practical application. Firmness is not determined by a single chemical component but rather results from the combined effects of cell wall degradation, pectin dissolution, tissue turgor pressure, and microstructural arrangement. These factors primarily influence light scattering properties and do not readily produce stable, distinctive spectral absorption features. Hyperspectral systems capture spectral responses related to chemical composition – such as functional group vibrations of cellulose – more directly but their ability to detect purely physical differences in cell structure is limited. Consequently, no strong correlation was observed when hyperspectral systems were used to predict firmness. In subsequent steps, a multi‐modal fusion approach can be employed to combine hyperspectral data with texture features, RGB morphological information, spatial scattering characteristics, and mechanical sensor data, thereby supplementing structural‐level information and improving the prediction accuracy of fruit mechanical quality indicators. The scatter plots in Fig. 6(A),(B) illustrate the PLSR prediction results for tomato firmness.
Figure 6.

Comparison of optimal scatter plots for measured versus predicted tomato firmness values using hyperspectral imaging. (A) Transmittance optimal scatter plot. (B) Reflectance optimal scatter plot.
Characteristic wavelength selection for SSC and firmness prediction
The full‐spectrum datasets contained many wavelengths with substantial inter‐band correlations, leading to redundant information and reduced modeling efficiency. To address this issue, three feature selection methods – UVE, CARS, and a hybrid UVE–CARS – were employed to extract informative wavelengths. Table 4 summarizes the modeling performance of reflectance and transmittance spectra for SSC prediction after applying UVE, CARS, and UVE–CARS. When all wavelengths were used, the SG–SNV preprocessing yielded the best PLSR performance for both transmittance and reflectance spectra in SSC prediction. Only SG–SNV‐preprocessed data were used for feature wavelength extraction, as the selected wavelengths are expected to capture the spectral characteristics most relevant to SSC prediction.
Table 4.
Soluble solids content (SSC) prediction results from modeling using different characteristic wavelength methods (reflectance and transmittance spectra)
| Spectrum | Model | R c | RMSEC | R P | RMSEP | RPD |
|---|---|---|---|---|---|---|
| Reflectance spectrum | PLSR | 0.8208 | 0.3692 | 0.7974 | 0.3584 | 1.6472 |
| UVE–PLSR | 0.8512 | 0.3429 | 0.6907 | 0.4210 | 1.3295 | |
| CARS–PLSR | 0.7908 | 0.3999 | 0.6592 | 0.4316 | 1.2967 | |
| UVE–CARS–PLSR | 0.8436 | 0.3554 | 0.7236 | 0.3793 | 1.3664 | |
| Transmittance spectrum | PLSR | 0.9227 | 0.2424 | 0.9247 | 0.2707 | 2.4104 |
| UVE–PLSR | 0.9183 | 0.2489 | 0.9212 | 0.2793 | 2.3364 | |
| CARS–PLSR | 0.9276 | 0.2366 | 0.9256 | 0.2651 | 2.4208 | |
| UVE–CARS–PLSR | 0.9229 | 0.2422 | 0.9250 | 0.2704 | 2.4127 |
Abbreviations: PLSR, partial least squares regression; R c, calibration correlation coefficient; RMSEC, root mean square error of calibration; R p, prediction correlation coefficient; RMSEP, root mean square error of prediction; RPD, residual predictive deviation; UVE, uninformative variable elimination; CARS, competitive adaptive reweighted sampling.
For the reflectance spectra, all R p values were below 0.8 and RPD values were less than 2, whereas the transmittance spectra yielded R p values above 0.9 and RPD values greater than 2, indicating that transmittance spectra provided a more accurate prediction of the internal SSC in tomatoes. Among the compared models, the best predictive performance was achieved by the transmittance spectra processed with SG–SNV and subjected to CARS wavelength selection.
As Fig. 7(B) illustrates, during the CARS feature selection process, the RMSE showed an overall downward trend as the number of iterations increased, with a pronounced decrease in the early stages. When the number of iterations reached 67 and 80 wavelengths were selected, the RMSE reached its minimum; beyond this point, the RMSE gradually increased due to overlapping and redundant information. Eighty representative wavelengths were ultimately selected based on the optimal criterion. Figure 7(C) shows the selected feature wavelengths. Figure 8(A) presents the optimal scatter plot of predicted versus measured SSC values using different feature selection methods.
Figure 7.

Feature wavelength selection process. (A) Feature wavelength selection process based on uninformative variable elimination–competitive adaptive reweighted sampling (UVE–CARS). (B) Feature wavelength selection process based on competitive adaptive reweighted sampling (CARS). (C) Valid wavelengths selected by the CARS algorithm. (D) Valid wavelengths selected by the UVE–CARS algorithm.
Figure 8.

Comparison of optimal scatter plots for actual versus predicted values using different feature wavelength selections. (A) Transmittance optimal scatter plot. (B) Reflectance optimal scatter plot.
Table 5 presents the firmness prediction results obtained using different feature wavelength selection methods. For reflectance spectra, the best model performance was achieved with SG–SNV preprocessing combined with UVE–CARS‐based wavelength selection. The UVE–CARS wavelength selection procedure is illustrated in Fig. 7(A). As the number of iterations increased, the RMSE exhibited a characteristic pattern: an initial stage of mild fluctuations followed by a sharp decrease. At around 70 iterations, irrelevant noise was effectively eliminated, while subsequent changes suggested a gradual loss of important spectral information. Thereafter, the RMSE fluctuated slightly before stabilizing at a relatively low level. At approximately 95 iterations, the RMSE reached an optimal low value, and 123 key wavelengths were identified as the most informative features. The selected feature wavelengths are depicted in Fig. 7(D). The optimal scatter plot of predicted versus measured firmness values based on different feature selection methods is shown in Fig. 8(B).
Table 5.
Firmness prediction results from modeling using different characteristic wavelength methods (reflectance and transmittance spectra)
| Spectrum | Model | R c | RMSEC | R p | RMSEP | RPD |
|---|---|---|---|---|---|---|
| Reflectance spectrum | PLSR | 0.7859 | 2.0254 | 0.7450 | 2.4875 | 1.3604 |
| UVE–PLSR | 0.7589 | 2.1138 | 0.7259 | 2.4866 | 1.3408 | |
| CARS–PLSR | 0.7955 | 1.9666 | 0.6938 | 2.5215 | 1.3222 | |
| UVE–CARS–PLSR | 0.7880 | 1.9031 | 0.8008 | 2.6297 | 1.6696 | |
| Transmittance spectrum | PLSR | 0.6859 | 2.3771 | 0.6144 | 2.4740 | 1.2341 |
| UVE–PLSR | 0.5349 | 2.7566 | 0.4891 | 2.7753 | 1.1262 | |
| CARS–PLSR | 0.5422 | 2.7414 | 0.5304 | 2.7353 | 1.1427 | |
| UVE–CARS–PLSR | 0.8620 | 1.6522 | 0.5024 | 2.7656 | 1.1235 |
Abbreviations: PLSR, partial least squares regression; R c, calibration correlation coefficient; RMSEC, root mean square error of calibration; R p, prediction correlation coefficient; RMSEP, root mean square error of prediction; RPD, residual predictive deviation; UVE, uninformative variable elimination; CARS, competitive adaptive reweighted sampling.
The different performances of UVE, CARS, and UVE–CARS were also related to the spectral response mechanisms of SSC and firmness. Soluble solids content was mainly associated with internal biochemical components, such as soluble sugars, organic acids, and water‐related absorption features. These components produced relatively stable spectral responses in transmittance mode. Competitive adaptive reweighted sampling was therefore effective for SSC prediction because it progressively eliminated weak and redundant wavelengths while retaining variables with strong contributions to the PLSR model. In contrast, firmness is a mechanical attribute affected by cell wall structure, pectin degradation, tissue turgor, and microstructural arrangement. Its spectral information is weaker and more dispersed than that of SSC. The combined UVE–CARS strategy was therefore more suitable for firmness prediction, as UVE first removed clearly uninformative variables and CARS further selected wavelengths with stronger predictive contributions.
CONCLUSIONS
This study systematically evaluated the capability of hyperspectral imaging within the 500–950 nm wavelength range for predicting tomato internal quality, revealing fundamental differences between reflectance and transmittance pathways in identifying biochemical and mechanical properties. The results indicated that transmittance spectra significantly outperformed reflectance spectra in predicting SSC, whereas both pathways demonstrated weaker performance in modeling firmness. This performance differentiation reflects fundamental distinctions in the spectral response mechanisms of different quality attributes.
The high predictive performance for SSC (maximum R p = 0.9256, RPD = 2.4208) indicates that transmittance spectra effectively capture absorption features associated with internal fruit water content, sugars, and organic acids. Transmittance modes exhibit greater penetration than reflectance modes, enabling more thorough interaction between light and thick‐walled tissues, preserving biochemical information linked to functional groups such as O—H and C—H bonds. This outcome aligns strongly with other fruit studies, further confirming the robust coupling of transmittance spectroscopy with internal biochemical properties. Competitive adaptive reweighted sampling feature wavelength screening further enhanced model performance, demonstrating the algorithm's ability to focus on key bands associated with chemical absorption peaks, thereby reducing redundant information interference in PLSR.
In contrast, overall performance for firmness prediction was lower (maximum R p = 0.8008; RPD = 1.6696), revealing limited spectral sensitivity to structural fruit quality. Firmness is a quintessential structural attribute influenced by multiple factors including cell wall thickness, tissue collapse, pectin degradation, and cellular arrangement.
These structural variations primarily alter light scattering behavior within tissue rather than absorption behavior. Consequently, their spectral signals typically lack clear ‘absorption peak–component’ correlations. In the visible–near‐infrared range in particular, variations in scattering due to changes in tissue microstructure are often weaker than differences in chemical absorption. This make it difficult for both reflectance and transmittance modes to produce highly sensitive responses to firmness. This mechanism explains the model's limitations and aligns with prior observations that fruit texture is difficult to predict accurately using a single optical modality.
This study also demonstrated the impact of preprocessing and wavelength selection methods on model performance. The SG–SNV preprocessing method enhanced modeling stability under both reflectance and transmittance conditions, indicating that simultaneous removal of noise and scattering‐related effects holds universal relevance for tomato spectra. The differentiated effects of CARS and UVE–CARS across different attributes reflect the inconsistent spectral distributions of SSC and firmness, warranting future development of attribute‐specific feature selection strategies.
CONFLICT OF INTEREST
The authors declare no conflict of interest.
ACKNOWLEDGEMENTS
This research was supported by the Beijing Rural Revitalization Agricultural Science and Technology Project (Project No. NY2502240225).
Contributor Information
Lei Yan, Email: mark_yanlei@bjfu.edu.cn.
Jianqiang Hao, Email: m13621274015@163.com.
DATA AVAILABILITY STATEMENT
The data that support the findings of this study are available from the corresponding author upon reasonable request.
REFERENCES
- 1. Dechao G, Yuanli R, Hao Z, Chunfeng LI and Qiang Z, Comprehensive quality detection method for tomatoes combining machine vision and spectral techniques. Food Mach 40:123–130 (2024). [Google Scholar]
- 2. Hagenguth J, Kanski L, Kahle H, Becker HC and Horneburg B, Flavour improvement in early generations of fresh market tomatoes (Solanum lycopersicum L.): II. response to breeders' sensory and marker‐assisted selection. Plant Breed 143:725–738 (2024). [Google Scholar]
- 3. Guo Q, Fan Y, Yan X, Liu X, Cao N, Wang Z et al., Advances in the application of multi‐source data fusion technology in non‐destructive detection of apple. Smart Agric 7:31–46 (2025). [Google Scholar]
- 4. Grigorev R, Zarrinkhat F, Lamberg J, Nefedova I, Mirmoosa M, Ala‐Laurinaho J et al., Gouy phase correction for quasioptical, dielectric spectroscopy of spherical shells in a Gaussian beam for terahertz corneal sensing. IEEE Trans Terahertz Sci Technol 15:370–378 (2025). [Google Scholar]
- 5. She X, Tian H, Lei Y, Yang L, Zhao S, Wu J et al., A novel electronic nose for sensing (E)‐2‐hexenal based on Mn‐MOF nanonets with NADPH‐like activity. Food Chem 471:142845 (2025). [DOI] [PubMed] [Google Scholar]
- 6. Xi B, Zhang Y, Li J and Huang Y, Transductive few‐shot learning with enhanced spectral‐spatial embedding for hyperspectral image classification. IEEE Trans Image Process 34:854–868 (2025). [DOI] [PubMed] [Google Scholar]
- 7. Dehbasteh M, Tehrani NN and Parastar H, Multivariate curve resolution followed by partial least squares‐discriminant analysis combined with Vis‐NIR hyperspectral imaging for rice authentication. Food Res Int 221:117266 (2025). [DOI] [PubMed] [Google Scholar]
- 8. Gao S and Xie W, SSC and pH prediction and maturity classification of grapes based on hyperspectral imaging. Microelectron J 8:100457 (2024). [Google Scholar]
- 9. Mansourialam A, Rasekh M, Ardabili S, Dadkhah M and Mosavi A, Hyperspectral method integrated with machine learning to predict the acidity and soluble solid content values of kiwi fruit during the storage period. Acta Technol Agric 27:187–193 (2024). [Google Scholar]
- 10. Wang Z, Wu S, Zuo C, Jiang M, Song J, Ding F et al., Exploring the variability and heterogeneity of apple firmness using visible and near‐infrared hyperspectral imaging. Food Sci Technol‐Wiss ‐Technol 192:11 (2024). [Google Scholar]
- 11. Liu Q, Jiang X, Wang F, Fan S, Zhu B, Yan L et al., Evaluation and process monitoring of jujube hot air drying using hyperspectral imaging technology and deep learning for quality parameters. Food Chem 467:141999 (2025). [DOI] [PubMed] [Google Scholar]
- 12. Liu Q, Yu C, Li Z, Zhang H, Wang F, Fan S et al., Differentiation of jujube varieties using dual‐hyperspectral imaging: a deep learning method based on convolutional neural network and bidirectional gated recurrent unit. Food Biosci 72:15 (2025). [Google Scholar]
- 13. Liu Q, Jiang X, Wang F, Zhu B, Yan L, Wei Y et al., Detection of dried jujube from fresh jujube with different variety and maturity after hot air drying based on hyperspectral imaging technology. J Food Compos Anal 133:12 (2024). [Google Scholar]
- 14. Wang X, Hao M, Cao X and Zhang Y, Detection of black heart disease in SEED potato based on transmission spectroscopy technique. INMATEH Agric Eng 73:501–512 (2024). [Google Scholar]
- 15. Li B, Su CT, Yin H, Zou JP and Liu YD, Detection of moisture content of edamame based on the fusion of reflectance and transmittance spectra of hyperspectral imaging. J Chemom 38:19 (2024). [Google Scholar]
- 16. Kanwal N, Kmper W, Farrar MB, Tootoonchy M, Lynch C, Nichols J et al., Rapid assessment of lychee and mango fruit quality using hyperspectral imaging. Lebensm‐Wiss ‐Technol Sci Technol 224:117833 (2025). [Google Scholar]
- 17. Guo E, Liu M, Zhao J and Chen Q, Nondestructive detection of sugar content on navel orange with hyperspectral imaging. Trans Chin Soc Agric Mach 39:91–94 (2008). [Google Scholar]
- 18. Brito AAD, Campos F, Nascimento ADR, de Corrêa GC and Júnior LCC, Determination of soluble solid content in market tomatoes using near‐infrared spectroscopy. Food Control 126:108068 (2021). [Google Scholar]
- 19. Cai L, Zhang Y, Cai Z, Shi R, Li S and Li J, Detection of soluble solids content in tomatoes using full transmission Vis‐NIR spectroscopy and combinatorial algorithms. Front Plant Sci 15:1500819 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20. Arakeri M P and Lakshmana, Computer vision based fruit grading system for quality evaluation of tomato in agriculture industry. Proc Comput Sci 79:426–433 (2016). [Google Scholar]
- 21. Barnes RJ, Dhanoa MS, Susan and Lister J, Standard normal variate transformation and de‐trending of near‐infrared diffuse reflectance spectra. Appl Spectrosc 43:772–777 (1989). [Google Scholar]
- 22. Geladi P, Macdougall D and Martens H, Linearization and scatter‐correction for near‐infrared reflectance spectra of meat. Appl Spectrosc 39:491–500 (1985). [Google Scholar]
- 23. Savitzky A, Smoothing and differentiation of data by simplified least squares procedures. Anal Chem 36:1627–1639 (1964). [DOI] [PubMed] [Google Scholar]
- 24. Wold S, Martens H and Wold H, The Multivariate Calibration Problem in Chemistry Solved by the PLS Method. Springer, Berlin, Heidelberg (1983). [Google Scholar]
- 25. Cai W, Li Y and Shao X, A variable selection method based on uninformative variable elimination for multivariate calibration of near‐infrared spectra. Chemom Intell Lab Syst 90:188–194 (2008). [Google Scholar]
- 26. Centner V, Massart DL, De Noord OE, De Jong S, Vandeginste BM and Sterna C, Elimination of uninformative variables for multivariate calibration. Anal Chem 68:3851–3858 (1996). [DOI] [PubMed] [Google Scholar]
- 27. Zheng K, Li Q, Wang J, Geng J, Cao P, Sui T et al., Stability competitive adaptive reweighted sampling (SCARS) and its applications to multivariate calibration of NIR spectra. Chemom Intell Lab Syst 112:48–54 (2012). [Google Scholar]
- 28. Wold H, Soft modelling by latent variables: the non‐linear iterative partial least squares (NIPALS) approach. J Appl Probab 12:117–142 (1975). [Google Scholar]
- 29. Wold S, Sjöström M and Eriksson L, PLS‐regression: a basic tool of chemometrics. Chemom Intell Lab Syst 58:109–130 (2001). [Google Scholar]
- 30. Causse M, Saliba‐Colombani V, Lecomte L, Duffe P, Rousselle P and Buret M, QTL analysis of fruit quality in fresh market tomato: a few chromosome regions control the variation of sensory and instrumental traits. J Exp Bot 53:2089–2098 (2002). [DOI] [PubMed] [Google Scholar]
- 31. Jiang X, Liu Q, Cao X, Wang F, Li L, Yan L et al., Fluorescence spectroscopy combined with a multi‐task deep learning model for rapeseed oil quality analysis. J Food Compos Anal 146:107889 (2025). [Google Scholar]
- 32. Wold S, Antti H, Lindgren F and Hman J, Orthogonal signal correction of near‐infrared spectra. Chemom Intell Lab Syst 44:175–185 (1998). [Google Scholar]
- 33. Jiang X, Tian J, Huang H, Hu X, Han L, Huang D et al., Nondestructive visualization and quantification of total acid and reducing sugar contents in fermented grains by combining spectral and color data through hyperspectral imaging. Food Chem 386:132779 (2022). [DOI] [PubMed] [Google Scholar]
- 34. Williams PC, Variables affecting near‐infrared reflectance spectroscopic analysis. in Infrared Technol Agric Food Ind eds. by Williams P and Norris K, pp. 143–167 (1987). [Google Scholar]
- 35. Jiang X, Cao X, Liu Q, Wang F, Fan S, Yan L et al., Prediction of multi‐task physicochemical indices based on hyperspectral imaging and analysis of the relationship between physicochemical composition and sensory quality of tea. Food Res Int 211:116455 (2025). [DOI] [PubMed] [Google Scholar]
- 36. Bubier JL, Rock BN and Crill PM, Spectral reflectance measurements of boreal wetland and forest mosses. J Geophys Res‐Atmos 102:29483–29494 (1997). [Google Scholar]
- 37. Guo C, Yin S, Dong Q and Sato T, Simple route to (NH4)xWO3 nanorods for near infrared absorption. Nanoscale 4:3394–3398 (2012). [DOI] [PubMed] [Google Scholar]
- 38. Mcglone VA, Jordan RB and Martinsen PJ, Vis/NIR estimation at harvest of pre‐ and post‐storage quality indices for ‘Royal Gala’ apple. Postharvest Biol Technol 25:135–144 (2002). [Google Scholar]
- 39. Brummell DA and Harpster MH, Cell wall metabolism in fruit softening and quality and its manipulation in transgenic plants. Plant Mol Biol 47:311–339 (2001). [PubMed] [Google Scholar]
- 40. Gildberg A, Enzymic processing of marine raw materials. Process Biochem 28:1–15 (1993). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The data that support the findings of this study are available from the corresponding author upon reasonable request.
