Next Article in Journal
Ultrasonic Extraction Process of Polysaccharides from Dendrobium nobile Lindl.: Optimization, Physicochemical Properties and Anti-Inflammatory Activity
Next Article in Special Issue
Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network
Previous Article in Journal
Ascorbylation of a Reactive Cysteine in the Major Apple Allergen Mal d 1
Previous Article in Special Issue
Surface Defect Detection of Fresh-Cut Cauliflowers Based on Convolutional Neural Network with Transfer Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Changes in Bell Pepper Flesh as a Result of Lacto-Fermentation Evaluated Using Image Features and Machine Learning

1
Fruit and Vegetable Storage and Processing Department, The National Institute of Horticultural Research, Konstytucji 3 Maja 1/3, 96-100 Skierniewice, Poland
2
Department of Electrical and Electronics Engineering, Karamanoglu Mehmetbey University, Karaman 70100, Turkey
*
Author to whom correspondence should be addressed.
Foods 2022, 11(19), 2956; https://doi.org/10.3390/foods11192956
Submission received: 8 July 2022 / Revised: 15 August 2022 / Accepted: 18 September 2022 / Published: 21 September 2022
(This article belongs to the Special Issue Vision-Based Sensors and Algorithms for Food Processing)

Abstract

:
Food processing allows for maintaining the quality of perishable products and extending their shelf life. Nondestructive procedures combining image analysis and machine learning can be used to control the quality of processed foods. This study was aimed at developing an innovative approach to distinguishing fresh and lacto-fermented red bell pepper samples involving selected image textures and machine learning algorithms. Before processing, the pieces of fresh pepper and samples subjected to spontaneous lacto-fermentation were imaged using a digital camera. The texture parameters were extracted from images converted to different color channels L, a, b, R, G, B, X, Y, and Z. The textures after selection were used to build models for the classification of fresh and lacto-fermented samples using algorithms from the groups of Lazy, Functions, Trees, Bayes, Meta, and Rules. The highest average accuracy of classification reached 99% for the models developed based on sets of selected textures for color space Lab using the IBk (instance-based K-nearest learner) algorithm from the group of Lazy, color space RGB using SMO (sequential minimal optimization) from Functions, and color space XYZ and color channel X using IBk (Lazy) and SMO (Functions). The results confirmed the differences in image features of fresh and lacto-fermented red bell pepper and revealed the effectiveness of models built based on textures using machine learning algorithms for the evaluation of the changes in the pepper flesh structure caused by processing.

1. Introduction

