Next Article in Journal
A Multi-Scale Rice Lodging Monitoring Method Based on MSR-Lodfnet
Previous Article in Journal
Image Segmentation of Cottony Mass Produced by Euphyllura olivina (Hemiptera: Psyllidae) in Olive Trees Using Deep Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Quality Detection Model for Apricots (Diaoganxing) Based on Spectral Morphological Feature Fusion Across Different Moisture Intervals

1
College of Mechanical and Electrical Engineering, Tarim University, Alar 843300, China
2
Modern Agricultural Engineering Key Laboratory at Universities of Education Department of Xinjiang Uygur Autonomous Region, Tarim University, Alar 843300, China
3
Xinjiang Production and Construction Corps Key Laboratory of Utilization and Equipment of Special Agricultural and Forestry Products in Southern Xinjiang, Alar 843300, China
4
College of Horticulture and Forestry, Tarim University, Alar 843300, China
5
Xinjiang Production & Construction Corps Key Laboratory of Facility Agriculture, Alar 843300, China
*
Author to whom correspondence should be addressed.
Agriculture 2025, 15(23), 2486; https://doi.org/10.3390/agriculture15232486
Submission received: 20 October 2025 / Revised: 15 November 2025 / Accepted: 27 November 2025 / Published: 29 November 2025
(This article belongs to the Section Agricultural Product Quality and Safety)

Abstract

Moisture content is one of the key indicators for evaluating the quality of apricots. When moisture levels fluctuate over an excessively wide range, scattering effects and absorption characteristics interfere with each other, making it difficult for a single model to achieve accurate predictions across the entire range. This study investigates precision modeling methods applicable to different moisture intervals based on spectral morphological features. By extracting the spectral morphological features of the water-sensitive regions (peak and valley) and conducting Pearson correlation analysis, the spectral morphological feature parameters with relatively strong correlations were selected, and they were combined with the characteristic bands to construct a segmented model for water content intervals. The results indicate that spectral morphological features of apricots within the 25–40% and 40–55% moisture range exhibit a certain correlation with moisture content. A weak correlation is observed in the 55–70% moisture range. After preliminary fusion modeling of spectral morphological features and characteristic bands for apricots across different moisture ranges, further analysis revealed that moisture content models based on valley morphology features and characteristic bands outperformed those based on peak morphology features and characteristic bands, demonstrating superior representational capability. By establishing a fusion model based on the spectral morphological parameters selected through Pearson’s method and the characteristic bands, the detection accuracy and model stability in the 25–70% moisture content range have been effectively improved. Among all the models covering different moisture content ranges, the model for the 55–70% moisture content range has the best prediction effect. The correlation coefficient of its prediction set reaches 0.8723, and the Ratio of Performance to Interquartile Range (RPIQ) is 2.5220, indicating that this range is the most suitable for establishing a high-precision quantitative moisture content detection model. This research effectively solved the problem of spectral response distortion caused by wide variations in moisture content and improved the prediction accuracy of the moisture content detection model for apricots.

1. Introduction

