A Study on Hyperspectral Apple Bruise Area Prediction Based on Spectral Imaging
Abstract
:1. Introduction
2. Materials and Methods
2.1. Sample Preparation
2.2. Damage Test and Construction of Hyperspectral Imaging System
2.3. Sample Bruise Area Collection
3. Results
3.1. Characteristics of Apple Spectral Curves
3.2. Sample Set Delineation
- x: spectral data
- y: bruise area
- d: Euclidean distance between two samples
- N: number of samples
3.3. Spectral Pretreatment
3.4. Feature Band Selection
3.4.1. Extraction of Feature Wavelengths Using Competitive Adaptive Reweighted Sampling (CARS)
3.4.2. Extraction of Characteristic Wavelengths by Pearson Correlation Coefficient Method
3.4.3. Feature Wavelength Extraction Using the L1 Norm Method
3.5. Modeling
4. Discussion
4.1. ANN Modeling Structure and Parameter Selection
4.2. Comparison of Modeling Methods
4.3. Model Optimization
- Initialize the sparrow population location and fitness, set the number of producers (PD) = 0.7, the number of sparrows who perceive the danger (SD) = 0.1, the safety value (ST) = 0.6 parameters initial value, start the cycle and derive the current optimal sparrow individual location, and the best fitness value.
- Foraging behavior, update the finder position according to Equation (4) and update the joiner position according to Equation (5).
- Q: random number obeying normal distribution
- L: unit row vector
- N: maximum number of iterations
- a: random number between [0, 1]
- R2: alarm value
- ST: safety value
- : the value of the jth dimension of the ith sparrow at iteration t
- 3.
- Anti-predatory behavior, updating the location of the sparrow population according to Equation (6).
- Xworst: lowest adaptive sparrow location
- XP: optimal position occupied by the producer
- t: number of iterations
- Q: random number obeying normal distribution
- L: unit row vector
- A: A row vector containing only 1 and −1 elements at random,
- A+: AT(AAT)−1
- : current global optimal position
- β: random number that obeys normal distribution
- K: a random number between [−1,1]
- fi: individual fitness value
- fworst: worst fitness values
- fbest: the current global best values
- Ɛ: a constant close to 0
- 4.
- Update the historical optimal fitness and repeat steps 2 and 3 and end the loop when the maximum number of iterations is reached. The optimal individual position and fitness values are output. The optimization parameters and threshold process are shown in Figure 8.
4.4. Construction of the Fitted Surface
4.5. Fruit Minor Mechanical Bruise Area Prediction
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
Abbreviations
iVISSA | interval variable iterative space shrinkage approach |
SPXY | Samples set partitioning based on joint X-Y distances |
PLS-DA | partial least squares discriminant analysis |
PCA | principal component analysis |
RSS | Residual Sum of Squares |
MSC | multiplicative scatter correction |
SNV | standard normal variate transformation |
SG | Savitzky–Golay |
GS | Gaussian Smoothing |
CARS | Competitive adaptive reweighted sampling |
PLS | partial least squares |
ANN | Artificial Neural Network |
SVM | support vector machine |
RMSE | Root Mean Squared Error |
SSA | sparrow search algorithm |
References
- Song, W.; Jiang, N.; Wang, H.; Guo, G. Evaluation of machine learning methods for organic apple authentication based on diffraction grating and image processing. J. Food Compos. Anal. 2020, 88, 103437. [Google Scholar] [CrossRef]
- Wang, J.; Sun, L.; Feng, G.; Bai, H.; Yang, J.; Gai, Z.; Zhao, Z.; Zhang, G. Intelligent detection of hard seeds of snap bean based on hyperspectral imaging. Spectrochim. Acta A Mol. Biomol. Spectrosc. 2022, 275, 121169. [Google Scholar] [CrossRef] [PubMed]
- Pan, X.; Sun, L.; Li, Y.; Che, W.; Ji, Y.; Li, J.; Li, J.; Xie, X.; Xu, Y. Non-destructive classification of apple bruising time based on visible and near-infrared hyperspectral imaging. J. Sci. Food Agric. 2019, 99, 1709–1718. [Google Scholar] [CrossRef] [PubMed]
- Zhiming, G.; Wenqian, H.; Liping, C.; Yankun, P.; Xiu, W. Shortwave infrared hyperspectral imaging for detection of pH value in Fuji apple. Int. J. Agric. Biol. Eng. 2014, 7, 130–137. [Google Scholar] [CrossRef]
- Fan, S.; Li, C.; Huang, W.; Chen, L. Detection of blueberry internal bruising over time using NIR hyperspectral reflectance imaging with optimum wavelengths. Postharvest Biol. Technol. 2017, 134, 55–66. [Google Scholar] [CrossRef]
- Che, W.; Sun, L.; Zhang, Q.; Tan, W.; Ye, D.; Zhang, D.; Liu, Y. Pixel based bruise region extraction of apple using Vis-NIR hyperspectral imaging. Comput. Electron. Agric. 2018, 146, 12–21. [Google Scholar] [CrossRef]
- Wu, L.; He, J.; Liu, G.; Wang, S.; He, X. Detection of common defects on jujube using Vis-NIR and NIR hyperspectral imaging. Postharvest Biol. Technol. 2016, 112, 134–142. [Google Scholar] [CrossRef]
- Tian, X.; Wang, Q.; Huang, W.; Fan, S.; Li, J. Online detection of apples with moldy core using the Vis/NIR full-transmittance spectra. Postharvest Biol. Technol. 2020, 168, 111269. [Google Scholar] [CrossRef]
- Qin, J.; Lu, R. Detection of pits in tart cherries by hyperspectral transmission imaging. Trans. ASAE 2005, 48, 1963–1970. [Google Scholar] [CrossRef]
- Zhang, X.; Sun, J.; Li, P.; Zeng, F.; Wang, H. Hyperspectral detection of salted sea cucumber adulteration using different spectral preprocessing techniques and SVM method. LWT 2021, 152, 112295. [Google Scholar] [CrossRef]
- Zhang, M.; Li, G. Visual detection of apple bruises using AdaBoost algorithm and hyperspectral imaging. Int. J. Food Prop. 2018, 21, 1598–1607. [Google Scholar] [CrossRef] [Green Version]
- Yuan, R.; Guo, M.; Li, C.; Chen, S.; Liu, G.; He, J.; Wan, G.; Fan, N. Detection of early bruises in jujubes based on reflectance, absorbance and Kubelka-Munk spectral data. Postharvest Biol. Technol. 2022, 185, 111810. [Google Scholar] [CrossRef]
- Xing, J.; De Baerdemaeker, J. Bruise detection on ‘Jonagold’ apples using hyperspectral imaging. Postharvest Biol. Technol. 2005, 37, 152–162. [Google Scholar] [CrossRef]
- Wang, J.; Chang, C.-I. Independent component analysis-based dimensionality reduction with applications in hyperspectral image analysis. IEEE Trans. Geosci. Remote Sens. 2006, 44, 1586–1600. [Google Scholar] [CrossRef]
- Wenyi, T.; Laijun, S.; Fei, Y.; Wenkai, C.; Dandan, Y.; Dan, Z.; Borui, Z. The feasibility of early detection and grading of apple bruises using hyperspectral. J. Chemom. 2018, 32, e3067. [Google Scholar] [CrossRef]
- Wang, Z.; Tian, S. Ground object information extraction from hyperspectral remote sensing images using deep learning algorithm. Microprocess. Microsyst. 2021, 87, 104394. [Google Scholar] [CrossRef]
- Lee, W.-H.; Kim, M.S.; Lee, H.; Delwiche, S.R.; Bae, H.; Kim, D.-Y.; Cho, B.-K. Hyperspectral near-infrared imaging for the detection of physical damages of pear. J. Food Eng. 2014, 130, 1–7. [Google Scholar] [CrossRef]
- Tian, X.; Li, J.; Wang, Q.; Fan, S.; Huang, W.; Zhao, C. A multi-region combined model for non-destructive prediction of soluble solids content in apple, based on brightness grade segmentation of hyperspectral imaging. Biosyst. Eng. 2019, 183, 110–120. [Google Scholar] [CrossRef]
- Bai, Y.; Xiong, Y.; Huang, J.; Zhou, J.; Zhang, B. Accurate prediction of soluble solid content of apples from multiple geographical regions by combining deep learning with spectral fingerprint features. Postharvest Biol. Technol. 2019, 156, 110943. [Google Scholar] [CrossRef]
- Baranowski, P.; Mazurek, W.; Pastuszka-Woźniak, J. Supervised classification of bruised apples with respect to the time after bruising on the basis of hyperspectral imaging data. Postharvest Biol. Technol. 2013, 86, 249–258. [Google Scholar] [CrossRef]
- Huang, Y.; Lu, R.; Chen, K. Detection of internal defect of apples by a multichannel Vis/NIR spectroscopic system. Postharvest Biol. Technol. 2020, 161, 111065. [Google Scholar] [CrossRef]
- Qin, J.; Burks, T.F.; Kim, M.S.; Chao, K.; Ritenour, M.A. Citrus canker detection using hyperspectral reflectance imaging and PCA-based image classification method. Sens. Instrum. Food Qual. Saf. 2008, 2, 168–177. [Google Scholar] [CrossRef]
- Zhao, J.; Ouyang, Q.; Chen, Q.; Wang, J. Detection of bruise on pear by hyperspectral imaging sensor with different classification algorithms. Sens. Lett. 2010, 8, 570–576. [Google Scholar] [CrossRef]
- Rivera, N.V.; Gómez-Sanchis, J.; Chanona-Pérez, J.; Carrasco, J.J.; Millán-Giraldo, M.; Lorente, D.; Cubero, S.; Blasco, J. Early detection of mechanical damage in mango using NIR hyperspectral images and machine learning. Biosyst. Eng. 2014, 122, 91–98. [Google Scholar] [CrossRef]
- Zhang, B.; Huang, W.; Li, J.; Zhao, C.; Liu, C.; Huang, D.; Gong, L. Detection of Slight Bruises on Apples Based on Hyperspectral Imaging and MNF Transform. Spectrosc. Spectr. Anal. 2014, 34, 6. [Google Scholar] [CrossRef]
- Sun, Y.; Pessane, I.; Pan, L.; Wang, X. Hyperspectral characteristics of bruised tomatoes as affected by drop height and fruit size. LWT 2021, 141, 110863. [Google Scholar] [CrossRef]
- Zhang, Z.; Liu, Y.; Liu, L.; Pan, Y.; Fu, Y.; Li, H.; Li, C. Estimation of apple firmness using hyperspectral spectral indices. Spectrosc. Lett. 2022, 55, 146–156. [Google Scholar] [CrossRef]
- Jiang, H.; Hu, Y.; Jiang, X.; Zhou, H. Maturity Stage Discrimination of Camellia oleifera fruit using visible and near-infrared hyperspectral imaging. Molecules 2022, 27, 6318. [Google Scholar] [CrossRef]
- Tan, W.; Sun, L.; Yang, F.; Che, W.; Ye, D.; Zhang, D.; Zou, B. Study on bruising degree classification of apples using hyperspectral imaging and GS-SVM. Optik 2018, 154, 581–592. [Google Scholar] [CrossRef]
- Xu, A.; Li, R.; Chang, H.; Xu, Y.; Li, X.; Lin, G.; Zhao, Y. Artificial neural network (ANN) modeling for the prediction of odor emission rates from landfill working surface. Waste Manag. 2022, 138, 158–171. [Google Scholar] [CrossRef]
- Xue, J.; Shen, B. A novel swarm intelligence optimization approach: Sparrow search algorithm. Syst. Sci. Control Eng. 2020, 8, 22–34. [Google Scholar] [CrossRef]
Sample Set | Number of Samples | Maximum Value/cm2 | Minimum Value/cm2 | Mean Value/cm2 | Standard Deviation/cm2 |
---|---|---|---|---|---|
training set | 96 | 1.6672 | 0.5066 | 0.9599 | 0.3270 |
validation set | 48 | 1.6622 | 0.5116 | 0.9547 | 0.3304 |
text set | 48 | 1.6509 | 0.5203 | 0.9774 | 0.3245 |
Pre-Processing Method | Validation Set | Text Set | ||
---|---|---|---|---|
R | RMSE | R | RMSE | |
RAW | 0.8015 | 0.2554 | 0.9101 | 0.2754 |
First-order differential +MSC | 0.8554 | 0.2756 | 0.8531 | 0.2883 |
First-order differential +SNV | 0.8775 | 0.2004 | 0.8466 | 0.2210 |
First-order differential +SG | 0.9028 | 0.2005 | 0.9014 | 0.2045 |
First-order differential +GS | 0.8467 | 0.2320 | 0.8399 | 0.2487 |
Second difference +MSC | 0.8051 | 0.2694 | 0.8002 | 0.2808 |
Second difference +SNV | 0.8324 | 0.2406 | 0.8287 | 0.2536 |
Second difference +SG | 0.8214 | 0.2611 | 0.8157 | 0.2628 |
Second difference +GS | 0.8525 | 0.2359 | 0.8453 | 0.2498 |
MSC + SG | 0.8373 | 0.2525 | 0.8341 | 0.2547 |
MSC + GS | 0.7145 | 0.5104 | 0.7116 | 0.5112 |
SNV + SG | 0.8464 | 0.2499 | 0.8338 | 0.2501 |
SNV + GS | 0.7282 | 0.3979 | 0.7245 | 0.5025 |
Combination of Hidden Layer Output Layer Activation Functions | RMSE |
---|---|
logsig/logsig | 0.12074 |
logsig/tanh | 0.11503 |
logsig/sigmoid | 0.14382 |
tanh/logsig | 0.11964 |
tanh/tanh | 0.12105 |
tanh/sigmoid | 0.14977 |
CARS | L1 Norm | Pearson | ||||
---|---|---|---|---|---|---|
R | RMSE | R | RMSE | R | RMSE | |
ANN | 0.8675 | 0.1150 | 0.8410 | 0.1199 | 0.8489 | 0.1555 |
SVM | 0.8547 | 0.1206 | 0.8533 | 0.1238 | 0.8524 | 0.1220 |
PLS | 0.7401 | 0.2177 | 0.8144 | 0.1625 | 0.8014 | 0.1437 |
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. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, Y.; Li, Y.; Han, X.; Gao, A.; Jing, S.; Song, Y. A Study on Hyperspectral Apple Bruise Area Prediction Based on Spectral Imaging. Agriculture 2023, 13, 819. https://doi.org/10.3390/agriculture13040819
Zhang Y, Li Y, Han X, Gao A, Jing S, Song Y. A Study on Hyperspectral Apple Bruise Area Prediction Based on Spectral Imaging. Agriculture. 2023; 13(4):819. https://doi.org/10.3390/agriculture13040819
Chicago/Turabian StyleZhang, Yue, Yang Li, Xiang Han, Ang Gao, Shuaijie Jing, and Yuepeng Song. 2023. "A Study on Hyperspectral Apple Bruise Area Prediction Based on Spectral Imaging" Agriculture 13, no. 4: 819. https://doi.org/10.3390/agriculture13040819
APA StyleZhang, Y., Li, Y., Han, X., Gao, A., Jing, S., & Song, Y. (2023). A Study on Hyperspectral Apple Bruise Area Prediction Based on Spectral Imaging. Agriculture, 13(4), 819. https://doi.org/10.3390/agriculture13040819