Bell pepper (Capsicum annum L.), belonging to Solanaceae, is a widely cultivated fruit, used as a vegetable, spice, or condiment. Consuming pepper can provide health benefits due to the presence of phytochemicals, including phenolic compounds, capsaicinoids, vitamins C and E, and carotenoids [1]. Processing of pepper fruit can prolong the storage time and provide value-added food products [1]. Strong antioxidant capacity, high content of bioactive compounds, distinctive colors, flavor, and nutritional value result in the popularity of consuming bell pepper. Bell pepper color may be related to significant differences in taste, antioxidant capacity, bioactive compounds, nutrient content, antioxidant capacity, and cost. Green bell pepper contains chlorophylls and distinctive carotenoids (lutein, neoxanthin, and violaxanthin) [2]. Red pepper is characterized by the presence of capsorubin and capsanthin [2]. In the case of yellow pepper, violaxanthin, β-carotene, lutein, zeaxanthin, and antheraxanthin are the most common. The higher concentrations of polyphenols, among others, flavonoid and quercetin, are determined in red and yellow peppers compared to green fruit [2]. Due to the presence mainly of carotenoids, flavonoids, and vitamins, bell pepper is an important ingredient against aging and preventing chronic diseases and can be used as a food and medicinally [3,4]. Bell pepper is characterized by short storage and shelf-life, and it is a non-climacteric fruit insensitive to ethylene but sensitive to cold temperature. Pepper due to peel without stomata is a special fruit. Water loss through the cuticle is the only source of shriveling, as well as weight and water loss [5]. The deterioration of products can appear at any stage of the supply chain. Therefore, developing approaches to the preservation of food products, allowing for their longer use, including packing and processing, is important [6].
People are interested in consuming the fresh-cut bell pepper without loss of nutritional value. The transportation of fresh-cut pepper products can be more voluminous than that of whole bell pepper in terms of kilograms, using the same container. Cutting a pepper can reduce the transportation charges and increase the economic value. However, cutting bell pepper may cause a risk of pathogen contamination, tissue damage, loss of flavor and texture, browning, and the release of nutrients. To inhibit microbial contamination, processing the fresh-cut pepper can be applied [7]. In addition to fresh, pepper can be eaten in various processed forms, e.g., fermented, dried, cooked, or as extracts [8]. Lacto-fermentation is one of the traditional ways of fruit preservation and processing. Fermentation represents cultural heritage and provides regional products. Fermented pepper, among others, can prevent fat accumulation and reduce lipid levels [9]. Additionally, lacto-fermentation can enhance antimicrobial and antioxidant activity. Fermentation involving selected strains of lactic acid bacteria (LAB) can release bioactive compounds from cells and enhance biological activity [10]. Fermentation using probiotic bacteria can also enhance the shelf life, flavor, sensory and nutritional attributes, bioavailability, and functional quality of products [11,12].
The effect caused by lacto-fermentation on red bell peppers can be observed by an expert via conventional measurement and observation. However, with Agriculture 4.0, manual and cumbersome agricultural solutions are now being replaced by computer-based automatic systems. Currently, the application of noninvasive measuring techniques to evaluate external and internal fruit quality, e.g., involving image processing and artificial intelligence, is desired in the food industry [13]. Machine learning includes algorithms and tools needed to understand patterns within the data, extract important information from the data, and make decisions on a specific task by machines [14]. Thanks to computer vision systems, many precision agriculture applications such as monitoring of plant diseases, detection of pests, detection of fruit/vegetables, spraying, and mapping are carried out automatically and quickly [15]. In order for these applications to be carried out automatically, the data obtained from different sensors is analyzed by a computer instead of an expert. However, most of the time, these data are not used directly, and preprocessing is performed on the raw data. Image data are mostly obtained in agricultural applications, and, in this sense, image processing techniques are of great importance. Preprocessing and feature extraction algorithms in image processing have been used in many agricultural applications [16]. With image preprocessing, the raw image is transformed into a suitable one for the desired task, and different steps such as thresholding, morphological operations, segmentation, etc. are applied to the raw image [17]. Then, different features related to texture, shape, and color are extracted from the processed image with feature extraction steps [18]. These features are fed into learning algorithms to automatically provide the desired discrimination. In this context, artificial intelligence-based methods such as machine learning and deep learning are used to automatically distinguish different species on the basis of these images or these features [19]. In agricultural discrimination applications, texture features are mostly used because of their strong discrimination ability [20]. MaZda, an open source C++ library, is a highly preferred software package as it allows both 2D and 3D image texture analysis and image preprocessing [21]. For this reason, it has been used in numerous agricultural applications. The change caused by lacto-fermentation can also be observed by analyzing textural features through MaZda. In addition, it is very important and necessary to automatically determine the effect of lacto-fermentation, as it is often applied for different fruits and vegetables. The image features and machine learning algorithms were successfully used in previous studies for evaluation of the changes, e.g., in carrot [22], cucumber [23], and beetroot [24,25], caused by lacto-fermentation.
This study offers an innovative and comprehensive approach to assessing the quality of bell pepper fruit. In this context, the supplied red bell pepper sample pieces are imaged before and after lacto-fermentation. Each of these images is converted to L, a, b, R, G, B, X, Y, and Z color channels. Using the brightness threshold, each sample is segmented from the background, and regions of interest (ROI) are generated. Then, various texture features are extracted from ROI images with different color channels. Texture features extracted from different color channels show the effect of different textural information on the discrimination process. Feature selection algorithms are used for a large number of texture features obtained at this stage. Finally, these selected features are analyzed using various machine learning algorithms, resulting in highly accurate discrimination of fresh and lacto-fermented red bell pepper samples. The results show that the proposed method is capable of distinguishing with an accuracy of up to 99%.
Despite the published results, mainly for other species of fruit and vegetables, there are no literature data on the use of texture parameters extracted from various color channels of images of cut red bell pepper to build classification models for monitoring the effect of lacto-fermentation on changes in the structure of pepper flesh. Therefore, the objective of this study was to propose an innovative approach to distinguishing fresh and lacto-fermented red bell pepper samples involving selected texture parameters of images and various machine learning algorithms. The application of textures from different color channels L, a, b, R, G, B, X, Y, and Z and algorithms belonging to different groups to evaluate the changes in red bell pepper flesh occurring as a result of spontaneous lacto-fermentation is a great novelty of this study. The innovative nature of the present study involves the acquisition of data on more than 1600 texture parameters of bell pepper flesh in the fresh and lacto-fermented forms. Various methods of selecting textures with the highest discriminant power, such as genetic search and best first with the correlation-based feature selection (CFS), as well as the ranker in conjunction with OneR attribute evaluator, were used to choose the most effective one. A wide range of algorithms from the groups of Lazy, Functions, Trees, Bayes, Meta, and Rules were tested, which was not found in the literature data for the classification of fresh and processed bell pepper. The use of various algorithms in the discrimination process shows the validity, applicability, and robustness of the proposed method rather than making a comparison between machine learning algorithms.
This paper is organized as follows: after the introduction, Section 2 deals with the acquisition, imaging, processing, and statistical analysis of bell pepper samples. Section 3 includes the discrimination performances obtained as a result of evaluating the texture features extracted from different color channels with different machine learning algorithms. Lastly, Section 4 evaluates the proposed work and provides suggestions for future work.

2. Materials and Methods

2.1. Materials

The red bell pepper samples (Figure 1) were bought at a supermarket. A total of 20 mature undamaged fruits were selected for this study. Fruits were washed and cleaned. Then, five pieces with the dimensions of 1 cm × 1 cm were cut from each pepper fruit using a sharp stainless-steel knife. The extracted fresh pepper pieces were subjected to imaging. The same pieces were also intended for spontaneous lacto-fermentation and then imaging as lacto-fermented forms.
The spontaneous lacto-fermentation using garlic, horseradish, dill, and potable water with table salt at the final concentration of 3% sodium chloride in brine was applied. The previously prepared red bell pepper pieces were put into glass jars with other ingredients. Samples were stored for 3 days at a temperature of about 20 °C and then for 6 months at about 10–12 °C. After storage, lacto-fermented pepper samples were rinsed under potable water and dried with a paper towel. The samples prepared in this way were subjected to imaging using a digital camera.

2.2. Image Acquisition and Processing

The same imaging procedure was applied for the pieces of fresh pepper before processing and lacto-fermented pepper. The samples were imaged on the inside of the flesh using a digital camera placed on a tripod in a box with black internal walls. As a light source, LED (light-emitting diode) illumination with stable parameters was used. Color calibration of the digital camera was carried out. The acquired images contained red bell pepper pieces on a black background. There were 20 pepper pieces in one image. In total, images of 100 pieces of fresh pepper and 100 pieces of lacto-fermented pepper were obtained. The image processing using the MaZda application (Łódź University of Technology, Institute of Electronics, Łódź, Poland) [21,26,27] allowed computing texture parameters from different color channels L, a, b, R, G, B, X, Y, and Z. Firstly, the fresh and lacto-fermented bell pepper images were converted to color channels. In the case of lacto-fermented samples, changes in the structure of the flesh compared to the fresh samples are visible (Figure 2).
The regions of interest (ROIs) were overlaid. An ROI was considered as a set of pixels separated from the background. The segmentation of the image into lighter pepper pieces and the black background was performed using the brightness threshold which was determined manually. Each ROI was one whole piece of pepper. Thus, 200 ROIs including 100 ROIs of fresh samples and 100 ROIs of lacto-fermented samples were determined. For each ROI, 1629 image textures were computed including 181 textures for each color channel. The texture parameters were computed on the basis of the co-occurrence matrix (132 textures including 11 features for four directions and three between-pixel distances), run-length matrix (20 textures including five textures for four directions), Haar wavelet transform (10 textures), histogram (nine textures), autoregressive model (five textures), ad gradient map (five textures). Among the color channels of images selected for the texture extraction, color channels R (red), G (green), and B (blue) belonged to the RGB color space, channels L (lightness from black to white), a (green for negative and red for positive values), and b (blue for negative and yellow for positive values) belonged to the Lab color space, and channels X (a component of color information), Y (lightness), and Z (a component of color information) belonged to the XYZ color space [28]. The computed image textures were considered as a function of the spatial variation of the pixel brightness intensity and provided information about the structure of the samples. Thus, the quantitative analysis of textures provided important insights into sample quality. The texture parameters after selection were used to build the discriminative models for distinguishing fresh and lacto-fermented red bell pepper samples. A flowchart including steps of the applied procedure is presented in Figure 3.