In the fruit quality evaluation system, moisture content is one of the important indicators for assessing the quality of apricots. It not only directly affects the taste and texture of the fruit, but is also closely related to the sugar–acid balance and the distribution of flavor substances [1]. The finished product of apricots—dried apricots—is highly favored by the market for its unique taste. The traditional natural drying method is the key to creating its unique flavor. During the drying process, precise control of the moisture content is a crucial factor determining the grade, taste and storage method of the product. Excessive moisture can lead to mold growth, while too little moisture will result in hard fruits and a poor taste. The traditional method for measuring the moisture content of apricots is the drying weight reduction method. This method is precise but inefficient, destructive, and difficult to meet the urgent need for rapid and non-destructive testing. Therefore, in this study, the process of simulating the air-drying method for making dried apricots was carried out to conduct a non-destructive detection study on the changes in moisture content. This was performed to achieve precise detection and control of the moisture content during the drying process. Hyperspectral imaging technology is a rapidly developing non-destructive detection method for agricultural products [2]. Zhu et al. [3] conducted a study on the detection of moisture content in wilted black tea using hyperspectral images. They proposed a method based on multi-feature fusion to establish a partial least squares regression model. This method significantly improved the detection accuracy of the black tea moisture content model, and the determination coefficient of the prediction set reached 0.7968. Hanget al. [4] used hyperspectral imaging technology to detect the moisture content of corn seeds. Through comparisons of various pre-processing techniques and feature band selection methods, they determined that the normalized—continuous projection algorithm—partial least squares regression algorithm was the best. The determination coefficients of the training set and the prediction set reached 0.9917 and 0.9914, respectively. Meanwhile, based on the hyperspectral imaging of apricots, high-precision and non-destructive quantitative moisture content detection has been initially achieved in the market [5,6]. However, the existing methods still have insufficient model generalization ability and lack fine classification when dealing with a wide range of moisture intervals. To this end, this study developed a refined moisture content grading model for sun-dried apricots, enhancing the accuracy of model predictions across different moisture content ranges.
The reason why hyperspectral imaging technology can gradually replace traditional detection methods lies in its advantages, such as non-destructiveness and high efficiency and speed. Although the advantages are prominent, there is also a defect of excessive information redundancy, which prompts researchers to continuously optimize the data in order to extract the core information. However, it may also introduce new problems such as model complexity and overfitting [7,8]. To address this issue, Di et al. [9] selected 95 feature bands from 256 bands when the cross-validation root mean square error reached its minimum, in order to ensure the stability of the selected feature bands. Therefore, in this study, the method of extracting spectral morphological features was adopted to further simplify the hyperspectral data, making it more capable of reflecting the moisture content information of the apricot components. The spectral morphological features contain information such as the shape, size and symmetry of absorption valleys and reflection peaks, and are intrinsically related to the molecular structure and physical-chemical properties of the sample to be tested. Considering the limitations of statistical empirical models, the incorporation of spectral morphological features can effectively compensate for the reduced model accuracy resulting from missing variables. Liu et al. [10] constructed a discrimination model for moldy apple cores by extracting the peak and valley characteristics of the spectra. The accuracy rates of the model in the training set and the prediction set were 99.1% and 97.3%, respectively. Compared with other models, this method effectively improved the detection accuracy of samples with moldiness of less than 6%.Yan et al. [11] combined spectral morphological features and convolutional block attention mechanism data and found that the apple soluble solids content model constructed by convolutional neural networks was superior to models such as partial least squares regression and backpropagation neural networks, with the coefficient of determination increasing by 11% and 8%, respectively. Zheng et al. [12] enhanced the discriminative performance of the partial least squares linear discriminant analysis model for detecting pest infestation in crabapple trees by leveraging spectral morphological differences and compensatory directional changes. The model achieved sensitivity, specificity, and accuracy rates of 95.14%, 96.32%, and 95.94%, respectively. The above studies have all confirmed the effectiveness of spectral morphological features in non-destructive testing of agricultural products. Building upon this foundation, this research further investigates the quantitative relationship between the moisture content of apricots and the morphological parameters selected through Pearson correlation analysis. This approach aims to provide a more precise method for detecting moisture content during the sun-drying process of apricots.
This study systematically investigated the quantitative detection of moisture content in apricots across different moisture intervals by extracting spectral morphological features. Based on the fact that hyperspectral imaging can non-destructively detect the moisture content of fruits, in order to further optimize the model performance, this study introduced Pearson correlation to screen the spectral morphological parameters, and combined the selected morphological parameters with the characteristic bands to establish prediction models for moisture content in different moisture ranges. The effectiveness of this method was verified through analysis. This provided certain methodological references for the wide application of spectral morphology in non-destructive detection of other fruits such as apricots.

2. Materials and Methods

2.1. Materials

The experimental sample variety was apricots, Diaoganxing, collected on 4 July 2025, from the drying yard of Xinlilon Fruit Industry Co., Ltd. in Alar City, China, Division 1 of the Xinjiang Production and Construction Corps (40.629393° N, 81.574097° E). The experiment selected intact and undamaged apricots. To reduce the coefficient of variation in each moisture content range and ensure sufficient sample size, this study set 15% moisture content as one moisture range. Considering that dried apricots exhibit accelerated surface wrinkling when moisture content falls below 25%, forming complex microscopic geometries, this leads to uncontrollable shadow effects that destabilize their spectral signals, and that apricots with moisture content above 70% are usually sold directly as fresh fruits, four moisture ranges were divided (25–40%, 40–55%, 55–70%). Each moisture range contained 195 apricots, totaling 585. The spectral data were collected by the MATRICE 350 RTK (Shenzhen Dajiang Innovation Technology Co., Ltd., Shenzhen, China), equipped with the hyperspectral camera FS-64C (Hangzhou Caipu Technology Co., Ltd., Hangzhou, China). This hyperspectral camera continuously performs “line scans” at a fixed frequency, stitching together each scan line to form a complete hyperspectral image. It covers a wavelength range of 390–1712 nm, featuring 688 spectral channels with a spectral resolution of approximately 2 nm. Spectral correction uses the 500 × 500 mm reflectance calibration fabric provided by Hangzhou Caipu Technology Co., Ltd., which is used in conjunction with the hyperspectral camera. The spectral range covers 400–1700 nm and has a reflectance of 80%. After the spectral image acquisition is completed, the moisture content of the samples is measured in sequence. Weighing is performed using the JA2003 electronic balance (Hunan Lichen Instrument Technology Co., Ltd., Wuhan, China), and drying is carried out using the GZX-9140-MBE electric heating air drying oven (Shanghai Boxun Medical Biological Instrument Co., Ltd., Shanghai, China).

2.2. Method

2.2.1. Spectral Acquisition Method

This outdoor spectral data collection was completed under clear weather conditions on 4 July 2025. The solar elevation angle was 30.518°, azimuth angle −95.162°, irradiance 272.4 W/m2, ambient temperature 33.4 °C, and relative humidity 27%. During measurement, the dried apricot samples and reflectance reference plates were sequentially arranged on the ground, as shown in Figure 1. Because the DJI drones have the function of route planning, their flight speed is more stable and the imaging is clearer than that of manual operation. Therefore, spectral data collection was conducted using the flight path planning function at a minimum altitude of 12 m, with the speed set to 0.2 m per second. Before collecting the spectral data, the hyperspectral camera needs to undergo white calibration and black calibration to remove the dark current noise. After the spectral data collection is completed, the ENVI 5.6 software is used for spectral whiteboard correction. Set the size of the region of interest to a 3 × 3 pixel rectangular area, the corrected spectral data is extracted.

