Abstract
Considering that appearance of white button mushroom (WBM) as the trigger for registering its quality, this study was aimed at analyzing the visual cues by the application of image processing tools. While L-a-b colour space and skewness was used for estimating chromatic and morphological characteristics; onset of discolouration of WBM was predicted by hyperspectral image analysis. Undamaged (UD) and damaged (D) mushrooms were stored under refrigerated conditions (3–5 °C and 90% Rh). RGB and hyperspectral images were acquired on alternate storage days 1, 3, 5, 7 and 9. Weight loss, texture and moisture content of stored mushrooms were also recorded during the storage period. Colour changes in stored UD and D were found to be in b (21.55) and a (2399) value, respectively. Browning index in D was 83–212% higher than UD mushrooms across the storage period. Weight and firmness losses in D were higher by 65.9 and 31.4%, respectively than UD. Morphological characteristic in terms of aspect ratio and roundness were not found to vary significantly over the storage period for both UD and D mushrooms. Chemometrics revealed that multiplicative scatter correction was the best pre-processing tool and that onset on discolouration is conspicuous in the spectral region of 520–800 nm. k-NN fared better than PLS-DA for correct classification (100%) of UD and D mushrooms.
Keywords: Multi-spectral imaging, Hyperspectral imaging, Chemometrics, Principal component analysis, k-NN, PLS-DA
Introduction
The popularity and commercial importance of white button mushrooms (WBM) can be understood by the two facts; one—in India, out of the total mushroom produced, the share of WBM is 73%; two—contribution of WBM to export is 95%. This mushroom is exported both in fresh and processed forms (Sharma et al. 2017); however, the majority of domestic trade of WBM is in the form of fresh mushrooms for direct consumption. Postharvest shelf life of WBM is about 3–4 days at ambient temperature and 8–9 days under refrigerated storage (Gholami et al. 2017).
Consumer acceptance of WBM depends highly on the whiteness of the mushrooms. Browning is one of the major problems in harvested mushrooms. The browning and discolouration in WBM is associated with polyphenol oxidase activity, this activity is initiated as a result of physical and mechanical injury or a bruise infliction during picking, harvesting, handling and transportation. Mushroom browning leads to a lower shelf life, diminished value and rejection in the market all this mounting a huge loss to the producer (Zhang et al. 2018; Qu et al. 2020; Gowen and Donnell 2009). Hence, chromatic properties have a strong bearing on the quality vis-à-vis market value of WBM.
The use of visible NIR hyperspectral imaging has been investigated for non-destructive real-time prediction of polyphenol oxidase activity in mushroom caps, where, it was conclusively proven that enzymatic activity was high in damaged mushrooms than undamaged ones (Gaston et al. 2010; Esquerre et al. 2012). Hyperspectral imaging (HSI) acquires both physical (spatial) as well as chemical attributes from the object (Khan et al. 2020). The information obtained from hyperspectral imaging would be helpful in identifying the mushrooms which would exhibit discolouration in immediate future. The desired HSI protocols can be used by an online system for sorting out the damaged mushrooms before they find a place in the market. The spectral data obtained during HSI would be of a large volume (Chakraborty et al. 2020), application of suitable chemometrics shall enable the sifting out of vital information with respect to mushroom sorting based on polyphenol oxidase activity. Chemometrics would involve supervised or unsupervised classification (PLS-DA, ANN, k-NN, etc.), exploratory analysis (PCA, ICA), and quantification (PCR, PLSR, MLR).
Besides the colour of the mushroom, other common criteria for mushroom grading and sorting are their size and physical defects. Manual inspection and grading of mushrooms are laborious, time-consuming and inaccurate (Heinemann et al. 1994). Image processing is a potent tool for eliminating the judgmental inconsistencies of humans while being highly accurate, fast and precise (Wang et al. 2018). Time dependent morphological characteristics of mushrooms, like the roundness, aspect ratio, colour value (Commission Internationale de l’Eclairage: Lab colour space), change of colour (∆E) can be identified by image processing. Uploading the protocols of identification of these markers for grading can be achieved for the online system. Researchers across the globe have concluded that the postharvest texture and colour changes in mushrooms are required to be addressed from the viewpoint of commercialization of the WBM variant (Emine and Semih 2020; Khan et al. 2014; Liu and Wang 2012; Gholami et al. 2017). Several studies on hyperspectral imaging and digital image processing for mushrooms have been reported individually but no work has been reported so far on the selection of featured wavelength at which damaged mushrooms can be identified. In this manuscript, the efficacy of spectral imaging for classifying damaged and undamaged mushrooms is investigated under a given set of conditions and instruments. The outcome of this study can be taken into consideration for the development of device for rapid detection of onset of damage in WBM.
This manuscript aims at presenting; application of image processing to gauge the changes in grading criteria for WBM in terms of shape (aspect ratio, roundness) and colour (browning index, Lab values, colour change) values during the storage period, hyperspectral imaging strategy for capturing the onset of damage in the WBM at a stage when it appears to be normal to human eyes.
Material and methods
Sample preparation
Farm fresh WBM were procured from a local vegetable supplier. Stems of 30 mushroom samples were trimmed by a sharp knife in such a way that the mushroom sample will stand on its stem. Out of the total of 30 samples, 15 samples were labeled as undamaged (UD) set and another 15 samples were artificially damaged (D). Damage was inflicted to the samples by subjecting them to mechanical shaking in a gyratory shaker (Exacta Furnaces, New Delhi, India) at 300 rpm for 10 min. All UD and D mushroom samples were placed in pulp trays, 3 mushrooms per tray, and were wrapped with plastic film. All the 10 trays were stored under refrigerated (3–5 °C and 90% Rh) conditions. On days 1, 3, 5, 7, and 9 one tray each from UD and D was picked for hyperspectral and RGB image acquisition. Another independent set of 120 mushroom samples (60 UD and 60 D) were stored for damage detection study using hyperspectral imaging on day 0 (day of harvest) and day 1 (next day of harvest).
Weight loss
Weight loss is an important physiological change in button mushrooms which results in a direct monetary loss to the producer. This value for each mushroom sample was measured (± 0.01 g) as the difference of initial mass and mass of sample on the day of observation. Weight loss was represented as percentage weight loss with respect to the initial weight of mushroom sample (Taghizadeh et al. 2010).
Moisture content
Marketable texture of mushrooms is dependent on the right moisture content; storage should not alter the moisture content whereby adversely affecting the texture of mushrooms. Method suggested by Gowen et al. (2008b, a) with slight modification was used to determine moisture content (%, wet basis) of mushroom stored under refrigerated (3–5 °C and 90% Rh) condition.
Digital image acquisition
Multispectral images of button mushroom samples were acquired in the red, green and blue colour space by using 12 MP and 24X optical zooming digital camera (KKL-Z980B, Eastman Kodak, Rochester, NY). The images were captured for mushroom sets UD and D on the 0th, 1st, 3rd, 5th, 7th and 9th day of storage. An illumination of 2800 lumens was provided by two fluorescent lights (B22, Philips India Ltd.) sources of 14 W each fixed at an angle of 45° with respect to mushroom samples inside a closed wooden box (40 × 40 × 50 cm). A wooden block with hemispherical depression was fitted at the centre of the floor of the box, on the line of convergence of the incident light from the bulbs for holding a mushroom sample in a standing position. The inner wall surfaces of wooden box and sample platform was applied with non reflecting black paint.
Morphological measures
Morphological features of the WBM cap are the first trigger for consumer acceptance. In the present study, these features were recorded in terms of aspect ratio, roundness and shape factor of mushroom cap. Morphological features were measured with the help of images of mushrooms caps with MATLAB 2016a using the following definitions,
1 |
2 |
where r is the radius of mushroom cap.
Measurement of colour and browning index
Acquired RGB images of set UD and D were processed using MATLAB 2016a. Complex background of the images was removed by selecting the green channel threshold values of the images. The region of interest was isolated and converted into binary form for measurement of colour and morphological characteristics. After isolating ROI, RGB images were further converted into Lab space images and mean L (0, dark to 100, white), a (−120, green to + 120, red) and b (−120, blue to + 120, yellow) colour values were calculated for the cap portion of WBM images. Browning index was determined by using the method reported by (Mahopatra et al. 2010).
3 |
4 |
Difference in mushroom colour (∆E) was determined as the difference between colour values on the 0th day of storage and nth day of observation. Colour difference values were estimated by using the Eq. (5) as given by CIE.
5 |
where Ln, an and bn are colour values on nth day of observation and L*, a* and b* are initial colour values of mushrooms (0th day).
Also, loss of whiteness of UD and D mushrooms was quantified from the change in gray scale histograms. Histogram shape change was determined in terms of skewness (Eq. 6);
6 |
where Pi is pixel frequency at ith brightness level, is mean pixel frequency, N is number of data points and s is standard deviation of P. Positive skewness values indicate the distribution of higher frequencies on right side of the histogram and negative values indicates higher frequencies on left side of the histogram.
Mushroom texture
Texture of the WBM was determined in terms of its firmness, the same was measured by using a texture analyzer (Model: TA133 XT Texture Analyzer of Stable Micro Systems, UK) with a cylindrical probe (P-25) of 25 mm diameter. WBM being irregular and non-symmetrical in shape required extraction of a cylindrical portion of diameter 8.5 mm and 10 mm length by means of stainless steel hollow cylindrical tool of the same diameter. Texture analyser test settings were set as return-to-start, compression mode, pre-test, post-test and test speed as 1 mm/sec. Before selecting the target mode as strain, the height of the probe was calibrated as per the sample dimension as 20 mm. The strain value was selected as 50% (Mahopatra et al. 2010).
Hyperspectral imaging
WBM samples were imaged by using a hyperspectral imaging system (OLES30, Specim, Oulu, Finland) comprising a digital camera (MV1-D1312, Photonfocus AG, Switzerland), Long pass glass filter of diameter 25.4 mm (Schott OG-590, Edmund Optics Inc., New Jersey, USA), spectrograph (IM Spector V10E, Specim, Spectral Imaging Ltd., Oulu, Finland) and three number of tungsten-halogen bulbs of 50 W each installed at an angle of 45° with the vertical plane of camera focus. The software interface ‘Specim DAQ version 3.62’ was used for setting up the camera parameters, viewing the image and data acquisition. Operating range of hyperspectral imaging system was 398–1003 nm with a spectral resolution of 6.237 nm and 97 bands per pixel. This system uses push-broom line scanning method of image acquisition and one line scan comprises 1312 pixels.
Reflectance calibration
Dark and white reference images were acquired for calibration of the system; this was repeated before every acquisition of mushroom images. Dark reference image (0% reflectance) was obtained by closing the camera lens with non-reflecting cap and when lights were turned off. White reference was obtained by acquiring the hyperspectral image from the Teflon strip of standard reflectance (99.9%). White reference images and mushroom sample images were acquired under the same lighting conditions. The relative reflectance was obtained by the following expression (Chakraborty et al. 2020).
7 |
Spatial corrections and extraction of mean spectra
Cropping of the corrected hyperspectral images was carried out before any further analysis. K-means clustering was used to remove background of the images so that the variation between reflectance values of mushroom and image background could be negated. Masking was done to minimize the effect of uneven brightness and shadows (Wang et al. 2018). Masking converts the image into binary form. Mushrooms were classified as UD and D by using their mean spectral values. Average reflectance of image was obtained by taking the average of all pixel values.
Data pre-processing
The spectral data was pre-processed to counter the effect of spectral noise and scattering of light that are imminent during the image acquisition process. Also spectral differences were highlighted for further analysis. Pre-processing treatments were applied in combination so as to amend the effect of scattering and noise (Ravikanth et al. 2017). The most commonly used technique for correcting the scattering in near-infrared and infrared spectra is multiplicative scatter correction (MSC). MSC was applied for reducing the scattering effect, while noise due to instrument was removed by adopting image smoothening technique called digital Savitsky-Golay (order 2 and interval 7) filter. Scattering caused by different constituents of samples was reduced by MSC. It can be represented by the following expression,
8 |
9 |
where yiO is the original spectrum, yir is the reference spectrum and yic is the corrected spectrum, is constant, ai and bi are correction coefficients of the ith sample and US is unique structure. From Eqs. (8) and (9) it is evident that, individual spectrum is multiplicatively and additively transformed into the mean spectrum, implying that MSC decreases the scatter variance between samples instead of eliminating the scatter effect (Andersson et al. 1999).
Principle component analysis
Principle component analysis (PCA) is the most common multivariate method used for transforming larger data into a small data set (Kemsley 1996) and while doing so, it retains the important information of the original dataset. PCA was used to reduce the dimension of hyperspectral dataset for easy feature selection and elimination of multi co-linearity (Romero 2010). PCA helped in the determination of wavelengths for the accurate detection of damaged mushrooms and prediction of firmness, browning and weight loss of the mushrooms. Hyperspectral dataset formed a hypercube of dataset (H) having dimensions as X × Y × λ. The dimension of hypercube having a larger dataset can be reduced by applying PCA into loading and set of scores (Amigo 2010). Following expression represents the matrix of transformed data.
10 |
where Hi is the new dataset (XY × λ) after the transformation, S represents the score surface (XY × F), LS is loading profile (Dimension: F × λ) and E is residual matrix (XY × λ).
Supervised classification
Supervised learning has been widely used and successful for the application of hyperspectral imaging in agriculture and food industry (Ravikanth et al. 2017). In the present study, WBM samples were classified into D and UD on the basis of storage days using supervised classification techniques Partial least square—Discriminant analysis (PLS-DA) and k-NN (k-Nearest neighbour). A total of 120 samples were divided into training (80) and testing data (40) sets in such way that 20 samples of each class assigned to training and 10 samples for testing. Both the models were trained using training data set and internal cross-validated using Venetian blinds approach with four groups. The optimum number of latent variables (LVs) in PLS-DA and k value in k-NN techniques was selected based on the error rate and number of non-assigned samples. The developed models were cross-validated using testing data set.
PLS –DA
This method includes the classification as well as regression approaches. This method has been successfully used for the analysis of hyperspectral image data (Mahanti et al. 2020). In this method, misclassified samples are assigned a ‘0’, and correctly classified samples are called as ‘1’. In the present work, mushrooms were classified as either undamaged (UD) or damaged (D). Minimum rate of error and number of unassigned samples at the time of cross-validation formed the basis of selection of latent variables.
k-NN
‘k-NN’ is an effective algorithm for supervised classification. Number of closest objects is denoted as ‘k’ which are classified as per the k-nearest neighbour in the domain of data. k-NN is a parametric and nonlinear method used for multi-class problems (Ballabio and Todeschini 2009). ‘k’ values have a major influence on the performance of the developed model (Kong et al. 2013). Model accuracies for classification depend on datasets (Zheng et al. 2014). The k-NN model was developed for the classification of mushrooms into UD and D based on the spectral reflectance values and ‘k’ values for data treatments were selected based on minimum error.
Statistical analysis
Strength of association among the variables was studied among all the parameters studied during the storage period and obtained from image analysis. Pearson’s correlation coefficients was used to measure the extent of linear relationship between two parameters. Tukey’s honest significant difference (HSD) test was applied for post hoc analysis of data to track the significant differences in parameters across the storage period. SAS 9.3 statistical software was used for the data analysis.
Performance of the developed classification models were validated statistically in terms of specificity, sensitivity, class error, and classifiers. Model specificity indicates the ability of developed model to reject the items of other classes.
11 |
Model sensitivity is a measure of the ability of a model to accurately classify the items belonging to a particular class.
12 |
13 |
14 |
where TN is true negative which sets out not pertaining items and TP is the true positive which sets out the correctly classified items as pertaining to a particular class. FN is the false negative enumerates the items incorrectly assigned as not pertaining and FP is false positive enumerates the items classified incorrectly as pertaining to a particular class (Caballero et al. 2019; Ballabio and Consonni 2013; Amigo et al. 2015). Model accuracy is the ratio of correctly assigned items to the total number of items (Ballabio and Consonni 2013).
Software
Analysis of RGB and hyperspectral imaging data was performed by using the MATLAB platform (Mathworks, Inc., Natick, MA, USA). Hyperspectral reflectance was corrected by using built-in functions in the MATLAB. Hyperspectral image data was processed by using a HYPER-tool in MATLAB environment (Amigo et al. 2015). Classification toolbox in MATLAB which comprises tools for pattern recognition, k- NN, and PLS-DA was used for classifying mushroom samples into UD and D mushrooms.
Results and discussion
Colour
Colour or the difference of it for the WBM with respect to L, a and b values were measured during the entire storage period of 9 days at refrigerated storage conditions of 3–5 °C and 90% Rh for both UD and D sets. The mean scores and standard deviation values of parameters measured during the storage period and studied by using image analysis are presented in Table 1. There was a loss in L value of about 11.78 and 30.35%, respectively for UD and D mushrooms. This was indicative of the fact that mechanical damage caused a sizeable deviation from the whiteness of the mushrooms. The overall change in colour of the mushrooms considering the whole L-a-b colour space model indicated that the colour differences (∆E) in UD and D mushrooms were recorded to be 17.33 and 39.22, respectively, by the end of 9 days of storage (Table 1). Overall discolouration for the entire period of storage in damaged set of mushrooms was observed to be 126% higher than the undamaged set. An L value of 79 has been reported to be a threshold and an indicator of the freshness of button mushrooms (Gowen et al. 2009). Commercial acceptance of mushrooms in wholesale and retail markets require the L values to be above 80 and 69, respectively (Taghizadeh et al. 2009). In this study, the initial mushroom samples may have lost some of their freshness during the transit from market to the laboratory and therefore the average initial L value was recorded as 75.2 ± 0.10 on day 0. RGB images of UD and D mushrooms stored under refrigerated conditions are shown in Fig. 1a.
Table 1.
Parameters | Undamaged set (UD) | ||||||
---|---|---|---|---|---|---|---|
Storage period (Days) | |||||||
0 | 1 | 3 | 5 | 7 | 9 | CV | |
WL | 0.00 b | 1.77b ± 0.27 | 5.26a ± 0.11 | 6.74a ± 0.77 | 7.88a ± 2.26 | 8.85a ± 1.18 | 66.28 |
M | 97.60a ± 0.45 | 95.82b ± 0.52 | 92.34c ± 0.35 | 90.2d ± 0.15 | 89.0d ± 0.65 | 87.11e ± 0.61 | 4.39 |
L | 75.28a ± 0.10 | 72.96a ± 3.90 | 62.88c ± 1.08 | 72.03ab ± 2.65 | 66.41bc ± 1.57 | 66.41bc ± 2.55 | 6.90 |
a | − 4.43a ± 0.30 | − 4.00a ± 0.24 | − 3.33a ± 0.97 | − 3.76a ± 0.49 | − 4.11a ± 0.25 | − 2.95a ± 1.11 | 14.39 |
b | 17.63c ± 0.35 | 19.57bc ± 0.91 | 24.44abc ± 1.92 | 26.75abc ± 5.72 | 27.90ab ± 3.64 | 31.82a ± 5.47 | 21.55 |
BI | 21.47c ± 0.87 | 26.24bc ± 2.48 | 43.58abc ± 6.80 | 41.41abc ± 12.86 | 48.06ab ± 9.77 | 59.08a ± 12.67 | 34.96 |
∆E | 0c | 4.28bc ± 1.81 | 14.24a ± 1.91 | 9.93ab ± 5.91 | 13.62a ± 3.41 | 17.33a ± 2.82 | 66.62 |
AR | 0.97a ± 0.005 | 0.98a ± 0.018 | 0.97a ± 0.008 | 0.94a ± 0.052 | 0.96a ± 0.022 | 0.97a ± 0.026 | 1.33 |
R | 0.96a ± 0.005 | 0.96a ± 0.008 | 0.95a ± 0.010 | 0.93a ± 0.029 | 0.95a ± 0.023 | 0.93a ± 0.015 | 1.58 |
F | 14.36a ± 0.61 | 13.56a ± 3.84 | 12.69a ± 1.41 | 11.80a ± 5.53 | 6.83a ± 2.32 | 8.42a ± 3.76 | 26.56 |
Parameters | Damaged set (D) | ||||||
---|---|---|---|---|---|---|---|
Storage period (Days) | |||||||
0 | 1 | 3 | 5 | 7 | 9 | CV | |
WL | 0.00d | 1.97 cd ± 0.68 | 4.99bc ± 1.56 | 7.37b ± 1.90 | 8.28ab ± 0.98 | 11.37a ± 1.83 | 74.30 |
M | 97.60a ± 0.45 | 95.34b ± 0.70 | 93.46c ± 0.36 | 92.15d ± 0.12 | 90.50e ± 0.42 | 88.31f ± 0.21 | 3.59 |
L | 75.28a ± 0.10 | 64.59ab ± 0.97 | 64.85ab ± 3.58 | 62.08ab ± 6.51 | 63.33ab ± 8.95 | 52.43b ± 9.04 | 11.44 |
a | − 4.43b ± 0.30 | − 1.30ab ± 2.12 | − 2.66b ± 1.01 | 2.21ab ± 3.80 | 0.44ab ± 4.01 | 4.90a ± 2.85 | 2399 |
b | 17.63d ± 0.35 | 36.60c ± 3.80 | 38.12bc ± 2.15 | 45.81ab ± 3.26 | 48.07a ± 3.21 | 47.20a ± 2.92 | 29.51 |
BI | 21.47c ± 0.87 | 77.99bc ± 16.56 | 79.95bc ± 1.88 | 128.65ab ± 43.55 | 129.74ab ± 42.27 | 184.51a ± 51.13 | 54.23 |
∆E | 0.00d | 21.93c ± 4.14 | 23.41bc ± 0.58 | 32.48bc ± 6.41 | 34.00ab ± 4.62 | 39.22a ± 4.00 | 55.50 |
AR | 0.94a ± 0.005 | 0.95a ± 0.055 | 0.94a ± 0.010 | 0.89a ± 0.057 | 0.94a ± 0.038 | 0.96a ± 0.024 | 2.61 |
R | 0.90a ± 0.005 | 0.94a ± 0.030 | 0.94a ± 0.006 | 0.91a ± 0.019 | 0.94a ± 0.019 | 0.90a ± 0.049 | 2.13 |
F | 16.06a ± 1.64 | 18.12a ± 7.60 | 9.45ab ± 0.51 | 8.33ab ± 3.99 | 5.83b ± 0.93 | 5.77b ± 1.39 | 49.74 |
UD—Undamaged set, D- Damaged set, WL—Weight loss, M—Moisture content, L—L value, a—a value, b—b value, BI—Browning index, ∆E—Color difference, AR—Aspect ratio, R—Roundness, F—Firmness, CV—Coefficient of variation
Some discolouration over the period of storage is evident in UD mushrooms also due to the natural senescence process. The major colour change in UD mushrooms was seen to be as an increased yellowness (b value = + 21.55%) whereas in D set the major colour change was increased redness (a value = + 2399%) across the storage period of 9 days. Yellowness in undamaged mushrooms is due to the senescence and ripening of fruit bodies (Emine and Semith, 2020). Enhanced redness values can be attributed to the development of brown pigmentation which was more prominent in the D mushrooms, the same can be observed from RGB images of mushrooms (Fig. 1a). An overall colour difference (∆E) in D set can be associated with b value (Fig. 2). Also, 94% of colour difference in damaged set across the storage period was determined by the differences in b value. In both the sets (UD and D) variation of b values were seen to be strongly associated with the progression of storage period (Fig. 2). Linear relationship was found between b values and storage days indicating the possibility of using this relationship for predicting the approximate harvesting time of mushrooms based on their b values. Variation of a value for damaged mushrooms was much greater across the storage period (CV = 2399%) when compared to L value (CV = 11.441%) and b value (CV = 29.517%). Increase of a value from − 4.43–4.90 indicates that the major colour change in D mushrooms was redness colour component; whereas for UD mushrooms, the major colour change was their yellowness over the period of storage. These figures suggest the possibility of using a value for identifying and distinguishing the damaged mushrooms from undamaged ones. Similar results regarding a value have been reported by Taghizadeh et al. (2009).
Browning changes
Storage time had a significant effect (p < 0.05) on the browning indices of mushrooms. Browning in WBM is governed by accelerated enzymatic activities as a result of mechanical damage during its handling and temperature abuse during its storage. Browning can also be attributed to the reaction of enzyme with the substrate material, brown pigmentation can be stopped by eliminating the substrate material from the surface of button mushrooms (Mohapatra et al. 2010). Even under refrigerated storage conditions rate of browning in damaged mushrooms was uncontrolled. Browning indices for D were found to be 197–212% higher as compared to the set UD. Highest values of browning indices for UD and D sets were recorded to be 59.1 and 184.5, respectively. Browning index of 59.1 on 9th day in UD set and 77.9 on first day in D set clearly indicates that the damaged mushrooms lost their white appearance and acceptability on the first day itself (Table 1). As storage time progressed the browning index in D set was seen to be more intensified than in UD set. BI for UD mushrooms was highly correlated with b values whereas for D mushrooms BI was highly associated with a value (Fig. 2). Around 96% browning changes in UD mushrooms was explained by differences in b values and in D mushrooms 94% browning changes were determined by a value.
Image histograms
Representative grayscale histograms of UD and WBM images of day 0 and 9 are presented in Fig. 3. It can be evinced that the shapes of image histograms varied along the storage period. Skewness values of histograms were found by performing the image analysis in MATLAB 2016a. Skewness values of both UD and D mushroom images decreased during the storage period, implying that pixel frequencies shifted from the right (bright) side to the left (dark) side of the histogram. The change in skewness for UD and D mushrooms over the period of 9 days was found to be 36.5 and 40.4%, respectively. The change in the colour scheme of the mushrooms over the period of storage has already been reported in Fig. 1a.
Weight loss and textural changes in WBM
Total weight loss across the storage period was less for UD mushrooms as compared to the D (Table 1). There was no noticeable change in weight for the first 5 days of storage of both UD and D mushrooms. This was followed by a rapid loss of weight by D as compared to UD. Upon 9 days of storage, the weight loss of mushrooms stood at 8.85 and 11.37% for UD and D samples, respectively. Weight loss in both UD and D mushrooms was associated with loss of moisture content (Fig. 2). Firmness of all the button mushroom samples was found to decrease as storage time progressed. The decrease in mushroom firmness was more pronounced in the case of damaged set than undamaged mushrooms. Decline in mushroom firmness over the period of storage was seen to be 41.3 and 64.0%, respectively for UD and D mushrooms. Infliction of artificial mechanical damage resulted in breakage of the cellular structure of WBM leading to a rapid moisture depletion across the storage period and resulted in a firmer and rigid texture of mushrooms. The same is reflected by an increased value of firmness in the D mushrooms. As the storage period increased there would be a clear distinction between UD and D mushrooms in terms of firmness. The firmness of D mushrooms sharply declined and they became appreciably softer over the period of storage. Firmness of UD mushrooms was also degraded, but at a comparably slower rate. By the end of day 5, UD mushrooms lost only 17.82% of their initial firmness while the D mushrooms lost about 48.13% of their initial firmness (Table 1).
Hyperspectral image analysis
Spectral profile of mushrooms
The spectral reflectance values of mushroom samples were lower in VIS region (400–700 nm) and reached to a maximum at 900 nm then it starts declining. The average spectrum of UD and D samples are shown in Fig. 4a from this figure it is evident that there is a clear separation between the reflectance values of UD and D mushrooms across the spectral range. Similar results are reported by some previous studies also, Gowen et al. (2008b, a) observed that wavelength range between 400 and 500 nm was more suitable for the detection of damaged white button mushroom (Agaricus bisporus) than the higher wavelength region due to a higher variance in the spectral data of UD and D mushrooms. But in the present study throughout the spectral range, a clear separation was observed between the spectrum of UD and D mushrooms. This may be due to the variation in the level of damage, lighting conditions, mushroom variety, and equipment specifications. The curvature of the mushroom cap resulted in a scaling variation in the spectral data, the data thus obtained from the center of mushroom sample exhibited higher reflectance values than the spectral data obtained from the periphery. Curvature introduced a relative difference in the length of path of the light between the source and the detector. This spectral variation is due to non-uniform distribution of lighting over the curved surface. Direct reflectance images for classification (UD/D) of mushrooms lead to misclassification due to shape of the mushroom cap. The undamaged portion at the edges of mushroom misclassified as damaged due to the lower reflectance values at the edges. Therefore, pre-processing of spectral data before analysis is utmost desirable to avoid the spectral variation due to the curvature of the mushroom and non-uniform lighting scattering (Gowen et al., 2008b, a). MSC reduced the variation due to the morphology of mushroom samples. This corrective action could nullify the effect of the curvature of mushroom cap while retaining the actual spectral difference between UD and D mushrooms. After applying MSC correction it was assumed that any variation in spectra can be exclusively attributed to the state of WBM sample. Comparison of representative mean reflectance spectra of UD and D mushrooms on the 0th and 1st day of storage clearly depicts the difference among the mushrooms. MSC corrected spectral data was used for PLS-DA and k-NN classification of UD and D mushrooms.
Principal component analysis
Principal component (PC) analysis was aimed at identifying the wavelength that would identify the undamaged (UD) and damaged (D) mushrooms from a lot. It was judiciously applied to the spectral data so that the variability is captured while reducing the data volume. Variance expressed by PC1, PC2 and PC3 was 93.39, 2.62 and 1.08%, respectively. The first principle component (PC1) exhibited a distinct separation from the other two components during the span of 520–800 nm (Fig. 4b). This band of wavelength corresponded to the browning of the mushroom due to the induced damage. Similar observations were made by Gaston et al. (2010). The loadings plot for first three PC’s is shown in Fig. 4b; in PC1 the maximum loading was observed at 600 nm. In PC1 the scores of UD sample fall on negative side and the scores of D sample fall on positive side (Fig. 4c). The PC2 and PC3 do not provide information related to the damage in mushroom. Therefore, it can be concluded that the PC1 reflects the damage in mushroom and PC2 and PC3 explains the inherent characteristics of the mushroom. Therefore, 600 nm can be considered as the significant wavelength for classification of UD and D mushrooms.
Supervised classification
The MSC pre-processed spectral data of WBM were used for classification into UD and D samples as per the storage period using PLS-DA and k-NN techniques. The PLS-DA model was developed by selecting the optimum latent variables (LVs) as three. It can be evinced from the score plot between LV1 and LV2 that both the LVs are able to classify the UD and D mushroom samples clearly without overlapping (Fig. 4d). In LV1 the scores of UD samples have greater magnitude when compared with the D samples. In the case of LV2 the UD samples have negative scores and D samples have positive scores. The confusion matrix and classification measures of PLS-DA and k-NN classification techniques are tabulated in Table 2. The 100% classification accuracy of UD and D mushrooms across the storage period was obtained in k-NN technique. It was observed during PLS-DA model cross-validation and testing some of the D0 (damaged, 0 day storage) samples were assigned to D1 (damaged, 1 day storage) and vice versa; same was the case with UD samples as well. However, there was no evidence of D samples assigned as UD and vice versa, it implies that classification of WBM only on the basis of D and UD is conclusive and not as per the storage period. In the case of k-NN, all the mushroom samples were assigned to their respective classes without any miss classification. There were instances in which PLS-DA failed to assign a class to a sample. In PLS-DA technique the sensitivity and precision of UD mushroom was higher than the D mushrooms this is due to the misclassification with respect to storage period. Sensitivity and specificity of PLS-DA for D set were 0.4 and 0.91 respectively, much lower than that for k-NN. In case of k-NN technique the sensitivity, specificity and precision of all the classes were equal to one for both the UD and D. This implies that all the UD and D mushroom samples are assigned to their respective classes without any misclassification by k-NN model. It was noticed that performance of PLS-DA classification was adversely affected by a number of not assigned items but this was not the case in k-NN classification. Similar findings regarding PLS-DA and k-NN classification have been reported by Chakraborty et al. 2020.
Table 2.
Classification technique | D0 | UD0 | D1 | UD1 | NA | Sensitivity | Specificity | Precision | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
C | CV | T | C | CV | T | C | CV | T | C | CV | T | C | CV | T | C | CV | T | C | CV | T | C | CV | T | ||
PLS-DA | 15 | 14 | 2 | 0 | 0 | 0 | 0 | 1 | 3 | 0 | 0 | 0 | 5 | 5 | 5 | D0 | 1 | 0.93 | 0.4 | 0.96 | 0.98 | 0.91 | 0.88 | 0.93 | 0.5 |
0 | 0 | 0 | 18 | 17 | 10 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 2 | 0 | UD0 | 0.95 | 0.94 | 1 | 1 | 0.98 | 1 | 1 | 0.94 | 1 | |
2 | 1 | 2 | 0 | 0 | 0 | 15 | 13 | 1 | 1 | 0 | 0 | 2 | 6 | 7 | D1 | 0.83 | 0.93 | 0.33 | 1 | 0.98 | 0.88 | 1 | 0.93 | 0.25 | |
0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 19 | 18 | 10 | 1 | 1 | 0 | UD1 | 1 | 0.95 | 1 | 0.96 | 0.98 | 1 | 0.9 | 0.95 | 1 | |
k-NN | 20 | 20 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | D0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
0 | 0 | 0 | 20 | 20 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | UD0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |
0 | 0 | 0 | 0 | 0 | 0 | 20 | 20 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | D1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 20 | 10 | 0 | 0 | 0 | UD1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
C, calibration; CV, cross validation; T, testing; NA, non-assigned
Conclusion
Colour is a key indicator of the freshness of WBM. Days after harvest and handling thereafter affects the colour of the mushroom and its economic value. During image processing using L-a-b colour model it was noticed that there was a major change in a-value (increased redness) for mechanically damaged (D) mushrooms, while for undamaged (UD) mushrooms it was the b-value (increased yellowness). In both UD and D mushrooms, b-value linearly increased with respect to the storage period. Findings of this study suggest that UD and D mushrooms could be distinguished based on their a-values. Browning changes in D mushrooms were more intensified than UD mushrooms across the storage period. Firmness and weight loss in D mushrooms were slightly higher than UD mushrooms. Image histograms of mushrooms revealed that D mushrooms lost their luminance and became darker over the period of storage under refrigerated conditions. Hyperspectral imaging was used for capturing the onset of damage in the WBM. Spectral reflectance values of UD mushrooms were greater than D mushrooms in 398–1008 nm region. Results revealed that mushrooms could be accurately classified as UD or D at the wavelength of 600 nm. The best technique for classification of UD and D mushrooms was found to be k-nearest neighbours with a 100% chance of correct classification on the day of damaged induction. The hyperspectral imaging along with suitable chemometric technique has the potential to discriminate the undamaged and damaged mushrooms on 0th day itself, however this is not possible by simple digital imaging. The information generated from this study can be used for online applications of mushroom classification.
Acknowledgements
The authors wish to thank the laboratory staff of Machine Vision Laboratory for their help in capturing the images. Gratitude is also expressed for Director, ICAR-Central Institute of Agricultural Engineering, Bhopal, India for providing all the logistics and Director, ICAR-Directorate of Mushroom Research, Solan, Himachal Pradesh for providing administrative approval to conduct this research work.
Author contributions
Dattatrey Anasare Arjun was responsible for conducting the experiments, collection of data and preparation of the manuscript, Subir Kumar Chakraborty conceptualized the research work, provided the logistics and edited the manuscript, Naveen Kumar Mahanti helped with the hyperspectral imaging and its analysis, Nachiket Kotwaliwale provided the logistics and helped in MATLAB based image analysis.
Funding
This research work has been funded by Indian Council of Agricultural Research,NewDelhi.
Availability of data and material
The data generated during this research work is available with the authors.
Code availability
MATLAB 2016a was used during the course of the study. ICAR-CAIE, Bhopal has a licensed version of this software.
Declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Consent for publication
The authors’ have no objection regarding publishing of the data presented in the tables or the images reported in this paper.
Footnotes
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- Amigo J, Babamoradi H, Elcoroaristizabal S. Hyperspectral image analysis. A Tutorial Anal Chim Acta. 2015;896:34–51. doi: 10.1016/j.aca.2015.09.030. [DOI] [PubMed] [Google Scholar]
- Andersson L, Rantzer A, Beck C. Model comparison and simplification. Int J Robust Nonlin. 1999;9:157–181. doi: 10.1002/(SICI)1099-1239(199903)9:3<157::AID-RNC398>3.0.CO;2-8. [DOI] [Google Scholar]
- Ballabio D, Todeschini R. Multivariate classification for qualitative analysis. In: Sun DW, editor. Infrared spectroscopy for food quality analysis and control. 1. New York: Elsevier; 2009. pp. 83–104. [Google Scholar]
- Ballabio D, Consonni V. Classification tools in chemistry. Part 1: linear models. PLS-DA. Anal Methods. 2013;5(16):3790–3798. doi: 10.1039/c3ay40582f. [DOI] [Google Scholar]
- Caballero D, Bevilacqua M, Amigo J. Application of hyperspectral imaging and chemometrics for classifying plastics with brominated flame retardants. J Spectr Imaging. 2019 doi: 10.1255/jsi.2019.a1. [DOI] [Google Scholar]
- Chakraborty SK, Mahanti N, Mansuri S, Tripathi M, Kotwaliwale N, Jayas D. Non-destructive classification and prediction of aflatoxin-B1 concentration in maize kernels using Vis–NIR (400–1000 nm) hyperspectral imaging. J Food Sci Technol. 2020 doi: 10.1007/s13197-020-04552-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Emine N, Semih O. Kinetics of color and texture changes of button mushrooms coated with chitosan during storage at low temperatures. An Acad Bras Cienc. 2020;92:1–15. doi: 10.1590/0001-3765202020181387. [DOI] [PubMed] [Google Scholar]
- Esquerre C, Gowen A, Downey G, Donnell C. Wavelength selection for development of a near infrared imaging system for early detection of bruise damage in mushrooms (Agaricusbisporus) J near Infrared Spectrosc. 2012;20:537–546. doi: 10.1255/jnirs.1014. [DOI] [Google Scholar]
- Gaston E, Frias J, Cullen P, Donnell C, Gowen A. Prediction of polyphenol oxidase activity using visible near-infrared hyperspectral imaging on mushroom caps. J Agric Food Chem. 2010;58:6226–6233. doi: 10.1021/jf100501q. [DOI] [PubMed] [Google Scholar]
- Gholami R, Ahmadi E, Farris S. Shelf life extension of white mushrooms (Agaricusbisporus) by low temperatures conditioning, modified atmosphere, and nano-composite packaging material. Food Packaging Shelf. 2017;14:88–95. doi: 10.1016/j.fpsl.2017.09.001. [DOI] [Google Scholar]
- Gowen A, Donnell C. Development of algorithms for detection of mechanical injury on white mushrooms using hyperspectral imaging. Proc SPIE. 2009;7315:73150G–G73151. doi: 10.1117/12.818597. [DOI] [Google Scholar]
- Gowen A, Donnell C, Taghizadeh M, Cullen P, Frias J, Downey G. Hyperspectral imaging combined with principal component analysis for bruise damage detection on white mushrooms. J Chemom. 2008;22:259–267. doi: 10.1002/cem.1127. [DOI] [Google Scholar]
- Gowen A, Donnell C, Taghizadeh M, Gaston E, Gorman A, Cullen P, Frias J, Esquerre C, Downey G. Hyperspectral imaging for the investigation of quality deterioration in sliced mushrooms during storage. Sens Instrum Food Qual Saf. 2008;2:133–143. doi: 10.1007/s11694-008-9042-4. [DOI] [Google Scholar]
- Gowen A, Taghizadeh M, Donnell C. Identification of mushrooms subjected to freeze damage using hyperspectral imaging. J Food Eng. 2009;93:7–12. doi: 10.1016/j.jfoodeng.2008.12.021. [DOI] [Google Scholar]
- Heinemann P, Hughes R, Morrow C, Sommer H, Beelman R, Wuest P. Grading of mushrooms using a machine vision system. Trans ASABE. 1994;37:1671–1677. doi: 10.13031/2013.28255. [DOI] [Google Scholar]
- Kemsley EK. Discriminant analysis of high-dimensional data: a comparison of principal components analysis and partial least squares data reduction methods. Chemom Intell Lab Syst. 1996;33:47–61. doi: 10.1016/0169-7439(95)00090-9. [DOI] [Google Scholar]
- Khan A, Munir M, Yu W, Young B. A review towards hyperspectral imaging for real time quality control of food products with an illustrative case study of milk powder production. Food Bioprocess Tech. 2020;13:739–752. doi: 10.1007/s11947-020-02433-w. [DOI] [Google Scholar]
- Khan Z, Aisikaer G, Khan R, Bu J, Jiang Z, Ni Z, Ying T. Effects of composite chemical pretreatment on maintaining quality in button mushroom (Agaricusbisporus) during postharvest storage. Postharvest Biol Tec. 2014;95:36–41. doi: 10.1016/j.postharvbio.2014.04.001. [DOI] [Google Scholar]
- Kong W, Zhang C, Liu F, Nie P, He Y. Rice seed cultivar identification using near-infrared hyperspectral imaging and multivariate data analysis. Sensors. 2013;89:8916–8927. doi: 10.3390/s130708916. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Liu Z, Wang X. Changes in color, antioxidant, and free radical scavenging enzyme activity of mushrooms under high oxygen modified atmospheres. Postharvest Biol Tec. 2012;69:1–6. doi: 10.1016/j.postharvbio.2012.02.008. [DOI] [Google Scholar]
- Mahanti N, Chakraborty SK, Kotwaliwale N, Vishwakarma A. Chemometric strategies for nondestructive assessment of nitrate content in harvested spinach using Vis-NIR spectroscopy. J Food Sci. 2020 doi: 10.1111/1750-3841.15420. [DOI] [PubMed] [Google Scholar]
- Mohapatra D, Bira Z, Kerry J, Frias J, Rodrigues F. Postharvest hardness and color evaluation of white button mushrooms. J Food Sci. 2010;75:E146–E152. doi: 10.1111/j.1750-3841.2010.01518.x. [DOI] [PubMed] [Google Scholar]
- Qu T, Li B, Huang X, Li X, Ding Y, Chen J, Tang X. Effect of peppermint oil on the storage quality of white button mushrooms (Agaricusbisporus) Food Bioprocess Tech. 2020;13:404–418. doi: 10.1007/s11947-019-02385-w. [DOI] [Google Scholar]
- Ravikanth L, Jayas D, White N, Fields P, Sun D. Extraction of spectral information from hyperspectral data and application of hyperspectral imaging for food and agricultural products. Food Bioprocess Tech. 2017;10:1–3. doi: 10.1007/s11947-016-1817-8. [DOI] [Google Scholar]
- Romero I. PCA-based noise reduction in ambulatory ECG’s. Comput Cardiol. 2010;37:677–680. [Google Scholar]
- Sharma V, Annepu S, Gautam Y, Singh M, Kamal S. Status of mushroom production in India. Mushroom Res. 2017;26:111–120. [Google Scholar]
- Taghizadeh M, Gowen A, Donnell C. Prediction of white button mushroom moisture content using hyperspectral imaging. Sens Instrum Food Qual Saf. 2009;3:219–226. doi: 10.1007/s11694-009-9088-y. [DOI] [Google Scholar]
- Taghizadeh M, Gowen A, Ward P, Donnell C. Use of hyperspectral imaging for evaluation of the shelf-life of fresh white button mushrooms stored in different packaging films. Innov Food Sci Emerg. 2010;11:423–431. doi: 10.1016/j.ifset.2010.01.016. [DOI] [Google Scholar]
- Wang F, Zheng J, Tiang X, Wang J, Niu L, Feng W. An automatic sorting system for fresh white button mushrooms based on image processing. Comput Electron Agric. 2018;151:416–425. doi: 10.1016/j.compag.2018.06.022. [DOI] [Google Scholar]
- Zhang K, Pu Y, Sun D. Recent advances in quality preservation of postharvest mushrooms (Agaricusbisporus): a Review. Trends Food Sci Technol. 2018 doi: 10.1016/j.tifs.2018.05.012. [DOI] [Google Scholar]
- Zheng W, Fu X, Ying Y. Spectroscopy based food classification with extreme learning machine. Chemom Intell Lab Syst. 2014;139:42–47. doi: 10.1016/j.chemolab.2014.09.015. [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
The data generated during this research work is available with the authors.
MATLAB 2016a was used during the course of the study. ICAR-CAIE, Bhopal has a licensed version of this software.