2.3. Statistical Analysis

Statistical analysis involved the development of innovative models for distinguishing fresh and lacto-fermented red bell pepper samples on the basis of image features. The discriminant analysis was performed using WEKA software (Machine Learning Group, University of Waikato) [29,30,31] and included several steps. In the first step, the texture selection was performed. This procedure was applied for sets of textures computed for color spaces Lab, RGB, and XYZ including combined textures for three channels in the case of each color space, and for individual color channels L, a, b, R, G, B, X, Y, and Z. In the case of each color space, the most satisfactory results for one channel were chosen to be presented in this paper. Among the search methods, genetic search and best first with the correlation-based feature selection (CFS), and the ranker in conjunction with OneR attribute evaluator were applied. Various algorithms from different groups were tested such as Lazy (LWL—locally weighted learning, KStar, IBk—instance-based K-nearest learner), Functions (logistic, LDA—linear discriminant analysis, FLDA—Fisher linear discriminant analysis, QDA—quadratic discriminant analysis, SMO—sequential minimal optimization), Trees (LMT—logistic model tree, random forest, J48), Bayes (Bayes net, naïve Bayes), Meta (multi class classifier, filtered classifier, random committee, logit boost), and Rules (JRip—Java repeated incremental pruning, PART). A test mode of 10-fold cross-validation was used to perform the analysis. The dataset including a total of 200 cases was randomly divided into 10 parts. Each of the ten parts was considered in turn and treated as the test set, whereas the remaining nine parts were regarded as the training sets. The learning was performed 10 times using different training sets. The result was determined as the average of 10 estimates. Ten folds are generally sufficient to obtain the best estimate [31]. The criterion for the selection of machine learning algorithms and evaluation of analysis was the highest average accuracy of classification. In addition to average accuracy and confusion matrices including accuracies for fresh and lacto-fermented samples, other performance metrics, such as precision, F-measure, and MCC (Matthews correlation coefficient), were also determined [32,33].

3. Results