2.2.2. Spectral Data Processing Method

The original spectral signal is not a pure absorption signal of the target sample, instead, it is a composite signal formed by the mixture of chemical information, physical interference, noise, background interference, etc. Preprocessing the spectral data effectively enhances the characteristics of useful signals such as chemical information, reduces interference from noise and background, and improves the signal-to-noise ratio. This results in higher and more stable model accuracy.
Local Weighted Scatterplot Smoothing (LOWESS) performs local weighted polynomial regression within the spectral range, effectively suppressing noise while preserving the authenticity of the key absorption bands in the data. LOWESS is a nonparametric regression technique that works by fitting a low-order polynomial to a local subset of data points within a moving window along the spectral axis [13]. The core of LOWESS lies in assigning weights to data points based on their proximity to the estimated point, ensuring an adaptive smoothing process that is highly effective at capturing local data structures. This study sets the smoothing proportion parameter to 0.1 to prevent excessive smoothing.
First-order derivative processing (FDP) resolves overlapping peaks and eliminates constant baseline drift by calculating finite differences between adjacent spectral points using the central difference method [14]. FDP enhances the resolution of sharp spectral features, enabling derivative spectra to more accurately reflect local slope variations.
X 1 s t i = X i + 1 X ( i 1 ) 2
To ensure that the final model is representative, the sample set is divided into a validation set and a prediction set based on the joint x–y distance (SPXY). SPXY incorporates both spectral space and moisture content-normalized distance, enabling better coverage of the concentration space and enhancing the model’s generalization capability [15].
Competitive Adaptive Reweighted Sampling (CARS) employs Monte Carlo sampling and an exponential decay mechanism to adaptively select feature wavelengths based on the absolute values of partial least squares regression coefficients. In each iteration, CARS first randomly selects a sample subset to establish a PLS model. It then removes wavelength variables with lower weights based on an exponential decay function, while assigning higher weights to wavelength variables with greater importance. This process increases the probability of retaining these high-weight variables in subsequent iterations. Finally, through cross-validation root mean square error, the wavelength subset with the highest prediction accuracy is selected as the optimal feature wavelength combination [16,17]. To ensure that the weights of the final characteristic wavelengths are all relatively high, the number of Monte Carlo iterations is set to 50 [18].

2.2.3. Moisture Content Determination Method

The determination of sample moisture content follows the method specified in the national standard (GB/T 5009.3-2016) [19]. The determination process consists of three steps: First, after completing outdoor spectral data collection, promptly transfer the air-dried apricots to an indoor environment for initial weight recording. Next, place the samples in an electric hot-air drying oven and dry them at a constant temperature of 70 °C for 48 h until constant weight is achieved. Finally, measure the post-drying weight and calculate the moisture content.
w = m 1 m 2 m 1 × 100 %
In the equation, w denotes the moisture content of the sample, m 1 represents the initial mass of the sample, and m 2 indicates the mass of the sample after drying.

2.2.4. Spectral Morphological Feature Extraction Methods

After FDP of the raw spectral curve of apricots, spectral features are highlighted to extract their morphological features. The extracted spectral morphological parameters are Peak Height, Full Width at Half Maximum, Left Slope, Right Slope, Left Shoulder Width, Right Shoulder Width, and Peak Area, denoted as H, F, FL, FR, L, R, and A, respectively, in the following text. As shown in Figure 2, the Peak Height (H) is the maximum value at the spectral peak. Full Width at Half Maximum (F) is the width corresponding to half the peak height of the spectrum. Left Slope (FL) is the spectral slope at the left edge of the half-height width. Right Slope (FR) is the spectral slope at the right edge of the half-height width. Left shoulder width (L) is the distance between the center and the point where the first derivative equals zero on the left. Right shoulder width (R) is the distance between the center and the point where the first derivative equals zero on the right. Peak area (A) is the integral area of the spectrum curve with the half-width. Similarly, the morphological parameters of the valley are exactly symmetrical to those of the peak.

2.2.5. Correlation Analysis Methods

The Pearson correlation coefficient aims to quantitatively analyze the strength and direction of the linear relationship between two variables. It is defined as the ratio of the covariance between two variables to the product of their standard deviations. Specifically, this study employed Pearson’s correlation coefficient to evaluate the robust linear relationship between the increase or decrease in spectral morphological features and the corresponding changes in moisture content. This provides a statistical basis for subsequent feature selection and model construction.

2.2.6. Model Construction and Evaluation Methods

After partitioning the sample set, a multivariate quantitative model was established using partial least squares (PLS). The Correlation Coefficient of Calibration (Rc) and Correlation Coefficients of Prediction (Rp) are used to evaluate the model’s fit to the training data and its predictive capability for unknown data. A correlation coefficient closer to 1 indicates a higher degree of explanation of the variation in the response variable by the model. The Root Mean Square Error of Calibration (RMSEC) and the Root Mean Square Error of Prediction (RMSEP) represent the average error when the model fits the training data and the average error when predicting unknown data, respectively. The lower the root mean square error value, the higher the prediction accuracy and the better the model performance. The Ratio of Performance to Interquartile Range (RPIQ) compares the model’s RMSEP against the distribution range of the majority of data (the middle 50%) to assess the model’s practical performance. When RPIQ < 1.4, the model lacks predictive capability; when 1.4 ≤ RPIQ < 2.0, the model possesses some predictive capability; when RPIQ ≥ 2.0, the model effectively distinguishes samples and demonstrates good predictive capability [20].
R = i = 1 N x i x ¯ y i y ¯ i = 1 N x i x ¯ i = 1 N y i y ¯
R M S E = 1 N i = 1 N y i y ^ 2
R P I Q = I Q R R M S E P
In the above equation, N represents the sample size, x ¯ and y ¯ denote the mean values of the corresponding variables, x i and y i indicate the actual values of the corresponding variables, ŷ represents the predicted values of the corresponding variables, and IQR denotes the interquartile range.

