A method for detecting early hidden damage of Korla pears by fusing hyperspectral image features and spectral variables
Patent Information
- Application Number
- CN202311472395.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-11-07
AI Technical Summary
这种早期的隐性损伤通常不会破坏果皮,也不会在外观上显示出差异,因此难以肉眼识别
[0033](1)基于可见-近红外高光谱技术,相较于传统的破坏性质量检测方法,本发明具备快速、无损和准确等特点。
Smart Images

Figure CN117491382B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of non-destructive testing of agricultural products, and in particular relates to a method for classifying and detecting early latent damage in Korla fragrant pears based on hyperspectral technology. Background Technology
[0002] Korla fragrant pears are highly favored by consumers for their delicious taste and high nutritional value. However, mechanical damage to the pears reduces their quality and seriously affects consumers' purchasing decisions. Mechanical damage is particularly prone to occur during the harvesting and storage of Korla fragrant pears, with latent damage being one of the most common and difficult-to-identify types. Because Korla fragrant pears are thin-skinned and juicy, they are easily bumped and bruised during harvesting, transportation, and sorting, leading to slight changes in flesh color and softening of the tissue. This early, latent damage usually does not damage the peel and does not show any visible difference, making it difficult to identify with the naked eye. Over time, the damaged areas are also susceptible to microbial attack, leading to fruit rot and mold, which in turn affects the quality of surrounding undamaged fruit. Furthermore, traditional manual sorting methods are time-consuming and labor-intensive, failing to meet the high-efficiency requirements of modern fruit sorting. Therefore, developing a rapid and effective detection method to identify early, latent damage in Korla fragrant pears before consumption is of significant practical importance. Summary of the Invention
[0003] To address the aforementioned problems, this invention aims to provide a method for rapidly classifying early latent damage in Korla fragrant pears, replacing the traditional, time-consuming, and labor-intensive classification methods that rely on manual operation. This method utilizes visible-near-infrared hyperspectral technology, offering advantages such as convenience, efficiency, and non-destructive treatment.
[0004] Technical solution:
[0005] A method for detecting early latent damage in Korla fragrant pears by integrating hyperspectral image features and spectral variables includes the following steps:
[0006] S1. Select Korla fragrant pears that are uniform in size, shape, maturity and without surface defects. After pretreatment, number them and divide them into 4 equal parts: control group and 3 experimental groups with different damage levels.
[0007] S2. Damage grading of samples: The control group is the undamaged NB group, and the three experimental groups with different damage levels are labeled as B1, B2 and B3 respectively, according to the degree of damage from smallest to largest.
[0008] S3. Acquiring Hyperspectral Corrected Images of Samples: To ensure the sample temperature remained consistent with room temperature, all samples were stored in darkness at 25℃ and 90% relative humidity. Samples were retrieved at each sampling time, and visible-near-infrared hyperspectral images were acquired. Hyperspectral images of the Korla pear samples were acquired in reflectance mode. Under the same conditions as sample acquisition, black and white correction was performed on the acquired hyperspectral images to mitigate the effects of uneven illumination distribution and camera dark current, and to eliminate redundant information. White correction used a white PTFE plate with a reflectivity of 99.99%, while black correction was performed by covering the lens completely with the camera cap. The final hyperspectral corrected image was obtained using the following formula:
[0009]
[0010] Where R Raw For the original image data, R Dark Rblack image data, Rwhite image data, Rblack and Rwhite are completely black image data. Cal The corrected image data;
[0011] S4. Spectral Information Extraction: The damaged areas of the pears in the hyperspectral corrected images of the samples are selected as Regions of Interest (ROIs). Each region is 60×60 pixels in size. Matlab software is used to identify the ROIs and extract the spectral data within the ROIs. The average of all spectra of each pixel in the ROI is used as the spectrum of each pear sample.
[0012] S5. Spectral preprocessing methods and feature variable selection: The preprocessing method used is multivariate scattering correction (MSC). After processing the spectral data using the preprocessing method, three methods are used to select feature wavelengths: continuous projection algorithm (SPA), competitive adaptive reweighting algorithm (CARS), and random frog jumping algorithm (RF).
[0013] S6. Randomly divide the hyperspectral dataset collected during the storage stage into a calibration set and a prediction set, with a ratio of 2:1.
[0014] S7. Establish three classification models based on full wavelength and feature wavelength respectively: Partial Least Squares Classification (PLS-DA), Support Vector Machine Classification (SVM-DA), and Subspace Classification (Subspace-DA). Compare the stability and accuracy of different models and select effective feature wavelengths.
[0015] S8. Image texture feature acquisition: Principal component PCA dimensionality reduction analysis is performed on the hyperspectral corrected image of the sample. Among the first principal component PC1, the second principal component PC2, and the third principal component PC3, PC1 reflects the texture information of the pear, PC2 contains the most obvious damage information, and the damage information in PC3 is not obvious. Therefore, the texture features of the gray-level co-occurrence matrix of the first two principal component images are extracted.
[0016] S9. Merge the effective feature wavelength information in S7 and the image texture feature information in S8 to obtain fused data; use the fused data as a sample set to construct the best discrimination model.
[0017] S10. Collect hyperspectral image features and spectral variables of the Korla fragrant pears to be tested, and obtain fused data; use the best discrimination model obtained in S9 to predict early latent damage in Korla townships.
[0018] Preferably, in S1: 240 Korla fragrant pears of uniform size, shape, maturity and no surface defects were selected. After the fragrant pear samples were placed at room temperature for 24 hours, they were washed with 75% alcohol aqueous solution, air-dried naturally, and all samples were numbered. These samples were divided into a control group and three experimental groups with different damage levels, each group including 60 samples.
[0019] Preferably, in S2: a hollow iron ball with a diameter of 3 mm and a weight of 25.65 g is used to freely drop the sample from heights of 0.15 m, 0.3 m, and 0.5 m, causing different degrees of impact damage; the impact energies Ei (J) calculated by the potential energy formula are 0.04 J, 0.08 J, and 0.133 J, respectively; the control group is represented by the undamaged NB group, the damage level with an impact energy of 0.04 J is represented by the B1 group, the damage level with an impact energy of 0.08 J is represented by the B2 group, and the damage level with an impact energy of 0.133 J is represented by the B3 group; the potential energy formula is:
[0020] Ei = mgh
[0021] In the formula, m is the mass of the hollow iron ball; g is the gravitational constant; and h is the drop.
[0022] Preferably, in S3: the sampling time is 2h, 1d, 2d, 3d, 5d, or 7d; the visible-near-infrared hyperspectral imaging system has a wavelength range of 400–1000nm and consists of a computer, a camera, an imaging spectrometer, a halogen light source, and a moving platform. The camera is a high-resolution CCD camera with a single-wavelength image pixel of 804×534, and the imaging spectrometer has a spectral resolution of 2.8nm, used to acquire image and spectral information of the pear sample. There are two halogen light sources, which are fixed on both sides of the camera at a projection angle of 45° at a distance of 30cm from the sample on the moving platform. The distance between the camera lens and the sample on the moving platform is 28cm. The intensity of the halogen light source is set to 45W, the exposure time is set to 3ms, and the moving speed is 7mm / s.
[0023] Preferably, in S5:
[0024] For the SPA method, the maximum number of characteristic wavelengths is set to 10–50;
[0025] The CARS algorithm obtains N subsets of variables and their corresponding N RMSECV values through N sampling runs; the subset with the lowest RMSECV value is selected as the feature wavelength variable set, and N is set to 50;
[0026] For the RF method, the number of characteristic wavelengths is set to 20–50.
[0027] Preferably, in S6: for each storage stage, the calibration set consists of 160 samples in total (40 samples × 4 groups), and the prediction set consists of 80 samples in total (20 samples × 4 groups), used to compare the accuracy of distinguishing groups NB, B1, B2, and B3 for each storage period.
[0028] For the entire storage period, the calibration set consists of 960 samples, including 240 undamaged pears and 720 pears with latent damage; the remaining prediction set consists of 480 samples, including 120 undamaged pears and 360 pears with latent damage, which are used to distinguish between undamaged and latently damaged pears in practical applications.
[0029] Preferably, based on the image after dimensionality reduction by principal component analysis, the first two principal component images are selected as the extraction objects for the gray-level co-occurrence matrix.
[0030] Preferably, in S9, the construction process of the optimal discrimination model is as follows:
[0031] By merging the effective feature wavelength information in S7 and the image texture feature information in S8, a fused data matrix of (a+b)×c is obtained, where a+b is the number of feature variables in the fused data, a is the number of effective feature wavelengths, b is the number of image texture features, and c is the number of samples. A PLS-DA model is then established based on the fused data.
[0032] The advantages of this invention are:
[0033] (1) Based on visible-near-infrared hyperspectral technology, compared with traditional destructive quality detection methods, the present invention has the characteristics of being fast, non-destructive and accurate.
[0034] (2) The present invention uses principal component dimensionality reduction analysis of hyperspectral images and gray-level co-occurrence matrix texture feature extraction to reduce the dimensionality of image data and improve computational efficiency.
[0035] (3) The present invention utilizes a data fusion method based on spectral information and image texture features. Compared with the traditional classification model that only uses spectral information, it not only makes full use of the image and spectral data of hyperspectral imaging technology, but also can detect pears with smaller hidden damage.
[0036] (4) This invention enables non-destructive and rapid detection of early latent damage in Korla fragrant pears, providing important technical support for post-harvest grading and quality and safety control during storage of Korla fragrant pears.
[0037] (5) The present invention has broad application prospects for the classification of early latent damage in Korla fragrant pears, and brings new technological breakthroughs to the field of fruit quality management. Attached Figure Description
[0038] Figure 1 The flowchart of the present invention (including comparative examples) for identifying early latent damage in Korla fragrant pears based on visible-near-infrared hyperspectral imaging.
[0039] Figure 2 Average spectra of damaged and undamaged Korla pears in the 400-1000 nm wavelength range during storage at 25℃.
[0040] Figure 3 The first three principal component images obtained from the hyperspectral image through principal component analysis. Detailed Implementation
[0041] A method for detecting early latent damage in Korla fragrant pears based on hyperspectral imaging and spectral analysis, combined with... Figure 1 The specific implementation method is as follows:
[0042] 1. Experimental Materials and Methods
[0043] A total of 240 Korla fragrant pears of uniform size, shape, maturity, and without surface defects were selected. After being placed at room temperature for 24 hours, the samples were washed with a 75% alcohol solution, air-dried, and numbered. They were divided into a control group and three experimental groups with different damage levels, each containing 60 samples. Hollow iron balls with a diameter of 3 mm and a weight of 25.65 g were dropped freely from heights of 0.15 m, 0.3 m, and 0.5 m, causing different degrees of impact damage to the pears. The impact energies Ei (J) calculated by the formula were 0.04 J, 0.08 J, and 0.133 J, respectively. The control group was denoted as NB (no damage), the damage level with an impact energy of 0.04 J was denoted as B1, the damage level with an impact energy of 0.08 J was denoted as B2, and the damage level with an impact energy of 0.133 J was denoted as B3.
[0044] Ei = mgh
[0045] In the formula, m is the mass of the hollow iron ball; g is the gravitational constant; and h is the height of free fall.
[0046] To ensure that the sample temperature was consistent with the room temperature, all samples were stored in the dark at 25°C and 90% relative humidity. Visible-near infrared hyperspectral data were collected at each sampling time (2h, 1d, 2d, 3d, 5d, 7d).
[0047] 2. Test instruments
[0048] A laboratory-scale Vis-NIR-HSI (400-1000nm) hyperspectral imaging system was used, including a computer, camera, imaging spectrometer, halogen light source, and moving platform. The camera is a high-resolution CCD camera with a single-wavelength image pixel of 804×534, and the imaging spectrometer has a spectral resolution of 2.8nm. It is used to acquire image and spectral information of pear samples. There are two halogen light sources, which are fixed on both sides of the camera at a projection angle of 45° at a distance of 30cm from the sample on the moving platform. The distance between the camera lens and the sample on the moving platform is 28cm. The intensity of the halogen light source is set to 45W, the exposure time is set to 3ms, and the moving speed is 7mm / s.
[0049] Hyperspectral images of Korla fragrant pear samples were acquired in reflective mode. The acquired hyperspectral images underwent black-and-white correction to mitigate the effects of uneven illumination distribution and camera dark current, and to eliminate redundant information. White correction used a white PTFE plate with a reflectivity of 99.99%, while black correction was performed by covering the lens completely with the camera cap. The final hyperspectral corrected image was obtained using the following formula:
[0050]
[0051] Where R Raw For the original image data, R Dark Rblack image data, Rwhite image data, Rblack and Rwhite are completely black image data. Cal This is the corrected image data.
[0052] 3. Spectral Information Extraction
[0053] Image segmentation was used to extract typical spectral data from pear samples. Damaged areas of the pears were selected as Regions of Interest (ROIs), each 3600 (60×60) pixels in size. Matlab software (MATLAB R2019b, Mathworks, USA) was used to identify ROIs and extract spectral data within them. The average of all spectra for each pixel within the ROI was calculated, and this average value was used as the spectrum for each pear sample. The average spectrum collected daily is shown below. Figure 2 As shown.
[0054] 4. Spectral preprocessing and selection of characteristic variables
[0055] The preprocessing method used was multivariate scattering correction (MSC). After processing the spectral data using the preprocessing method, three methods were employed to select characteristic wavelengths: continuous projection algorithm (SPA), competitive adaptive reweighting algorithm (CARS), and random frog-jumping (RF). For the SPA method, the maximum number of characteristic wavelengths was set to 10–50. The CARS algorithm obtained N subsets of variables and their corresponding N RMSECV values through N sampling runs. In this study, N was set to 50. The subset with the lowest RMSECV values was selected as the characteristic wavelength variable set. For the RF method, the number of characteristic wavelengths was set to 20–50.
[0056] 5. Partitioning of the sample set
[0057] The hyperspectral dataset collected during the storage period (7 days × 4 groups × 60 samples = 1680 samples) was randomly divided into a calibration set and a prediction set in a 2:1 ratio. For each storage period, the calibration set consisted of 160 samples (40 samples × 4 groups), and the prediction set consisted of 80 samples (20 samples × 4 groups), used to compare the accuracy in distinguishing between groups NB, B1, B2, and B3 at each storage period. For the entire storage period, the calibration set contained 960 samples (240 undamaged pears and 720 pears with latent damage), and the remaining 480 samples (120 undamaged pears and 360 pears with latent damage) were assigned to the prediction set for distinguishing between undamaged and latently damaged pears in practical applications.
[0058] 6. Extraction of texture features from hyperspectral images
[0059] Principal component analysis (PCA) was performed on the hyperspectral images, combined with... Figure 3 Texture features of the gray-level co-occurrence matrix of the first two principal component images are extracted.
[0060] 7. Data Fusion
[0061] The model based on hyperspectral characteristic wavelength variables is an a×c matrix, where a is the number of characteristic variables and c is the number of samples. The model based on hyperspectral image features in S8 is a b×c matrix, where b is the number of characteristic variables and c is the number of samples. By merging the spectral and image information from S7 and S8, a (a+b)×c matrix is obtained, where a+b is the number of characteristic variables in the fused data and c is the number of samples. The PLS-DA model is then established based on the fused data.
[0062] 7. Establishment of the discriminant model
[0063] Early latent damage in Korla fragrant pears was identified by establishing PLS-DA, SVM-DA, and Subspace-DA models based on full-spectrum information and spectral feature variables. Then, early latent damage in Korla fragrant pears was identified by establishing PLS-DA, SVM-DA, and Subspace-DA models based on hyperspectral image texture features. Finally, early latent damage in Korla fragrant pears was identified by establishing a PLS-DA model by combining hyperspectral image texture features with spectral feature variables.
[0064] Table 1 shows the accuracy results of three classification models based on full-spectrum information for determining the damage level of Korla pears. Overall, compared with the SVM-DA and Subspace-DA models based on full-wavelength spectral information, the PLS-DA model has the best classification performance, with overall accuracies of 96.7% and 93.4% for the calibration and prediction sets, respectively. For damage occurring just 2 hours prior, the recognition rate for group B1 is 85%, and for damage occurring 24 hours later, the recognition rate for group B1 is 95%. Therefore, the PLS-DA model is more suitable for identifying early latent damage in Korla pears. Table 2 shows the results of variable screening methods based on SPA, CARS, and RF for identifying the characteristic bands of damaged and undamaged pears. It can be seen that among the spectral variables extracted by the three different methods, the variables contributing the most are mainly located in the 400-600nm and 800-1000nm ranges. The accuracy results of the PLS-DA classification model based on the full spectrum and characteristic variables in distinguishing between healthy and damaged pears are shown in Table 3. Among these models, the RF-PLS-DA model showed the best predictive performance in identifying whether the pears were damaged, with a discrimination accuracy exceeding 96.7%. This result is close to the discrimination accuracy (96.8%) based on full spectrum information.
[0065] Table 1. Accuracy of PLS-DA, SVM-DA, and Subspace-DA models based on the full spectrum in identifying different degrees of damage to fragrant pears during storage.
[0066]
[0067]
[0068] Table 2 shows the characteristic bands of damaged and undamaged Korla pears selected using variable screening methods based on SPA, CARS, and RF.
[0069]
[0070] Table 3 shows the accuracy of the PLS-DA model in distinguishing between undamaged and damaged pears based on full spectrum and SPA, CARS, and RF variable screening.
[0071]
[0072] Furthermore, Tables 4 and 5 show the characteristic band results of the variable screening methods based on SPA, CARS, and RF for identifying damaged and undamaged pears, and the discrimination results of the PLS-DA model based on spectral characteristic variables for different degrees of pear damage. Table 5 shows that for group B1, which has the least damage, the classification accuracy of the RF-PLS-DA model reaches 90% 2 hours after the damage occurred, which is superior to the discrimination accuracy using the full wavelength method.
[0073] Table 4 shows the variable selection methods based on SPA, CARS, and RF used to identify the characteristic bands of pears with different degrees of damage during storage.
[0074]
[0075]
[0076]
[0077]
[0078] Table 5 shows the accuracy of PLS-DA, SVM-DA, and Subspace-DA models based on SPA, CARS, and RF variable screening in identifying different degrees of damage to pears during storage.
[0079]
[0080] Based on the hyperspectral image texture features extracted by GLCM, PLS-DA, SVM-DA, and Subspace-DA models were established to compare the discrimination accuracy of pears with different degrees of damage during storage. The results are shown in Table 6. The discrimination model based on hyperspectral image texture features has limited ability to identify the three early latent damage levels of pears. At 2 hours after the damage occurred, the classification accuracy of the PLS-DA model for group B1 was only 70%. However, when distinguishing between healthy and damaged pears, the PLS-DA model showed good classification performance, with an overall discrimination accuracy of 94.2% (Table 7). This result indicates that the hyperspectral image texture features extracted by GLCM can be used to distinguish between healthy and latently damaged pears, and its accuracy is close to that of the PLS-DA model based on full-spectrum information.
[0081] Table 6 shows the accuracy of PLS-DA, SVM-DA, and Subspace-DA models based on hyperspectral image texture features in identifying different degrees of damage to pears during storage.
[0082]
[0083] Table 7. Accuracy of PLS-DA model based on hyperspectral image texture features in distinguishing between undamaged and damaged pears.
[0084]
[0085] Table 8 shows the PLS-DA classification model based on spectral variables combined with image texture features. As shown in Table 8, the discriminant model based on the fusion of hyperspectral feature variables and texture features can improve classification accuracy. The PLS-DA model based on the fused data has the best discrimination effect on undamaged pears and pears with latent damage, with an overall accuracy of 98.8% for the prediction set. Table 9 shows the classification accuracy of the PLS-DA model based on spectral variables combined with image texture features for different degrees of damage to pears during storage. Compared with the overall discrimination accuracy of PLS-DA models based on spectral variables or image texture information, the overall accuracy of the PLS-DA model for group B1 increased from 90.8% to 93.3% throughout the storage process. Furthermore, the classification accuracy for group B1 reached 95% 24 hours after the storage damage occurred, and 100% 5 days after the damage occurred.
[0086] Table 8. Accuracy of PLS-DA model in distinguishing between undamaged and latently damaged pears based on spectral variables and image texture features.
[0087]
[0088] Table 9. Accuracy of the PLS-DA model based on spectral variables and image texture features in identifying different degrees of damage to pears during storage.
[0089]
[0090] This invention utilizes visible-near-infrared hyperspectral technology and employs three classification methods—PLS-DA, SVM-DA, and Subspace-DA—to establish a discrimination model for early latent damage in Korla pears during storage. First, a classification model is established based on the full spectrum and spectral feature variables selected through SPA, CARS, and RF variable filtering. Second, a discrimination model for identifying early latent damage in Korla pears based on hyperspectral image texture features is established. Finally, the spectral feature variables and image texture features are fused to construct a classification model for early latent damage in Korla pears. This allows for simple hyperspectral scanning of actual samples to be tested, and then, based on the established fusion classification analysis model, rapid identification of whether the test sample has latent damage can be achieved, thus realizing the purpose of identifying early latent damage in Korla pears. This operation method is simple, fast, highly accurate, and reliable.
[0091] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A method for detecting early latent damage in Korla fragrant pears by integrating hyperspectral image features and spectral variables, characterized in that, Includes the following steps: S1. Select Korla fragrant pears that are uniform in size, shape, maturity and without surface defects. After pretreatment, number them and divide them into 4 equal parts: control group and 3 experimental groups with different damage levels. S2. Damage grading of samples: The control group is the undamaged NB group, and the three experimental groups with different damage levels are labeled as B1, B2 and B3 respectively, according to the degree of damage from smallest to largest. S3. Acquiring Hyperspectral Corrected Images of Samples: To ensure the sample temperature remained consistent with room temperature, all samples were stored in darkness at 25℃ and 90% relative humidity. Samples were retrieved at each sampling time, and visible-near-infrared hyperspectral images were acquired. Hyperspectral images of the Korla pear samples were acquired in reflectance mode. Under the same conditions as sample acquisition, black and white correction was performed on the acquired hyperspectral images to mitigate the effects of uneven illumination distribution and camera dark current, and to eliminate redundant information. White correction used a white PTFE plate with a reflectivity of 99.99%, while black correction was performed by covering the lens completely with the camera cap. The final hyperspectral corrected image was obtained using the following formula: Where R Raw For the original image data, R Dark Rblack image data, Rwhite image data, Rblack and Rwhite are completely black image data. Cal The corrected image data; S4. Spectral Information Extraction: The damaged areas of the pears in the hyperspectral corrected images of the samples are selected as Regions of Interest (ROIs). Each region is 60×60 pixels in size. Matlab software is used to identify the ROIs and extract the spectral data within the ROIs. The average of all spectra of each pixel in the ROI is used as the spectrum of each pear sample. S5. Spectral preprocessing methods and feature variable selection: The preprocessing method used is multivariate scattering correction (MSC). After processing the spectral data using the preprocessing method, three methods are used to select feature wavelengths: continuous projection algorithm (SPA), competitive adaptive reweighting algorithm (CARS), and random frog jumping algorithm (RF). S6. Randomly divide the hyperspectral dataset collected during the storage stage into a calibration set and a prediction set, with a ratio of 2:
1. S7. Establish three classification models based on full wavelength and feature wavelength respectively: Partial Least Squares Classification (PLS-DA), Support Vector Machine Classification (SVM-DA), and Subspace Classification (Subspace-DA). Compare the stability and accuracy of different models and select effective feature wavelengths. S8. Image texture feature acquisition: Principal component PCA dimensionality reduction analysis is performed on the hyperspectral corrected image of the sample. Among the first principal component PC1, the second principal component PC2, and the third principal component PC3, PC1 reflects the texture information of the pear, PC2 contains the most obvious damage information, and the damage information in PC3 is not obvious. Therefore, the texture features of the gray-level co-occurrence matrix of the first two principal component images are extracted. S9. Merge the effective feature wavelength information in S7 and the image texture feature information in S8 to obtain fused data; use the fused data as a sample set to construct the best discrimination model. S10. Collect hyperspectral image features and spectral variables of the Korla fragrant pear to be tested, and obtain fused data; use the best discrimination model obtained in S9 to predict early latent damage of Korla fragrant pear.
2. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S1: A total of 240 Korla fragrant pears of uniform size, shape, maturity and no surface defects were selected. After the fragrant pear samples were placed at room temperature for 24 hours, they were washed with 75% alcohol solution, air-dried, and all samples were numbered. These samples were divided into a control group and three experimental groups with different damage levels, each group including 60 samples.
3. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S2: Hollow iron balls with a diameter of 3 mm and a weight of 25.65 g were dropped freely from heights of 0.15 m, 0.3 m, and 0.5 m, causing different degrees of impact damage to the samples. The impact energies Ei (J) calculated by the potential energy formula were 0.04 J, 0.08 J, and 0.133 J, respectively. The control group was represented by the undamaged NB group, the damage level with an impact energy of 0.04 J was represented by the B1 group, the damage level with an impact energy of 0.08 J was represented by the B2 group, and the damage level with an impact energy of 0.133 J was represented by the B3 group. The potential energy formula is: Ei = mgh In the formula, m is the mass of the hollow iron ball; g is the gravitational constant; and h is the drop.
4. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S3: the sampling time is 2h, 1d, 2d, 3d, 5d, or 7d; the visible-near-infrared hyperspectral imaging system has a wavelength range of 400–1000nm and consists of a computer, camera, imaging spectrometer, halogen light source, and moving platform. The camera is a high-resolution CCD camera with a single-wavelength image pixel of 804×534, and the imaging spectrometer has a spectral resolution of 2.8nm, used to acquire image and spectral information of the pear sample. There are two halogen light sources, which are fixed on both sides of the camera at a projection angle of 45° at a distance of 30cm from the sample on the moving platform. The distance between the camera lens and the sample on the moving platform is 28cm. The intensity of the halogen light source is set to 45W, the exposure time is set to 3ms, and the moving speed is 7mm / s.
5. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S5: For the SPA method, the maximum number of characteristic wavelengths is set to 10–50; The CARS algorithm obtains N subsets of variables and their corresponding N RMSECV values through N sampling runs; the subset with the lowest RMSECV value is selected as the feature wavelength variable set, and N is set to 50; For the RF method, the number of characteristic wavelengths is set to 20–50.
6. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S6: For each storage stage, the calibration set consists of 160 samples in total (40 samples × 4 groups), and the prediction set consists of 80 samples in total (20 samples × 4 groups). These are used to compare the accuracy of distinguishing between groups NB, B1, B2, and B3 for each storage period. For the entire storage period, the calibration set consists of 960 samples, including 240 undamaged pears and 720 pears with latent damage; the remaining prediction set consists of 480 samples, including 120 undamaged pears and 360 pears with latent damage, which are used to distinguish between undamaged and latently damaged pears in practical applications.
7. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, Based on the image after dimensionality reduction using principal component analysis, the first two principal component images were selected as the objects for extracting the gray-level co-occurrence matrix.
8. The method for detecting early latent damage in Korla fragrant pears based on hyperspectral images and spectra according to claim 1, characterized in that, In S9, the process of constructing the optimal discrimination model is as follows: By merging the effective feature wavelength information in S7 and the image texture feature information in S8, a fused data matrix of (a+b)×c is obtained, where a+b is the number of feature variables in the fused data, a is the number of effective feature wavelengths, b is the number of image texture features, and c is the number of samples. A PLS-DA model is then established based on the fused data.