The innovative models based on selected image textures for distinguishing fresh and lacto-fermented red bell pepper samples were developed using machine learning algorithms. The models were built separately for color spaces and color channels. From the tested search methods, best first with CFS proved to be the most satisfactory in terms of sets of selected textures providing the highest accuracies. The textures selected using the best first with CFS are presented in Table 1. It was observed that the highest results were ensured by models developed using the following machine learning algorithms: IBk (Lazy), SMO (Functions), random forest (Trees), naïive Bayes (Bayes), filtered classifier (Meta), and JRip (Rules).
In the case of the models built on the basis of selected textures from the color space Lab (Table 2), an average accuracy of discrimination of fresh and lacto-fermented pepper pieces reached 99% for the Ibk algorithm from the group of Lazy. Only this algorithm provided 100% accuracy for one of the classes (lacto-fermented). The fresh pepper samples were discriminated with an accuracy of 98%, and the remaining 2% were incorrectly included in the class ‘lacto-fermented’. Other discrimination performance metrics were also the most satisfactory for the model built using IBk. The values of precision reached 1.000 for fresh pepper samples and 0.980 for lacto-fermented samples, whereas both classes were characterized by an F-measure parameter equal to 0.990 and MCC equal to 0.980. For the other algorithms, high values of metrics were also obtained. The models built using the SMO algorithm from the group of Functions, random forest from Trees, and naïve Bayes from Bayes correctly discriminated fresh and lacto-fermented pepper samples in 98% of cases, while other metrics were greater than or equal to 0.960, reaching 0.990 for precision for fresh samples and random forest for lacto-fermented samples, as well as naïve Bayes. Slightly lower average accuracies were observed for filtered classifier from the group of Meta (97%) and Jrip from the group of Rules (96.5%).
In the case of Lab color space, among the individual color channels, models including textures selected from color channel L (Table 3) provided the most satisfactory results. The fresh and lacto-fermented pepper samples were correctly distinguished from each other with an average accuracy of up to 98.5% for the random forest. The fresh pepper samples were classified with an accuracy of 98%, whereas lacto-fermented pepper samples were classified with an accuracy of 99%. For models developed using other machine learning algorithms, very high average accuracies were also found: 98% for IBk and SMO, 97% for naïve Bayes and filtered classifier, and 96.5% for JRip. The accuracy of 100% was not observed for any of the classes. The highest value of precision of 0.990 was determined for the fresh pepper and random forest. The F-measure of 0.985 and MCC of 0.970 for both classes were also the highest for the random forest algorithm.
Furthermore, high average accuracies reaching 99% (SMO algorithm) were determined for models including image textures selected for RGB color space (Table 4). For SMO, all cases belonging to fresh pepper were correctly classified as fresh pepper (100% accuracy), and 98% of cases from the actual class ‘lacto-fermented’ were correctly included in the predicted class ‘lacto-fermented’. The values of precision (0.980 for fresh pepper samples and 1.000 for lacto-fermented pepper samples), F-measure (0.990 for both classes), and MCC (0.980 for both classes) were also very satisfactory. Moreover, a high average accuracy of 98.5% was observed for the IBk and naïve Bayes machine learning algorithms. However, in the case of some models, the average accuracies were lower, such as 93% for the model built using filtered classifier and 93.5% for the model developed using JRip.
From color channels belonging to RGB color space, the highest results of discrimination of fresh and lacto-fermented red bell pepper samples were obtained for models built on the basis of selected image textures from channel R (Table 5). An average accuracy of up to 98.5% (SMO) was determined. In the case of the SMO algorithm which provided the most satisfactory results, the discrimination accuracy for fresh pepper was equal to 99%, and 1% of samples were incorrectly classified as lacto-fermented pepper, whereas lacto-fermented samples were correctly discriminated in 98% of cases, and the remaining 2% were incorrectly included in the predicted class ‘fresh pepper’. The values of precision reached 0.980 and 0.990, for fresh and lacto-fermented samples, respectively. The highest F-measure equal to 0.985 and MCC equal to 0.970 were found for both classes. Among the other algorithms, Ibk (97.5%), random forest (97%), and naïve Bayes (96%) also allowed for building effective models. In the case of filtered classifier and JRip, lower average accuracies (91.5% and 90.5%, respectively) were determined.
Very high results were also produced by the models built on the basis of selected textures from the XYZ color space (Table 6). The average accuracy reached 99% in the case of the models built using the IBk and SMO machine learning algorithms. A slightly lower average accuracy of 98% was obtained for random forest and naïve Bayes. Furthermore, for filtered classifier and JRip, average accuracies were satisfactory (97% and 96.5%, respectively). In the case of individual classes, 100% accuracy was observed for fresh pepper for the SMO algorithm, whereas lacto-fermented cases were correctly distinguished from fresh samples in 98% of cases. The highest results of precision, F-measure, and MCC were determined for the models built using the IBk and SMO algorithms. In the case of IBk, precision reached 0.990 for both classes, while, for SMO, the value of precision was equal to 1.000 for the lacto-fermented pepper and 0.980 for the fresh pepper. Both for IBk and SMO, F-measure reaching 0.990 and an MCC of 0.980 for both classes were obtained.
For models developed using selected textures from images converted to the color channel X (Table 7), the same results as for color space XYZ (Table 6) were observed for the IBk and SMO algorithms. The average accuracy also reached 99% (IBk, SMO), and an accuracy of 100% was only found for fresh pepper (SMO). In the case of color channel X (Table 7), for other algorithms, fresh lacto-fermented pepper samples were correctly distinguished from each other in 98.5% of cases for naïve Bayes, 97% of cases for random forest, 95.5% of cases for filtered classifier, and 93.5% of cases for JRip.
When Table 2, Table 3, Table 4, Table 5, Table 6 and Table 7, which contain the results of this study, are examined, the findings regarding the experimental results can be expressed as follows: with image analysis, artificial intelligence, and computer vision algorithms, fresh and lacto-fermented red bell pepper samples were distinguished in an objective, nondestructive, and inexpensive way. In this way, the quality of the crop was determined automatically, quickly, and without bias [34]. Furthermore, the texture features of the different color channels used (L, a, b, R, G, B, X, Y, and Z) strongly represented the changes in lacto-fermented red bell pepper samples. It was confirmed that these texture features can also be strongly distinguished by various machine learning algorithms from different groups (Lazy, Functions, Trees, Bayes, Meta, and Rules). According to the experimental results, the most erroneous discrimination was 90.5% with the Jrip algorithm, while the most successful discrimination was 99% with the IBk algorithm. Therefore, these results showed that the proposed method is highly preferable over conventional methods. Moreover, the results determined for red bell pepper in the present study confirmed the previous literature data on the effectiveness of models built based on image parameters using machine learning algorithms for the evaluation of the quality of fermented food products such as cucumber, carrot, or beetroot [22,23,24,25]. The undertaken research extends the scope of application of image analysis and artificial intelligence to the evaluation of fruit and vegetables by assessing the quality of fermented products.
Image processing and traditional machine learning and deep learning are also widely used for other fruit and vegetable research and agriculture activities. Machine learning techniques and algorithms can be used in the pre-harvesting, harvesting, and post-harvesting stages [34]. This state-of-art technology can help to solve problems in agriculture and help farmers to reduce losses. In the pre-harvesting stage, machine learning can be applied, for example, to evaluate the quality and germination of the seeds, sort seeds, detect disease and weeds, capture the parameters of soil, pruning, fertilizer application, irrigation, and determining genetic and environmental conditions. In the harvesting stage, the activities involving machine learning may be related to crop size, quality, skin color, taste, maturity stage, firmness, market window, object detection, and classification [35]. On the other hand, post-harvesting applying machine learning may concern factors affecting the shelf-life, e.g., temperature, gases used in containers, humidity, usage of chemicals, handling processes to quality retain, and grading [35]. In the case of pepper, machine learning was used for nondestructive sorting based on odor parameters [36]. Models developed using a deep convolutional neural network (DCNN) were applied by Subeesh et al. [14] for weed detection in the polyhouse cultivation of bell peppers. Mohi-Alden et al. [37] used machine vision intelligent modeling for in-line sorting of bell pepper. Red and yellow sweet peppers were classified into immature and mature classes on the basis of color and morphological features using machine learning algorithms [38]. Additionally, the ripeness level was estimated on the basis of color image parameters using machine learning models in the case of grapes [39]. Image analysis, spectroscopy, and electronic nose combined with different statistical models were applied to discriminate the ripening stage of strawberries [40]. Models based on spectral reflectance data built using machine learning algorithms were used to distinguish the Fusarium-infected and healthy pepper samples (leaves) [41]. In view of the promising application of objective and nondestructive procedures involving artificial intelligence and image processing to evaluate fruit and vegetables, further research may include other species and cultivars, as well as novel directions of experiments.

4. Conclusions