2.2.7. Overall Research Process

Figure 3 presents the overall research process, beginning with sample preparation and concluding with the construction of the PLS model.

3. Results and Discussion

3.1. Extraction of Spectral Morphological Features

The raw spectral curve of apricot is shown in Figure 4a. It was subjected to LOWESS with a smoothing ratio parameter set to 0.1 to prevent excessive smoothing, as shown in Figure 4b. Following FDP, spectral morphological feature extraction was performed, as illustrated in Figure 4c. Since the key absorption bands for water lie within the 850–970 nm range [21], this experiment selected the valley with a center wavelength of 916 nm and the peak with a center wavelength of 968 nm from the FDP for morphological feature extraction.
The seven morphological feature parameters were extracted using the spectral morphology feature extraction method described earlier. While these seven parameters exhibit inherent differences in numerical magnitude, such variations do not adversely affect subsequent Pearson correlation analysis and PLS modeling. This is because Pearson correlation measures the strength of linear relationships between two variables, not the absolute magnitude of variation. In PLS modeling, the absence of data normalization only impacts computational efficiency.

3.2. Pearson Correlation Analysis Between Spectral Morphological Features and Moisture Content of Apricots

Pearson correlation analysis was conducted between spectral morphological parameters and moisture content for samples across different moisture intervals. The results are presented in Table 1, where a denotes valleys, b denotes peaks, and R1, R2, and R3 represent the moisture content intervals of 25–40%, 40–55%, and 55–70%, respectively. Within the moisture content range of 25–40%, the spectral morphological characteristics of R1a correlate with moisture content as follows: A > FL > H > L > FR > R > F. For R1b, spectral characteristics correlate with moisture content as follows: A > H > FL > R > L > F > FR. Within the 40–55% moisture range, R2a correlates as A > F > R > L > H > FL > FR, while for R2b, the correlation is A > F > R > H > L > FL > FR. Within the 55–70% moisture content range, the correlation for R3a is L > FR > R > A > F > H > FL, and for R3b, it is A > H > R > F > FL > FR > L.
Overall, within the moisture content ranges of 25–40% and 40–55%, moisture content exhibits a certain correlation with wave peaks and valleys. Within the 55–70% moisture content range, moisture content shows a slight correlation with wave peaks and valleys. Within the moisture content range of 25–40%, the absorption signal intensity at 916 nm and 968 nm exceeds instrumental noise and other interferences, while the moisture content has not yet reached levels sufficient to induce significant nonlinear effects. Within this range, the linear relationship described by the Lambert-Beer law predominates. Within the 40–55% moisture content range, although chemical noise and physical noise introduced by moisture state diversity increase with enhanced absorption signals, moisture absorption remains dominant. This noise does not significantly disrupt the overall linear trend. Consequently, moisture content still maintains a certain correlation with wave peaks and valleys within this range, and the Pearson correlation coefficient shows no noticeable decline. Within the moisture content range of 55–70%, the characteristic absorption peaks at 916 nm and 968 nm further diminish. Minor variations in moisture content result in absorbance differences that are obscured by instrument noise and baseline fluctuations, leading to a significant decline in signal-to-noise ratio. Given the extreme sensitivity of Pearson’s correlation coefficient to low signal-to-noise ratios, only a weak correlation between moisture content and peak/valley positions can be observed within this range.
Spectral morphological parameters of apricots exhibit significant interval dependence on moisture content, confirming the significance of this study’s refined moisture content classification approach. As the moisture content increases, the linear relationship transitions from relatively clear to weakly correlated. The signal-to-noise ratio gradually shifts from relatively favorable to the signal being overwhelmed by noise. This phenomenon arises because water content positively correlates with the optical absorption coefficient, leading to excessive absorption of the signal light and resulting in effective energy attenuation [22].

3.3. Sample Set Partitioning and Feature Band Selection

This study employed the SPXY method mentioned earlier to partition the data set, dividing the training set and prediction set in a 3:1 ratio, as shown in Table 2. Based on the sample set partitioning results, the CARS algorithm was employed for feature band extraction. Taking apricots with a moisture content in the 25–40% range as an example, as shown in Figure 5, at the red line, the cross-validation root mean square error reached its minimum after 19 iterations, identified as the optimal iteration count. This process yielded 50 feature bands. A total of 56 characteristic bands were selected across the moisture content ranges of 40–55 and 55–70%.

3.4. Moisture Content Detection Model for Apricots Integrating Feature Wavelengths and Spectral Morphological Features

To further explore the influencing mechanisms of spectral morphological characteristics on the moisture detection model of apricots, this study first conducted fusion modeling by combining a single peak or valley with the characteristic bands selected by the CARS algorithm. Then, it selected the relatively higher top four spectral morphological feature parameters based on Pearson correlation screening and fused them with the characteristic bands selected by the CARS algorithm. Finally, PLS modeling was carried out. This approach holds promise for enhancing model performance and improving prediction accuracy, as highly correlated spectral morphological parameters can quantify specific spectral response patterns induced by moisture. This effectively strengthens the model’s ability to characterize moisture-sensitive information and compensates for missing data. As shown in Table 3, the spectral morphological parameters to be merged across different moisture intervals are provided.
As shown in Table 4, Table 5 and Table 6, integrating the CARS algorithm with spectral morphological feature modeling improved model performance across all moisture classes. In models with 25–40% moisture content, integrating characteristic spectral bands with morphological features improved model accuracy. This indicates that extracted morphological features effectively characterize information from strong moisture absorption peaks. Furthermore, the selected morphological feature parameters exhibit stronger linear relationships, making them more suitable for PLS modeling. Among these, the CARS algorithm-selected feature wavelengths combined with the Pearson correlation-screened valley morphological feature fusion model demonstrated optimal performance, with Rp increasing from 0.7920 to 0.8688, RMSEP decreasing from 2.0434% to 1.7985%, and RPIQ rising from 2.3418 to 2.5371. In models with 40–55% moisture content, the performance of models based on CARS algorithm-selected spectral bands combined with morphological feature modeling showed slight deterioration and even overfitting. However, models utilizing screened morphological features alongside spectral bands demonstrated improved accuracy. This discrepancy likely stems from the fact that among the morphological feature parameters extracted from wave peaks and valleys, some parameters exhibit correlation while others remain largely uncorrelated. Among them, the prediction set accuracy achieved the highest value using the CARS algorithm-selected feature bands combined with the morphological feature fusion model of Pearson correlation-screened peaks. The Rp improved by 0.0441, the RMSEP decreased by 0.2848%, and the RPIQ increased by 18%. In models with 55–70% moisture content, the CARS algorithm’s selected feature bands combined with morphological feature modeling significantly exacerbate model overfitting. However, when screened morphological features are modeled alongside feature bands, overfitting is markedly suppressed while model accuracy improves. This may occur because among the morphological feature parameters extracted from wave peaks and valleys, some exhibit strong correlations with moisture content, while others show weak or no associations. Incorporating the latter interferes with the model’s learning of effective patterns, thereby inducing overfitting. Among these, the model combining feature bands selected by the CARS algorithm with morphological features of valleys screened by Pearson correlation demonstrated optimal performance, with RMSEP decreasing to 1.6007% and RPIQ increasing to 2.5220. Figure 6, Figure 7 and Figure 8 displays the spectral morphological characteristics of CARS fusion Pearson screening across different moisture intervals, presented as a scatter plot of apricot moisture content. The blue line represents the regression line for the training set, while the red line indicates the regression line for the prediction set.
To validate the model assumptions and conduct residual analysis, a fusion model combining feature bands within the 25–40% moisture content range with selected valley morphological features was selected as an example. Scatter plots of residuals versus predicted values and residuals versus measured values, along with a residual distribution histogram, were plotted as shown in Figure 9. The results indicate that residuals are randomly distributed around the zero line, with no discernible trend or heteroscedasticity observed. Their distribution approximates a normal distribution, suggesting that the model fits well and satisfies the fundamental assumptions.
Overall, within the range of 25–70% moisture content, the model with 55–70% moisture content demonstrated optimal predictive performance. This is because at excessively low moisture levels, reduced internal water content in apricots lowers the spectral signal-to-noise ratio and increases spectral variability. Conversely, at excessively high moisture levels, overly strong water absorption peaks mask other characteristic absorption signals, causing spectral information to saturate. Based on the modeling of extracted peak and valley morphological features, the accuracy of the valley morphological feature model is higher. This is because the data curve of valleys is smoother and less affected by noise. Conversely, the range of peak curves may contain more noise [23]. Based on the modeling results, using all seven valley parameters directly yields better performance than employing all seven peak parameters. However, after feature selection, the performance of both models converges, indicating that the selection process effectively eliminated redundant or noisy parameters from the peaks, thereby enhancing the overall quality of the feature set and improving modeling outcomes.

4. Conclusions