Preservation and processing of bell peppers by lacto-fermentation is a traditional method to extend their shelf life. In this context, the main justification for this study was to evaluate the effect of the lacto-fermentation method on red bell peppers. The approach involving image analysis and machine learning enabled distinguishing fresh and lacto-fermented red bell pepper samples (flesh pieces) on the basis of models including selected textures built using various algorithms. Models developed for sets of textures selected separately for color spaces and color channels provided satisfactory results. The highest results, including the average discrimination accuracy reaching 99%, were obtained for IBk (Lazy), SMO (Functions), random forest (Trees), naïve Bayes (Bayes), filtered classifier (Meta), and JRip (Rules) machine learning algorithms. The high discrimination accuracies, as well as the values of other metrics, such as precision, F-measure, and MCC (Matthews correlation coefficient), revealed differentiation of fresh and lacto-fermented bell pepper samples. Therefore, the changes in the bell pepper flesh structure caused by spontaneous lacto-fermentation were confirmed. Due to the evaluation of the quality of lacto-fermented bell pepper using textures from different color channels L, a, b, R, G, B, X, Y, and Z and various machine learning algorithms belonging to different groups, this study is characterized by novelty. The obtained results are very promising. Therefore, further research on the evaluation of the effect of lacto-fermentation on the flesh of other cultivars of pepper and other species of fruit or vegetables may be performed.
The texture features extracted from the different color channels strongly indicated the effect of lacto fermentation. However, a single texture feature may not be sufficient to distinguish lacto-fermented red bell pepper samples. The features extracted in machine learning algorithms determine the performance of the system. The features should, therefore, strongly represent the distinction between species. Therefore, in future studies, more than one texture feature will be fused, and the effect of lacto-fermentation will be revealed more strongly. In addition, the new trend for agricultural discrimination tasks is to develop deep learning-based methods. Accordingly, more powerful features are automatically extracted instead of manual feature extraction. Therefore, deep learning-based techniques can provide easier and more accurate discrimination. However, to see the superior performance of deep learning clearly, more samples are required than machine learning. Therefore, in our next studies, the effect of lacto-fermentation will be analyzed with deep learning-based CNN models that enable the extraction of high-level features. For this, datasets containing more samples will be prepared. Lastly, the proposed study is only for bell pepper and, therefore, does not produce good results in differentiating different vegetables or fruits as a result of lacto fermentation. In this sense, it is planned to create a large dataset containing different fruits and vegetables in future studies.

Author Contributions

Conceptualization, E.R.; methodology, E.R.; software, E.R.; validation, E.R., K.S., and M.F.A.; formal analysis, E.R.; investigation, E.R.; resources, E.R.; data curation, E.R.; writing—original draft preparation, E.R.; writing—review and editing, E.R., K.S., and M.F.A.; visualization, E.R. and K.S.; supervision, E.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Reale, S.; Biancolillo, A.; Gasparrini, C.; Di Martino, L.; Di Cecco, V.; Manzi, A.; Di Santo, M.; D’Archivio, A.A. Geographical discrimination of bell pepper (Capsicum annuum) spices by (HS)-SPME/GC-MS aroma profiling and chemometrics. Molecules 2021, 26, 6177. [Google Scholar] [CrossRef]
  2. Sutliff, A.K.; Saint-Cyr, M.; Hendricks, A.E.; Chen, S.S.; Doenges, K.A.; Quinn, K.; Westcott, J.; Tang, M.; Borengasser, S.J.; Reisdorph, R.M. Lipidomics-based comparison of molecular compositions of green, yellow, and red bell peppers. Metabolites 2021, 11, 241. [Google Scholar] [CrossRef]
  3. Martínez-Zamora, L.; Castillejo, N.; Artés-Hernández, F. Postharvest UV-B and photoperiod with blue+ red LEDs as strategies to stimulate carotenogenesis in bell peppers. Appl. Sci. 2021, 11, 3736. [Google Scholar] [CrossRef]
  4. Chávez-Mendoza, C.; Sanchez, E.; Muñoz-Marquez, E.; Sida-Arreola, J.P.; Flores-Cordova, M.A. Bioactive compounds and antioxidant activity in different grafted varieties of bell pepper. Antioxidants 2015, 4, 427–446. [Google Scholar] [CrossRef]
  5. Althaus, B.; Blanke, M. Non-destructive, opto-electronic determination of the freshness and shrivel of Bell pepper fruits. J. Imaging 2020, 6, 122. [Google Scholar] [CrossRef]
  6. Barbosa, C.; Machado, T.B.; Alves, M.R.; Oliveira, M.B.P. Fresh-cut bell peppers in modified atmosphere packaging: Improving shelf life to answer food security concerns. Molecules 2020, 25, 2323. [Google Scholar] [CrossRef]
  7. Saravanakumar, K.; Sathiyaseelan, A.; Mariadoss, A.V.A.; Chelliah, R.; Hu, X.; Oh, D.H.; Wang, M.-H. Lactobacillus rhamnosus GG and biochemical agents enrich the shelf life of fresh-cut bell pepper (Capsicum annuum L. var. grossum (l.) sendt). Foods 2020, 9, 1252. [Google Scholar] [CrossRef]
  8. Zahoor, I.; Khan, M.A. Microwave assisted fluidized bed drying of red bell pepper: Drying kinetics and optimization of process conditions using statistical models and response surface methodology. Sci. Hortic. 2021, 286, 110209. [Google Scholar] [CrossRef]
  9. Xu, X.; Wu, B.; Zhao, W.; Lao, F.; Chen, F.; Liao, X.; Wu, J. Shifts in autochthonous microbial diversity and volatile metabolites during the fermentation of chili pepper (Capsicum frutescens L.). Food Chem. 2021, 335, 127512. [Google Scholar] [CrossRef]
  10. Muhialdin, B.J.; Kadum, H.; Zarei, M.; Hussin, A.S.M. Effects of metabolite changes during lacto-fermentation on the biological activity and consumer acceptability for dragon fruit juice. LWT 2020, 121, 108992. [Google Scholar] [CrossRef]
  11. Frediansyah, A.; Romadhoni, F.; Nurhayati, R.; Wibowo, A.T. Fermentation of Jamaican cherries juice using Lactobacillus plantarum elevates antioxidant potential and inhibitory activity against Type II diabetes-related enzymes. Molecules 2021, 26, 2868. [Google Scholar] [CrossRef]
  12. López-Salas, D.; Oney-Montalvo, J.E.; Ramírez-Rivera, E.; Ramírez-Sucre, M.O.; Rodríguez-Buenfil, I.M. Fermentation of Habanero Pepper by Two Lactic Acid Bacteria and Its Effect on the Production of Volatile Compounds. Fermentation 2022, 8, 219. [Google Scholar] [CrossRef]
  13. Villaseñor-Aguilar, M.-J.; Bravo-Sánchez, M.-G.; Padilla-Medina, J.-A.; Vázquez-Vera, J.L.; Guevara-González, R.-G.; García-Rodríguez, F.-J.; Barranco-Gutiérrez, A.-I. A maturity estimation of bell pepper (Capsicum annuum L.) by artificial vision system for quality control. Appl. Sci. 2020, 10, 5097. [Google Scholar] [CrossRef]
  14. Subeesh, A.; Bhole, S.; Singh, K.; Chandel, N.; Rajwade, Y.; Rao, K.; Kumar, S.; Jat, D. Deep convolutional neural network models for weed detection in polyhouse grown bell peppers. Artif. Intell. Agric. 2022, 6, 47–54. [Google Scholar] [CrossRef]
  15. Aslan, M.F.; Durdu, A.; Sabanci, K.; Ropelewska, E.; Gültekin, S.S. A Comprehensive Survey of the Recent Studies with UAV for Precision Agriculture in Open Fields and Greenhouses. Appl. Sci. 2022, 12, 1047. [Google Scholar] [CrossRef]
  16. Kasinathan, T.; Uyyala, S.R. Machine learning ensemble with image processing for pest identification and classification in field crops. Neural Comput. Appl. 2021, 33, 7491–7504. [Google Scholar] [CrossRef]
  17. Bosilj, P.; Duckett, T.; Cielniak, G. Connected attribute morphology for unified vegetation segmentation and classification in precision agriculture. Comput. Ind. 2018, 98, 226–240. [Google Scholar] [CrossRef]
  18. Liu, H.; Sun, H.; Li, M.; Iida, M. Application of Color Featuring and Deep Learning in Maize Plant Detection. Remote Sens. 2020, 12, 2229. [Google Scholar] [CrossRef]
  19. Koklu, M.; Unlersen, M.F.; Ozkan, I.A.; Aslan, M.F.; Sabanci, K. A CNN-SVM study based on selected deep features for grapevine leaves classification. Measurement 2022, 188, 110425. [Google Scholar] [CrossRef]
  20. Sabanci, K.; Aslan, M.F.; Durdu, A. Bread and durum wheat classification using wavelet based image fusion. J. Sci. Food Agric. 2020, 100, 5577–5585. [Google Scholar] [CrossRef]
  21. Szczypiński, P.M.; Strzelecki, M.; Materka, A.; Klepaczko, A. MaZda—A software package for image texture analysis. Comput. Methods Programs Biomed. 2009, 94, 66–76. [Google Scholar] [CrossRef]
  22. Ropelewska, E. Distinguishing lacto-fermented and fresh carrot slice images using the Multilayer Perceptron neural network and other machine learning algorithms from the groups of Functions, Meta, Trees, Lazy, Bayes and Rules. Eur. Food Res. Technol. 2022, 248, 2421–2429. [Google Scholar] [CrossRef]
  23. Ropelewska, E.; Sabanci, K.; Aslan, M.F. Preservation effects evaluated using innovative models developed by machine learning on cucumber flesh. Eur. Food Res. Technol. 2022, 248, 1929–1937. [Google Scholar] [CrossRef]
  24. Ropelewska, E.; Wrzodak, A.; Sabanci, K.; Aslan, M.F. Effect of lacto-fermentation and freeze-drying on the quality of beetroot evaluated using machine vision and sensory analysis. Eur. Food Res. Technol. 2022, 248, 153–161. [Google Scholar] [CrossRef]
  25. Ropelewska, E.; Wrzodak, A. The use of image analysis and sensory analysis for the evaluation of cultivar differentiation of freeze-dried and lacto-fermented beetroot (Beta vulgaris L.). Food Anal. Methods 2022, 15, 1026–1041. [Google Scholar] [CrossRef]
  26. Szczypinski, P.M.; Strzelecki, M.; Materka, A. Mazda-a software for texture analysis. In Proceedings of the 2007 International Symposium on Information Technology Convergence (ISITC 2007), Jeonju, Korea, 23–24 November 2007; pp. 245–249. [Google Scholar]
  27. Strzelecki, M.; Szczypinski, P.; Materka, A.; Klepaczko, A. A software tool for automatic classification and segmentation of 2D/3D medical images. Nucl. Instrum. Methods Phys. Res. Sect. A Accel. Spectrometers Detect. Assoc. Equip. 2013, 702, 137–140. [Google Scholar] [CrossRef]
  28. Ibraheem, N.A.; Hasan, M.M.; Khan, R.Z.; Mishra, P.K. Understanding color models: A review. ARPN J. Sci. Technol. 2012, 2, 265–275. [Google Scholar]
  29. Bouckaert, R.R.; Frank, E.; Hall, M.; Kirkby, R.; Reutemann, P.; Seewald, A.; Scuse, D. WEKA Manual for Version 3-9-1; University of Waikato: Hamilton, New Zealand, 2016. [Google Scholar]
  30. Eibe, F.; Hall, M.A.; Witten, I.H. The WEKA workbench. Online appendix for data mining: Practical machine learning tools and techniques. In Morgan Kaufmann; Morgan Kaufmann Publishers: Burlington, MA, USA, 2016. [Google Scholar]
  31. Ian, H.W.; Eibe, F. Data Mining: Practical Machine Learning Tools and Techniques, 2nd ed.; Elsevier: San Francisco, CA, USA, 2005. [Google Scholar]
  32. Ropelewska, E.; Szwejda-Grzybowska, J. A comparative analysis of the discrimination of pepper (Capsicum annuum L.) based on the cross-section and seed textures determined using image processing. J. Food Process Eng. 2021, 44, e13694. [Google Scholar] [CrossRef]
  33. Sabanci, K.; Aslan, M.F.; Ropelewska, E.; Unlersen, M.F. A convolutional neural network-based comparative study for pepper seed classification: Analysis of selected deep features with support vector machine. J. Food Process Eng. 2022, 45, e13955. [Google Scholar] [CrossRef]
  34. Ropelewska, E. Classification of the pits of different sour cherry cultivars based on the surface textural features. J. Saudi Soc. Agric. Sci. 2021, 20, 52–57. [Google Scholar] [CrossRef]
  35. Meshram, V.; Patil, K.; Meshram, V.; Hanchate, D.; Ramkteke, S. Machine learning in agriculture domain: A state-of-art survey. Artif. Intell. Life Sci. 2021, 1, 100010. [Google Scholar] [CrossRef]
  36. Rasekh, M.; Karami, H.; Fuentes, S.; Kaveh, M.; Rusinek, R.; Gancarz, M. Preliminary study non-destructive sorting techniques for pepper (Capsicum annuum L.) using odor parameter. LWT 2022, 164, 113667. [Google Scholar] [CrossRef]
  37. Mohi-Alden, K.; Omid, M.; Firouz, M.S.; Nasiri, A. A Machine Vision-Intelligent Modelling Based Technique for In-Line Bell Pepper Sorting. Inf. Process. Agric. 2022, in press. [Google Scholar] [CrossRef]
  38. Harel, B.; Parmet, Y.; Edan, Y. Maturity classification of sweet peppers using image datasets acquired in different times. Comput. Ind. 2020, 121, 103274. [Google Scholar] [CrossRef]
  39. Bazinas, C.; Vrochidou, E.; Kalampokas, T.; Karampatea, A.; Kaburlasos, V.G. A Non-Destructive Method for Grape Ripeness Estimation Using Intervals’ Numbers (INs) Techniques. Agronomy 2022, 12, 1564. [Google Scholar] [CrossRef]
  40. Palumbo, M.; Cozzolino, R.; Laurino, C.; Malorni, L.; Picariello, G.; Siano, F.; Stocchero, M.; Cefola, M.; Corvino, A.; Romaniello, R. Rapid and Non-Destructive Techniques for the Discrimination of Ripening Stages in Candonga Strawberries. Foods 2022, 11, 1534. [Google Scholar] [CrossRef]
  41. Karadağ, K.; Tenekeci, M.E.; Taşaltın, R.; Bilgili, A. Detection of pepper fusarium disease using machine learning algorithms based on spectral reflectance. Sustain. Comput. Inform. Syst. 2020, 28, 100299. [Google Scholar] [CrossRef]