This study systematically investigated the influence of spectral morphological features on modeling moisture content in apricots across different moisture intervals. First, spectral data from various moisture intervals underwent smoothing and first-order differentiation processing. Subsequently, experiments are conducted by extracting peaks and valleys from a strong water absorption band to capture its spectral morphological features. These features are then fused with those extracted by the CARS algorithm for comparative modeling. Subsequently, considering that not all spectral morphological parameters exhibit strong linear relationships with moisture content, Pearson correlation analysis was employed to filter out parameters with weak linear correlations. Morphological parameters demonstrating relatively strong correlations were then integrated with feature bands extracted by the CARS algorithm for combined modeling, followed by comparative analysis. The main conclusions are as follows:
(1)
Within the moisture range of 25–70%, the model constructed at 55–70% moisture content yields optimal results. This moisture range provides the richest spectral information and highest signal-to-noise ratio for apricots. The CARS algorithm achieves an Rp of 0.8703, with other moisture intervals hovering around 0.8.
(2)
The model fusion results indicate that valley morphological features contribute more significantly and demonstrate greater stability than crest features, but they carry an overfitting risk. After screening four relevant parameters using Pearson correlation, they were then integrated with CARS spectral bands for modeling. This approach effectively suppressed overfitting and further enhanced the model’s accuracy. This classification model provides an effective means for the precise, non-destructive detection of moisture content during the apricot drying process.
This study focused on achieving relatively precise quantitative detection of apricots across different moisture content ranges, yielding certain results. However, it also has certain limitations:
(1)
Due to significant interference from outdoor noise and other factors, this study only tested the strong water absorption peak in the 850–970 nm range, extracting its spectral morphological features for analysis. Future studies may conduct detailed analysis of water absorption peaks at wavelengths such as 1200 nm and 1450 nm to develop hybrid modeling approaches for enhancing the accuracy of apricot moisture content detection.
(2)
There exists a certain nonlinear relationship between the moisture content of apricots and their spectral data and spectral morphological features; however, this study only examined linear relationships. Future research could establish nonlinear correlations between spectral morphological features and apricot quality using the Maximum Information Coefficient (MIC), and construct nonlinear models such as BP neural networks to further enhance model accuracy.

Author Contributions

Conceptualization, H.L. (Huaiyu Liu), H.L. (Huaping Luo) and H.L. (Hongyang Liu); methodology, H.L. (Huaiyu Liu), H.L. (Huaping Luo) and H.L. (Hongyang Liu); software, H.L. (Huaiyu Liu) and J.Y.; validation, H.L. (Huaiyu Liu), J.Y., L.K. and Y.T.; investigation, L.K. and Y.T.; data curation, H.L. (Huaiyu Liu); writing—original draft, H.L. (Huaiyu Liu) and H.L. (Hongyang Liu); writing—review and editing, H.L. (Huaiyu Liu) and H.L. (Hongyang Liu); supervision, H.L. (Huaping Luo), H.L. (Hongyang Liu) and J.Y.; project administration, H.L. (Huaping Luo) and H.L. (Hongyang Liu); funding acquisition, H.L. (Huaping Luo) and J.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by 24 Years of ‘Tianshan Talents’-L.H.P-South Xinjiang FruitsMulti-scale Near-Surface Quantitative Remote Sensing [524408001] and the National Natural Science Foundation of China’s (NSFC) ‘Multi-scale hyperspectral polarization quantitative remote sensing modeling of jujube in southern China’ [1119069]. This work was supported by the Tianchi Talented Young Doctoral Fund Project and Tarim University President’s Fund Project [TDZKBS202560].

Data Availability Statement

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

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Azodanlou, R.; Darbellay, C.; Luisier, J.-L.; Villettaz, J.-C.; Amadò, R. Development of a model for quality assessment of tomatoes and apricots. LWT-Food Sci. Technol. 2003, 36, 223–233. [Google Scholar] [CrossRef]
  2. Li, L.; Jia, X.; Fan, K. Recent advance in nondestructive imaging technology for detecting quality of fruits and vegetables: A review. Crit. Rev. Food Sci. Nutr. 2024, 65, 5181–5199. [Google Scholar] [CrossRef]
  3. Zhu, F.; Wei, H.; Shen, Y.; Zhang, Y.; Xu, N.; Zheng, H.; Qiao, X.; Liu, D. A multi-feature fusion based method for detecting the moisture content of withered black tea. J. Food Compos. Anal. 2025, 141, 107325. [Google Scholar] [CrossRef]
  4. Xue, H.; Xu, X.; Yang, Y.; Hu, D.; Niu, G. Rapid and Non-Destructive Prediction of Moisture Content in Maize Seeds Using Hyperspectral Imaging. J. Sens. 2024, 24, 1855. [Google Scholar] [CrossRef] [PubMed]
  5. Wan, G.; He, J.; Meng, X.; Liu, G.; Zhang, J.; Ma, F.; Zhang, Q.; Wu, D. Hyperspectral imaging technology for nondestructive identification of quality deterioration in fruits and vegetables: A review. J. Crit. Rev. Food Sci. Nutr. 2025, 65, 7923–7952. [Google Scholar] [CrossRef] [PubMed]
  6. Wang, W.-x.; Ma, B.-x.; Luo, X.-z.; Li, X.-x.; Lei, S.-y.; Li, Y.-j.; Sun, J.-t. Study on the Moisture Content of Dried Hami Big Jujubes by Near-Infrared Spectroscopy Combined with Variable Preferred and GA-ELM Model. J. Spectrosc. Spectr. Anal. 2020, 40, 543–549. [Google Scholar]
  7. Liu, Z.; Zhao, H.; Wang, X.; Wang, S.; Li, J.; Zhong, Y. PU-KBS: A Robust Positive and Unlabeled Learning Framework with Key Band Selection for One-Class Hyperspectral Image Classification. IEEE Trans. Geosci. Remote Sens. 2024, 62, 1–15. [Google Scholar] [CrossRef]
  8. Fu, B.; Sun, X.; Cui, C.; Zhang, J.; Shang, X. Structure-Preserved and Weakly Redundant Band Selection for Hyperspectral Imagery. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2024, 17, 12490–12504. [Google Scholar] [CrossRef]
  9. Di, Y.; Yu, J.; Luo, H.; Liu, H.; Kang, L.; Tong, Y. Study on Outdoor Spectral Inversion of Winter Jujube Based on BPDF Models. J. Agric. 2025, 15, 1334. [Google Scholar] [CrossRef]
  10. Liu, H.; Wei, Z.; Lu, M.; Gao, P.; Li, J.; Zhao, J.; Hu, J. A Vis/NIR device for detecting moldy apple cores using spectral shape features. Comput. Electron. Agric. 2024, 220, 108898. [Google Scholar] [CrossRef]
  11. Yan, J.; Wang, G.; Du, H.; Liu, Y.; Ouyang, A.; Hu, M. Convolutional neural networks fusing spectral shape features with attentional mechanisms for accurate prediction of soluble solids content in apples. J. Food Meas. Charact. 2024, 19, 412–423. [Google Scholar] [CrossRef]
  12. Zheng, Y.; Zhou, Y.; Liu, P.; Zheng, Y.; Wei, Z.; Li, Z.; Xie, L. Improving discrimination accuracy of pest-infested crabapples using Vis/NIR spectral morphological features. J. Food Meas. 2024, 18, 8755–8766. [Google Scholar] [CrossRef]
  13. Sun, J.Q.; Yin, Y.; Yu, H.C.; Yuan, Y.X.; Guo, L.G. Hyperspectral prediction method of perilla aldehyde content in perilla. J. Spectrosc. Spectr. Anal. 2024, 44, 2667–2674. [Google Scholar]
  14. Zhong, L.; Yang, S.; Rong, Y.; Qian, J.; Zhou, L.; Li, J.; Sun, Z. Indirect Estimation of Heavy Metal Contamination in Rice Soil Using Spectral Techniques. Plants 2024, 13, 831. [Google Scholar] [CrossRef]
  15. Yang, C.; Xu, J.; Feng, M.; Bai, J.; Sun, H.; Song, L.; Wang, C.; Yang, W.; Xiao, L.; Zhang, M.; et al. Evaluation of Hyperspectral Monitoring Model for Aboveground Dry Biomass of Winter Wheat by Using Multiple Factors. Agronomy 2023, 13, 983. [Google Scholar] [CrossRef]
  16. Li, Q.; Huang, Y.; Song, X.; Zhang, J.; Min, S. Moving window smoothing on the ensemble of competitive adaptive reweighted sampling algorithm. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 2019, 214, 129–138. [Google Scholar] [CrossRef]
  17. Yang, J.; Ma, X.; Guan, H.; Yang, C.; Zhang, Y.; Li, G.; Li, Z. A recognition method of corn varieties based on spectral technology and deep learning model. Infrared Phys. Technol. 2023, 128, 104533. [Google Scholar] [CrossRef]
  18. Li, H.; Liang, Y.; Xu, Q.; Cao, D. Key wavelengths screening using competitive adaptive reweighted sampling method for multivariate calibration. Anal. Chim. Acta 2009, 648, 77–84. [Google Scholar] [CrossRef] [PubMed]
  19. GB/T 5009.3-2016; National Standard for Food Safety Determination of Moisture in Food. China Standard Press: Beijing, China, 2016.
  20. Engelmann, L.; Bierl, R.; Kirchhoff, M.; Ries, J.B. Application of mid-infrared spectroscopy for soil analysis in calcareous Argania spinosa forests in Morocco. Geoderma Reg. 2025, 42, e00964. [Google Scholar] [CrossRef]
  21. Xu, T.; Wei, Z.; Xu, X.; Li, Z.; Rao, X. Study on the Evolution Mechanism of Spectral Features of Initial Damage in Apples. J. Food Bioprocess Technol. 2024, 18, 1377–1389. [Google Scholar] [CrossRef]
  22. Xie, D.D.; Guo, W.C.; Gao, M.J.; Liu, D.Y. Optical Properties of Strawberry Fruit and Their Relationship with Soluble Solids Content and Moisture Content. J. Food Sci. 2021, 42, 41–46. [Google Scholar]
  23. Guo, Y. Information Technology Based Wave Correction of Track Dynamic Inspection Data. J. Railw. Eng. 2022, 39, 46–49. [Google Scholar]
Figure 1. Outdoor sample placement.
Figure 1. Outdoor sample placement.
Agriculture 15 02486 g001
Figure 2. Schematic diagram of spectral morphological feature extraction.
Figure 2. Schematic diagram of spectral morphological feature extraction.
Agriculture 15 02486 g002
Figure 3. Research flowchart.
Figure 3. Research flowchart.
Agriculture 15 02486 g003
Figure 4. Spectral preprocessing for different moisture ranges (a) original hyperspectral curve; (b) hyperspectral curve after LOWESS; (c) hyperspectral curve after FDP.
Figure 4. Spectral preprocessing for different moisture ranges (a) original hyperspectral curve; (b) hyperspectral curve after LOWESS; (c) hyperspectral curve after FDP.
Agriculture 15 02486 g004
Figure 5. CARS selected feature bands for apricots in the 25–40% moisture content range.
Figure 5. CARS selected feature bands for apricots in the 25–40% moisture content range.
Agriculture 15 02486 g005
Figure 6. Scatter plot of apricot moisture content model in the 25–40% moisture range.
Figure 6. Scatter plot of apricot moisture content model in the 25–40% moisture range.
Agriculture 15 02486 g006
Figure 7. Scatter plot of apricot moisture content model in the 40–55% moisture range.
Figure 7. Scatter plot of apricot moisture content model in the 40–55% moisture range.
Agriculture 15 02486 g007
Figure 8. Scatter plot of apricot moisture content model in the 55–70% moisture range.
Figure 8. Scatter plot of apricot moisture content model in the 55–70% moisture range.
Agriculture 15 02486 g008
Figure 9. Residual analysis plot.
Figure 9. Residual analysis plot.
Agriculture 15 02486 g009
Table 1. Correlation between morphological feature parameters and moisture content.
Table 1. Correlation between morphological feature parameters and moisture content.
Moisture
Gradient (%)
Spectral
Features
HFFLFRLRA
25–40R1a0.300.030.310.120.180.080.35
R1b0.190.040.170.030.070.130.21
40–55R2a0.200.260.100.030.240.250.30
R2b0.170.260.020.010.120.200.30
55–70R3a0.050.070.010.140.160.120.10
R3b0.130.090.070.060.010.110.15
Table 2. Training and testing set partition results for apricot samples across different moisture intervals.
Table 2. Training and testing set partition results for apricot samples across different moisture intervals.
Moisture
Gradient (%)
Sample SetData RangeAverage
Value
Standard
Deviation
Coefficient of
Variation
25–40calibration set25.24–39.9433.023.860.12
prediction set25.21–39.2233.213.480.10
40–55calibration set40.03–54.8947.383.660.08
prediction set41.96–53.6348.372.920.06
55–70calibration set55.21–67.9860.153.220.05
prediction set55.82–64.8559.632.060.03
Table 3. Morphological parameters with relatively high Pearson correlation across different moisture ranges.
Table 3. Morphological parameters with relatively high Pearson correlation across different moisture ranges.
Moisture Gradient (%)Characteristic BandHighly Correlated Morphological Feature
Parameters
25–40R1aA, FL, H, L
R1bA, H, FL, R
40–55R2aA, F, R, L
R2bA, F, R, H
55–70R3aL, FR, R, A
R3bA, H, R, F
Table 4. PLS model results for the moisture content of 25–40% apricots under different modeling data sets.
Table 4. PLS model results for the moisture content of 25–40% apricots under different modeling data sets.
Feature Selection MethodsNumber of
Variables
Calibration SetPrediction Set
RcRMSECRpRMSEPRPIQ
CARS500.93841.34470.79202.04342.3418
CARS + R1a570.93451.35970.87751.93712.5013
CARS + R1b570.95161.17720.79052.37211.8508
CARS + PearsonR1a540.93051.40860.86881.79852.5371
CARS + PearsonR1b540.93701.34710.81891.97752.2201
Table 5. PLS model results for the moisture content of 40–55% apricots under different modeling data sets.
Table 5. PLS model results for the moisture content of 40–55% apricots under different modeling data sets.
Feature Selection MethodsNumber of
Variables
Calibration SetPrediction Set
RcRMSECRpRMSEPRPIQ
CARS560.94371.22720.81291.82912.2910
CARS + R2a630.94421.18130.81041.89632.5978
CARS + R2b630.95091.13970.78172.11021.7778
CARS + PearsonR2a600.93561.28590.82431.86742.2825
CARS + PearsonR2b600.93951.24870.85701.54432.7077
Table 6. PLS model results for the moisture content of 55–70% apricots under different modeling data sets.
Table 6. PLS model results for the moisture content of 55–70% apricots under different modeling data sets.
Feature Selection MethodsNumber of
Variables
Calibration SetPrediction Set
RcRMSECRpRMSEPRPIQ
CARS560.94320.99960.87031.63252.4729
CARS + R3a630.94740.95570.86151.65462.5893
CARS + R3b630.94930.96850.86161.47212.3646
CARS + PearsonR3a600.94231.00610.86781.53822.4193
CARS + PearsonR3b600.94181.01070.87231.60072.5220
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

Liu, H.; Luo, H.; Liu, H.; Yu, J.; Kang, L.; Tong, Y. Quality Detection Model for Apricots (Diaoganxing) Based on Spectral Morphological Feature Fusion Across Different Moisture Intervals. Agriculture 2025, 15, 2486. https://doi.org/10.3390/agriculture15232486

AMA Style

Liu H, Luo H, Liu H, Yu J, Kang L, Tong Y. Quality Detection Model for Apricots (Diaoganxing) Based on Spectral Morphological Feature Fusion Across Different Moisture Intervals. Agriculture. 2025; 15(23):2486. https://doi.org/10.3390/agriculture15232486

Chicago/Turabian Style

Liu, Huaiyu, Huaping Luo, Hongyang Liu, Jinlong Yu, Lei Kang, and Yuesen Tong. 2025. "Quality Detection Model for Apricots (Diaoganxing) Based on Spectral Morphological Feature Fusion Across Different Moisture Intervals" Agriculture 15, no. 23: 2486. https://doi.org/10.3390/agriculture15232486

APA Style

Liu, H., Luo, H., Liu, H., Yu, J., Kang, L., & Tong, Y. (2025). Quality Detection Model for Apricots (Diaoganxing) Based on Spectral Morphological Feature Fusion Across Different Moisture Intervals. Agriculture, 15(23), 2486. https://doi.org/10.3390/agriculture15232486

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