Figure 1. The sample of red bell pepper fruit used in the experiments.
Figure 1. The sample of red bell pepper fruit used in the experiments.
Foods 11 02956 g001
Figure 2. The original digital color images of samples of fresh and lacto-fermented bell pepper (a) and images converted to selected color channels: a (b); R (c); G (d); X (e).
Figure 2. The original digital color images of samples of fresh and lacto-fermented bell pepper (a) and images converted to selected color channels: a (b); R (c); G (d); X (e).
Foods 11 02956 g002
Figure 3. A flowchart presenting steps of distinguishing fresh and lacto-fermented red bell pepper samples using image textures and machine learning algorithms.
Figure 3. A flowchart presenting steps of distinguishing fresh and lacto-fermented red bell pepper samples using image textures and machine learning algorithms.
Foods 11 02956 g003
Table 1. The selected texture parameters used to develop the models to distinguish fresh and lacto-fermented red bell pepper samples.
Table 1. The selected texture parameters used to develop the models to distinguish fresh and lacto-fermented red bell pepper samples.
Color Space LabColor Channel LColor Space RGBColor Channel RColor Space XYZColor Channel X
LHMean
LHPerc01
LHPerc10
LHMaxm10
LS5SH1SumEntrp
LS5SH3Correlat
LS5SV5AngScMom
LS4RZGLevNonU
aS5SZ1Correlat
aS4RNRLNonUni
bHDomn01
bS5SN1AngScMom
bS4RHShrtREmp
bS4RNLngREmph
LHMean LHPerc01
LHPerc10
LHPerc99
LHMaxm10
LS5SH1SumEntrp
LS5SH3Correlat
LS5SV5AngScMom
LS4RZGLevNonU
LS4RNRLNonUni
RHPerc10
RHMaxm01
RHMaxm10
RSGVariance
RS5SH1Correlat
RS5SH3Correlat
RS5SH3SumVarnc
RS5SH5Correlat
RS5SV5Correlat
RS4RZGLevNonU
RATeta1
GHKurtosis
GHPerc01
GHPerc50
GHMaxm10
GS5SH1SumEntrp
GS5SH3SumVarnc
GS5SN5AngScMom
GS4RNRLNonUni
BHDomn10
RHPerc10
RHMaxm01
RHMaxm10
RS5SH1Correlat
RS5SZ1DifVarnc
RS5SH3Correlat
RS5SN3AngScMom
RS5SH5Correlat
RS5SV5Correlat
RS4RHGLevNonU
RATeta1
XHPerc10
XHMaxm01
XHMaxm10
XS5SH1Correlat
XS5SV1SumAverg
XS5SH3SumEntrp
XS5SZ3SumEntrp
XS5SH5Correlat
XS4RVGLevNonU
XASigma
YHDomn01
YHMaxm10
YS5SZ1SumEntrp
YS4RNRLNonUni
ZSGNonZeros
XHPerc10
XHMaxm01
XHMaxm10
XS5SH1Correlat
XS5SV1SumAverg
XS5SH3SumEntrp
XS5SZ3SumEntrp
XS5SH5Correlat
XS4RVGLevNonU
XS4RNGLevNonU
XASigma
Table 2. The performance metrics of discrimination of fresh and lacto-fermented red bell pepper samples using selected image textures from color space Lab.
Table 2. The performance metrics of discrimination of fresh and lacto-fermented red bell pepper samples using selected image textures from color space Lab.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
982Fresh991.0000.9900.980
0100Lacto-fermented0.9800.9900.980
SMO (Functions)982Fresh980.9800.9800.960
298Lacto-fermented0.9800.9800.960
Random forest
(Trees)
973Fresh980.9900.9800.960
199Lacto-fermented0.9710.9800.960
Naïve Bayes
(Bayes)
991Fresh980.9710.9800.960
397Lacto-fermented0.9900.9800.960
Filtered classifier
(Meta)
973Fresh970.9700.9700.940
397Lacto-fermented0.9700.9700.940
JRip
(Rules)
964Fresh96.50.9700.9650.930
397Lacto-fermented0.9600.9650.930
MCC—Matthews correlation coefficient.
Table 3. The results of discrimination of fresh and lacto-fermented red bell pepper samples using selected image textures from color channel L.
Table 3. The results of discrimination of fresh and lacto-fermented red bell pepper samples using selected image textures from color channel L.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
982Fresh980.9800.9800.960
298Lacto-fermented0.9800.9800.960
SMO (Functions)982Fresh980.9800.9800.960
298Lacto-fermented0.9800.9800.960
Random forest
(Trees)
982Fresh98.50.9900.9850.970
199Lacto-fermented0.9800.9850.970
Naïve Bayes
(Bayes)
973Fresh970.9700.9700.940
397Lacto-fermented0.9700.9700.940
Filtered classifier
(Meta)
973Fresh970.9700.9700.940
397Lacto-fermented0.9700.9700.940
JRip
(Rules)
973Fresh96.50.9600.9650.930
496Lacto-fermented0.9700.9650.930
MCC—Matthews correlation coefficient.
Table 4. The discrimination of fresh and lacto-fermented red bell pepper samples based on models developed using selected image textures from color space RGB.
Table 4. The discrimination of fresh and lacto-fermented red bell pepper samples based on models developed using selected image textures from color space RGB.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
982Fresh98.50.9900.9850.970
199Lacto-fermented0.9800.9850.970
SMO (Functions)1000Fresh990.9800.9900.980
298Lacto-fermented1.0000.9900.980
Random forest
(Trees)
964Fresh96.50.9700.9650.930
397Lacto-fermented0.9600.9650.930
Naïve Bayes
(Bayes)
991Fresh98.50.9800.9850.970
298Lacto-fermented0.9900.9850.970
Filtered classifier
(Meta)
946Fresh930.9220.9310.860
892Lacto-fermented0.9390.9290.860
JRip
(Rules)
919Fresh93.50.9580.9330.871
496Lacto-fermented0.9140.9370.871
MCC—Matthews correlation coefficient.
Table 5. The performance metrics of distinguishing fresh and lacto-fermented red bell pepper samples using selected image textures from color channel R.
Table 5. The performance metrics of distinguishing fresh and lacto-fermented red bell pepper samples using selected image textures from color channel R.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
982Fresh97.50.9700.9750.950
397Lacto-fermented0.9800.9750.950
SMO (Functions)991Fresh98.50.9800.9850.970
298Lacto-fermented0.9900.9850.970
Random forest
(Trees)
964Fresh970.9800.9700.940
298Lacto-fermented0.9610.9700.940
Naïve Bayes
(Bayes)
955Fresh960.9690.9600.920
397Lacto-fermented0.9510.9600.920
Filtered classifier
(Meta)
946Fresh91.50.8950.9170.831
1189Lacto-fermented0.9370.9130.831
JRip
(Rules)
8911Fresh90.50.9180.9040.810
892Lacto-fermented0.8930.9060.810
MCC—Matthews correlation coefficient.
Table 6. The discrimination performance metrics for models developed on the basis of selected image textures from color space XYZ for distinguishing fresh and lacto-fermented red bell pepper samples.
Table 6. The discrimination performance metrics for models developed on the basis of selected image textures from color space XYZ for distinguishing fresh and lacto-fermented red bell pepper samples.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
991Fresh990.9900.9900.980
199Lacto-fermented0.9900.9900.980
SMO (Functions)1000Fresh990.9800.9900.980
298Lacto-fermented1.0000.9900.980
Random forest
(Trees)
973Fresh980.9900.9800.960
199Lacto-fermented0.9710.9800.960
Naïve Bayes
(Bayes)
982Fresh980.9800.9800.960
298Lacto-fermented0.9800.9800.960
Filtered classifier
(Meta)
955Fresh970.9900.9690.941
199Lacto-fermented0.9520.9710.941
JRip
(Rules)
955Fresh96.50.9790.9640.930
298Lacto-fermented0.9510.9660.930
MCC—Matthews correlation coefficient.
Table 7. The results of distinguishing fresh and lacto-fermented red bell pepper samples using selected image textures from color channel X.
Table 7. The results of distinguishing fresh and lacto-fermented red bell pepper samples using selected image textures from color channel X.
Algorithm
(Group)
Predicted Class (%)Actual ClassAverage Accuracy (%)PrecisionF-MeasureMCC
FreshLacto-Fermented
IBk
(Lazy)
991Fresh990.9900.9900.980
199Lacto-fermented0.9900.9900.980
SMO (Functions)1000Fresh990.9800.9900.980
298Lacto-fermented1.0000.9900.980
Random forest
(Trees)
964Fresh970.9800.9700.940
298Lacto-fermented0.9610.9700.940
Naïve Bayes
(Bayes)
991Fresh98.50.9800.9850.970
298Lacto-fermented0.9900.9850.970
Filtered classifier
(Meta)
937Fresh95.50.9790.9540.911
298Lacto-fermented0.9330.9560.911
JRip
(Rules)
946Fresh93.50.9310.9350.870
793Lacto-fermented0.9390.9350.870
MCC—Matthews correlation coefficient.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ropelewska, E.; Sabanci, K.; Aslan, M.F. The Changes in Bell Pepper Flesh as a Result of Lacto-Fermentation Evaluated Using Image Features and Machine Learning. Foods 2022, 11, 2956. https://doi.org/10.3390/foods11192956

AMA Style

Ropelewska E, Sabanci K, Aslan MF. The Changes in Bell Pepper Flesh as a Result of Lacto-Fermentation Evaluated Using Image Features and Machine Learning. Foods. 2022; 11(19):2956. https://doi.org/10.3390/foods11192956

Chicago/Turabian Style

Ropelewska, Ewa, Kadir Sabanci, and Muhammet Fatih Aslan. 2022. "The Changes in Bell Pepper Flesh as a Result of Lacto-Fermentation Evaluated Using Image Features and Machine Learning" Foods 11, no. 19: 2956. https://doi.org/10.3390/foods11192956

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop