Next Article in Journal
Identification of Thermo-Sensitive Chloroplast Development Gene TSCD5 Required for Rice Chloroplast Development under High Temperature
Previous Article in Journal
Utilization of UAV Remote Sensing in Plant-Based Field Experiments: A Case Study of the Evaluation of LAI in a Small-Scale Sweetcorn Experiment
Previous Article in Special Issue
The Classification of Peaches at Different Ripening Stages Using Machine Learning Models Based on Texture Parameters of Flesh Images
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Evaluating the Classification of Freeze-Dried Slices and Cubes of Red-Fleshed Apple Genotypes Using Image Textures, Color Parameters, and Machine Learning

by
Ewa Ropelewska
1,*,
Dorota E. Kruczyńska
2,
Ahmed M. Rady
3,4,
Krzysztof P. Rutkowski
1,
Dorota Konopacka
1,
Karolina Celejewska
1 and
Monika Mieszczakowska-Frąc
1
1
Fruit and Vegetable Storage and Processing Department, The National Institute of Horticultural Research, Konstytucji 3 Maja 1/3, 96-100 Skierniewice, Poland
2
Cultivar Testing, Nursery and Gene Bank Resources Department, The National Institute of Horticultural Research, Konstytucji 3 Maja 1/3, 96-100 Skierniewice, Poland
3
Teagasc Food Research Centre, Scribbletown, D15 DY05 Dublin, Ireland
4
Food, Water, Waste Research Group, Faculty of Engineering, University of Nottingham, University Park Campus, Nottingham NG7 2RD, UK
*
Author to whom correspondence should be addressed.
Agriculture 2023, 13(3), 562; https://doi.org/10.3390/agriculture13030562
Submission received: 25 January 2023 / Revised: 10 February 2023 / Accepted: 23 February 2023 / Published: 25 February 2023

Abstract

:
Dried red-fleshed apples are considered a promising high-quality product from the functional foods category. The objective of this study was to compare the flesh features of freeze-dried red-fleshed apples belonging to the ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ genotypes and indicate which parameters and shapes of dried samples are the most useful to distinguish apple genotypes. Apple samples were at the stage of harvest maturity. The average fruit weight, starch index, internal ethylene concentration, flesh firmness, total soluble sugar content, and titratable acidity were determined. One hundred apple slices with a thickness of 4 mm and one hundred cubes with dimensions of 1.5 cm × 1.5 cm × 1.5 cm of each genotype were subjected to freeze-drying. For each apple sample (slice or cube), 2172 image texture parameters were extracted from images in 12 color channels, and color parameters L*, a*, and b* were determined. The classification models were developed based on a set of selected image textures and a set of combined selected image textures and color parameters of freeze-dried apple slices and cubes using various traditional machine-learning algorithms. Models built based on selected textures of slice images in 11 selected color channels correctly classified freeze-dried red-fleshed apple genotypes with an overall accuracy reaching 90.25% and mean absolute error of 0.0545; by adding selected color parameters (L*, b*) to models, an increase in the overall accuracy to 91.25% and a decrease in the mean absolute error to 0.0486 were observed. The classification of apple cube images using models including selected texture parameters from images in 11 selected color channels was characterized by an overall accuracy of up to 74.74%; adding color parameters (L*, a*, b*) to models resulted in an increase in the overall accuracy to 80.50%. The greatest mixing of cases was observed between ‘Alex Red’ and ‘Trinity’ as well as ‘314’ and ‘602’ apple slices and cubes. The developed models can be used in practice to distinguish freeze-dried red-fleshed apples in a non-destructive and objective manner. It can avoid mixing samples belonging to different genotypes with different chemical properties. Further studies can focus on using deep learning in addition to traditional machine learning to build models to distinguish dried red-fleshed apple samples. Moreover, other drying techniques can be applied, and image texture parameters and color features can be used to predict the changes in flesh structure and estimate the chemical properties of dried samples.

1. Introduction

Red-fleshed apple cultivars are rich in anthocyanins, which are color-presenting substances. Anthocyanins can protect organisms in pathophysiological conditions, prevent cardiovascular diseases, protect the liver from damage, and alleviate the symptoms of visual fatigue [1]. Anthocyanins are responsible for the red color of red-fleshed apples [2]. In recent years, interest in consuming red-fleshed apples with enhanced anthocyanin content has increased. The emerging health benefits of a red-fleshed apple justify increased interest in research on this fruit [3]. In addition to anthocyanins, red-fleshed apples are also rich in other flavonoids [4]. Red-fleshed apples with high content of anthocyanins and other phenolic compounds are characterized by a strong antioxidant capacity [5]. They are attractive to consumers due to their red color and positive effect on health [6]. Red-fleshed apples can be consumed in the form of snacks. Drying is a promising process for producing healthy snacks with the retention of bioactive compounds and nutrients. The presence of anthocyanins in the flesh of red-fleshed apples results in the obtaining of value-added snack products [7]. It was reported that ready-to-eat dried snacks can be interesting and attractive food products [8]. Drying is used to preserve food by reducing water content and thus inhibiting microbial growth. Drying at a low temperature and reduced pressure minimizes changes in the dried material and the loss of heat-labile compounds. Freeze-drying is one of the least destructive drying methods in terms of phenolic compounds due to low temperature and scant contact with air [9]. Freeze-drying is a non-thermal processing technology. It was found that thermal processing caused greater changes in red-fleshed apple snacks. For example, infrared drying resulted in great losses in the apple (poly)phenolics. Hot air drying maintained approximately 83% of the total (poly)phenols compared with the freeze-dried samples and purée pasteurization only 65%; moreover, the degradation of anthocyanins was higher, and hot-air-dried apple snacks maintained 26% and pasteurized purée samples only 9% compared with freeze-dried apple snacks [10]. Wojdyło et al. [11] reported that novel red-fleshed apple snacks are a promising high-quality dehydrated product belonging to the functional foods category. The authors [11] revealed that freeze-drying allowed for the retention of the highest content of bioactive compounds in dried red-fleshed apple snacks, followed by hybrid (convective pre-drying + vacuum–microwave drying), vacuum–microwave, and convection drying.
Color Imaging System (CIS) is one of the earliest machine vision technologies applied in the food industry due to the relatively low cost and the availability of various image-processing algorithms implemented to obtain distinguishing information about the shape, color, size, and texture of the object [12]. Machine vision showed promising applications in the food industry for monitoring food quality for raw as well as processed food products [13]. The significant advancement of imaging sensors along with high-performance computational hardware has resulted in real-time image acquisition capability that can be coupled with image analysis and machine-learning algorithms to deduce various morphological characteristics of the products. CIS is used in the food industry to conduct rapid quality control operations on food products instead of solely depending on human inspectors to obtain a consistent performance [14]. Monitoring the quality of food products during different processes is another application of CIS, especially with the integration of robotics into food manufacturing [12,14]. Machine-learning (ML) algorithms aim to automate the learning process through training, and then the optimized regression and/or classification algorithms can be utilized to predict accurate estimation of the unknown samples/objects [15]. ML is a key tool for Industry 4.0, where all elements of the manufacturing process can be interconnected through intelligent data analysis [16].
Image analysis and machine learning were successfully applied in previous studies to classify fruits and vegetables [17,18,19] and detect changes in the product quality as a result of different processing, such as drying and fermentation [20,21,22,23]. Furthermore, image features were used to estimate and predict the chemical properties of food products [24,25]. Machine-learning techniques can be very effective in predicting chemical substances [26]. In the case of apples, the usefulness of image processing to determine the effect of drying on shrinkage, color, and image texture of slices was proven. The correlation was feasible between drying time and the slice area, perimeter, and other morphological features of the image. Moreover, a* and b* values showed a stable increase with the drying time [27]. While previous studies presented an understanding of how to correlate image texture with the quality of the dried apple, no study investigated the possibility of using digital imaging for evaluating the quality of freeze-dried red-fleshed apples.
Thus, the main objectives of this study were to exploit a CIS coupled with machine-learning algorithms for classifying freeze-dried red-fleshed apple samples originating from different genotypes, and to develop and optimize the classification models. The approach, combining image textures, color parameters, and machine learning, is a great novelty in classifying dried red-fleshed apples and can be used in practice to avoid mixing different genotypes.

2. Materials and Methods

2.1. Materials

The red-fleshed apples of the ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ genotypes were harvested in 2022 from the field experiment conducted at the Experimental Orchard of the National Institute of Horticultural Research in Dabrowice near Skierniewice (central Poland). The trees of ‘Alex Red’ and ‘Trinity’ were planted in the spring of 2019 on the semi-dwarf rootstock M.26, while genotypes ‘314’ and ‘602’ were planted one year later on a vigorous rootstock Antonovka seedling. In field experiments, the protection of trees against diseases and pests was carried out in accordance with the rules of integrated fruit production (IFP). The weather conditions in 2022 had a positive effect on the development of trees. The flowering of all genotypes was satisfactory, which affected the yields. All the genotypes in the experiment yielded well, and the average yield per tree was 5.1 kg for ‘Alex Red’, 6.0 kg for ‘Trinity’, 1.3 kg for ‘314’, and 3.7 kg for ‘602’.
Apple samples were picked at the stage of harvest maturity, which was determined on the basis of internal quality parameters such as ethylene production, starch index, flesh firmness, sugar content, and acidity. Fruits typical for the genotype in terms of shape, size, and color of the skin and without biotic and abiotic symptoms of injury were selected for further study. After harvest, apples were stored at a temperature of 2 °C for a few days.
To assess the quality of apples of all genotypes in the experiment, fruits were randomly picked during harvest. Qualitative characteristics were assessed using standard methods. Fruit weight was determined by weighing individual fruits on a WPS2100/C/2 laboratory balance (Radwag, Radom, Poland) and expressed in grams (g). The starch index was determined using a ten-point scale in the standard iodine test (1-black, 10-white), using the Ctifl Starch Conversion Chart for Apples (Centre Technique Interprofessionnel des Fruits et Legumes, Saint Remy de Provence, France). For internal ethylene concentration (IEC), a 1 mL gas sample was taken from the apple core and injected into an HP 5890 II gas chromatograph equipped with an alumina-packed glass column (6 mm diameter and 1200 mm length, packed with Alumina F-1, 60/80 mesh) and detector FID (Flame Ionization Detector) (Hewlett Packard, Palo Alto, CA, USA). Results were expressed in µl L−1 (ppm). Flesh firmness was measured on two opposite sides of the fruit (after skin removal) using Zwick Roell Z010 (Zwick/Roell, Ulm, Germany) equipped with a Magness–Taylor 11.1 mm probe. The speed with which the head moved during a single firmness measurement was 100 mm/min. Firmness was defined as the maximum force needed to penetrate the plunger into the flesh to a depth of 8.7 mm. The results were expressed in newtons [N]. Total soluble sugar content (TSS) was measured (in juice collected from individual fruits) in fresh juices with a digital refractometer Atago PR-101 (Atago Co. Ltd., Tokyo, Japan) and expressed as % (°Brix). Titratable acidity (TA) was measured using an automatic titrator DL 21 (Mettler-Toledo AG Analytical, Schwerzenbach, Switzerland), using a standard titration method (titration with 0.1 N NaOH to the end point pH = 8.1) and expressed in % malic acid [28]. The measurements were carried out in four replicates.

2.2. Freeze-Drying

Before drying experiments, apples were washed and cleaned. Apple samples were prepared in two ways. Drying involved two types of red-fleshed apple samples differing in shape. Apple slices and cubes were used. 5 kg of apples were used in each drying experiment. Apples belonging to each genotype were sliced to obtain slices with a thickness of 4 mm and were cut into cubes with dimensions of 1.5 cm × 1.5 cm × 1.5 cm using precise laboratory cutting devices. The extracted red-fleshed apple slices and cubes were subjected to freeze-drying. Initially, slices and cubes were frozen at a temperature of −28 °C ± 1 °C in a freezer (Whirlpool) for a day. The freeze-drying was carried out in a laboratory freeze dryer (LABCONCO, Kansas City, MO, USA). Apple slices and cubes were placed on trays so as not to touch each other, and trays were placed on shelves in a freeze-dryer at a temperature of 17 °C. When the condenser temperature reached −55 °C, the process started and lasted for 48 h. The final stage of the drying was performed at a temperature of the shelves equal to 25 °C. The final pressure was equal to 6 kPa. One hundred freeze-dried apple slices and one hundred freeze-dried apple cubes belonging to each genotype were selected to be subjected to image analysis and measurements of color parameters.

2.3. Image Analysis and Color Measurements of Freeze-Dried Red-Fleshed Apple Slices and Cubes

2.3.1. Image Acquisition and Processing

Freeze-dried apple slices and cubes were imaged with the use of the Epson Perfection V600 Photo flatbed scanner with LED (Light-Emitting Diode) illumination (Epson, Suwa, Nagano, Japan) and SilverFast Ai Studio 9 Scanner Software with Auto IT8 Calibration (LaserSoft Imaging, Kiel, Germany). Slices and cubes were placed on the scanner glass, and images were acquired on a white background. In total, digital color images of one hundred freeze-dried slices and one hundred freeze-dried cubes of each of the ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apple genotypes were obtained. Thus, the dataset included:
- one hundred freeze-dried slices of the ‘Alex Red’ red-fleshed apple genotype,
- one hundred freeze-dried slices of the ‘Trinity’ red-fleshed apple genotype,
- one hundred freeze-dried slices of the ‘314’ red-fleshed apple genotype,
- one hundred freeze-dried slices of the ‘602’ red-fleshed apple genotype,
and
- one hundred freeze-dried cubes of the ‘Alex Red’ red-fleshed apple genotype,
- one hundred freeze-dried cubes of the ‘Trinity’ red-fleshed apple genotype,
- one hundred freeze-dried cubes of the ‘314’ red-fleshed apple genotype,
- one hundred freeze-dried cubes of the ‘602’ red-fleshed apple genotype.
The acquired images were saved in the TIFF file format. The sample images of freeze-dried slices are presented in Figure 1 and freeze-dried cubes in Figure 2.
Firstly, the background of the slice and cube images was changed to black, and the images were saved in the BMP (bitmap) file format. This step allowed for image segmentation and feature extraction. The images of red-fleshed apple slices and cubes were processed using the MaZda software (Łódź University of Technology, Institute of Electronics, Łódź, Poland) [29,30,31]. The images were converted to color channels R, G, B, L, a, b, X, Y, Z, U, V, and S. The image segmentation into the black background and lighter apple samples was carried out using the manually determined brightness threshold. Each apple slice or cube was considered as one region of interest (ROI). For each ROI, 2172 image texture parameters, including 181 textures based on the gradient map, histogram, Haar wavelet transform, autoregressive model, co-occurrence matrix, and run-length matrix for each color channel were determined. The image texture may be defined as a function of the spatial variation of the pixel brightness intensity. Image textures carry important information about the physical object’s structure. The quantitative analyses of image texture parameters provide insights into product quality [31,32].

2.3.2. Color Measurements

Color parameters L* (lightness from 0 (dark) to 100 (light)), a* (red (+) – green (−)), and b* (yellow (+) – blue (−)) were measured using the Konica Minolta CM-2500c portable spectrophotometer (Konica Minolta, Inc., Chiyoda-ku, Tokyo, Japan). Before measurements of freeze-dried samples, zero calibration and then white calibration were performed. During the measurements, the CIE standard illuminant D65 was used as standard daylight (average noon daylight from the northern sky). The color measurements were carried out in 100 repetitions for slices and cubes of each red-fleshed apple genotype.

2.4. Statistical Analysis

The statistical analysis was conducted with Statistica 13.1 (StatSoft, Tulsa, OK, USA). A two-way analysis of variance (ANOVA) at p < 0.05 and the LSD test at p < 0.05 were used to compare the mean values of apple characteristics.
The classifications of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ freeze-dried slices and cubes were carried out using WEKA machine-learning software (Machine Learning Group, University of Waikato, Hamilton, New Zealand) [33,34,35]. Traditional machine-learning models for distinguishing apple samples were developed based on selected image textures and on image textures combined with color parameters using traditional machine-learning algorithms. Four different approaches to the classification of freeze-dried apple samples were applied. Firstly, the classification was carried out using texture parameters selected from all color channels of freeze-dried slice images of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apples. Then, color parameters were also added to a set of selected image textures, and the analysis was performed for a set of selected image textures and color features of apple slices. Afterward, freeze-dried cubes of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ apples were classified using models involving attributes selected from a set of textures extracted from images in all color channels. In the next step of the analysis, classification models were built using a combined set of selected image textures and color parameters of apple cubes. Attribute selection was performed using the Best First and CFS (Correlation-based Feature Selection) subset evaluator. This step was performed separately for a set of image textures of apple slices, a combined set of image textures and color parameters of apple slices, a set of image textures of apple cubes, and a combined set of image textures and color parameters of apple cubes. In the case of apple slices, the selected image textures belonged to color channels R, G, B, L, a, b, X, Z, U, V, and S. Among the color parameters, L*(D65) and b*(D65) were characterized by the highest power to distinguish freeze-dried slices. For apple cubes, the textures from images in color channels R, G, B, L, a, b, X, Y, Z, U, and S were selected. Additionally, color parameters L*(D65), a*(D65), b*(D65) were added to models. The classifications were performed using a test mode of 10-fold cross-validation. The dataset of freeze-dried red-fleshed apple slices was randomly divided into 10 parts. Each part was treated in turn as the test set and the 9 parts as the training sets. The learning procedure was performed 10 times on different training sets. The overall error was determined as the average of 10 error estimates. Selected features were used for building classification models using machine-learning algorithms from the groups of Functions, Lazy, Meta, Trees, and Bayes. In the case of each group, the most successful algorithm was chosen. The LDA (Linear Discriminant Analysis) from the group of Functions), IBk (Instance-Based k) from Lazy, LogitBoost from Meta, LMT (Logistic Model Tree) from Trees, and Bayes Net from Bayes were chosen. IBk is a k-nearest-neighbors classifier. LogitBoost performs additive logistic regression. LMT builds logistic-model trees. The function of Bayes Net is learning Bayesian nets [33,34,35]. The criterion for the selection of the algorithms was the highest overall accuracy. Besides overall accuracies, the number of correctly and incorrectly classified cases, and the values of the kappa statistic, mean absolute error (MAE), root mean squared error (RMSE), TP (true positive) rate, FP (false positive) rate, precision, F-measure, MCC (Matthews correlation coefficient), ROC (receiver operating characteristic) area, and PRC (precision-recall) area were determined [21,36,37].

3. Results and Discussion

3.1. Fresh Fruit Quality

Fruit ripening depended on the genotype. This means that genotypes in the experiment can be divided into two categories: late summer (‘Alex Red’ and ‘Trinity’) and early autumn (‘314’ and ‘602’). The values of the starch index indicate that the harvested fruits were in the phase of harvest maturity. This phase meant that apples were mature but not overripe (Table 1). Internal ethylene concentration in apple cores also confirms this thesis. The fruits of the ‘314’ clone were more advanced in maturity compared to other evaluated cultivars/clones. The firmness of the flesh was varied. It had significantly higher values for clone ‘602’, whereas it was the lowest for clone ‘314’; for the genotypes ‘Alex Red’ and ‘Trinity’, they were similar. Sugar content and acidity were related to the date of harvest. Late summer genotypes were characterized by lower sugar content and higher acidity compared to early autumn apples.

3.2. Classification Results Based on Selected Image Texture Parameters of Sliced Sample Images

Traditional machine-learning models developed using selected image texture parameters extracted from the images of freeze-dried sliced samples in color channels yielded an overall classification accuracy of 90.25% for the studied genotypes and the LDA algorithm from the group of functions (Table 2). The overall accuracy of 90.25% referred to 92 correctly classified cases from class ‘Alex Red’, 90 cases from ‘Trinity’, 88 cases from ‘314’, and 91 cases from ‘602’. The optimal model was characterized by 361 correctly classified cases and 39 incorrectly classified cases, with values of kappa, MAE, and RMSE of 0.8700, 0.0545, and 0.2010, respectively. The number of correctly and incorrectly classified cases presented in Table 2 revealed the greatest misclassification of cases between ‘Alex Red’ and ‘Trinity’ as well as ‘314’ and ‘602’ sliced samples. The LDA classifier provided the highest overall accuracy for ‘Alex Red’ slices, with 92 cases out of 100 cases (92%) classified. Slightly lower accuracies were observed for ‘602’ (91%), ‘Trinity’ (90%), and ‘314’ (88%) sliced samples. For ‘Alex red’, six cases were incorrectly classified as ‘Trinity’, one case as ‘314’, and one case as ‘602’. For ‘Trinity’, seven cases were incorrectly classified as ‘Alex Red’ and three as ‘602’. On the other hand, nine cases of ‘602’ were incorrectly classified as ‘314’, and eight cases of ‘314’ were incorrectly included in the class ‘602’. The remaining three and one misclassified cases of ‘314’ were included in the ‘Alex Red’ and ‘Trinity’ classes, respectively. Slightly lower overall classification accuracies were obtained using the model built by LMT from the group of Trees (89.50%), the LogitBoost from Meta (85.50%), and the IBk from Lazy (85.25%), whereas the lowest overall accuracy of 84.75% was observed for the model built using Bayes Net from the group of Bayes. In this model, 339 cases were correctly classified, whereas 61 cases were misclassified. The kappa statistic reached 0.7967, MAE was equal to 0.0768, RMSE was 0.2669, and the accuracies for the individual classes were equal to 83% for ‘Alex Red’, 86% for ‘Trinity’, 84% for ‘314’, and 86% for ‘602’. The slice samples of the ‘314’ and ‘602’ genotypes showed relatively higher misclassification with 12 cases of the ‘314’ which were incorrectly included in the predicted class ‘602’, whereas the vice versa was 11 cases. ‘Alex Red’ and ‘Trinity’ also yielded a misclassification, with ten ‘Trinity’ cases classified as ‘Alex Red’ and seven ‘Alex Red’ cases classified as ‘Trinity’.
Other performance metrics for classification models are presented in Table 3. None of the TP rate, precision, F-measure, MCC, ROC area, and PRC area reached 1.000, which confirmed that none of the samples were classified with 100% accuracy. The highest TP rate of 0.950 was observed for the ‘Trinity’ slices, resulting from the LMT classifier. Such a class was also correctly distinguished from other classes using IBk, LogitBoost, and Bayes Net, which was proven by the values of the TP rate of 0.900, 0.930, and 0.860, respectively. The FP rate did not reach 0.000 for any of the studied genotypes, which means more classified samples. The lowest values of the FP rate for ‘Trinity’ yielded from the LDA (0.023), IBk (0.030), LMT (0.030), and Bayes Net (0.023) classifiers. Freeze-dried slices belonging to ‘Trinity’ were also characterized by the highest precision, equal to 0.928 for LDA, 0.909 for IBk, 0.894 for LogitBoost, 0.913 for LMT, and 0.925 for Bayes Net; the highest F-Measure of 0.914 for LDA, 0.905 for IBk, 0.912 for LogitBoost, 0.931 for LMT, and 0.891 for Bayes Net; and the highest MCC of 0.886 for LDA, 0.873 for IBk, 0.882 for LogitBoost, 0.908 for LMT, and 0.858 for Bayes Net. The values of the ROC area and PRC area were the highest for ‘Trinity’ in the case of IBk (0.935 and 0.843), LogitBoost (0.986 and 0.964), and Bayes Net (0.984 and 0.962), and for ‘Alex Red’ for LDA (0.987 and 0.967) and LMT (0.980 and 0.961). In the case of the LDA algorithm, the ROC area equal to 0.987 was also determined for slices belonging to the ‘602’ genotype.

3.3. Classification Results Based on Selected Image Textures and Color Parameters of Sliced Sample Images

Including selected color parameters (L*(D65), b*(D65)) in classification models increased the overall accuracies of the classification of freeze-dried red-fleshed apple slices. Models combining both selected image textures and color parameters were characterized by overall accuracy ranging from 85.50% (Bayes Net) to 91.25% (LDA) as shown in Table 4. For the model developed using the LDA algorithm, the kappa statistic of 0.8833 was the highest, whereas the MAE of 0.0486 and RNMSE of 0.1876 were the lowest. From the dataset of 400 cases, 365 were correctly classified and 35, were misclassified. Classification accuracies for individual classes revealed that 93 cases of ‘Alex Red’, 92 cases of ‘Trinity’, 89 cases of ‘314’, and 91 cases of ‘602’ were correctly classified. In the case of slices belonging to the ‘602’ genotype, nine remaining cases were misclassified as ‘314’, whereas seven cases of ‘314’ apple slices were incorrectly included in ‘602’, two cases in ‘Alex Red’, and two cases in ‘Trinity’. It was observed that five cases belonging to ‘Alex Red’ were misclassified as ‘Trinity’, and six cases from ‘Trinity’ were incorrectly classified as ‘Alex Red’. The remaining incorrectly classified cases of ‘Alex Red’ were included in classes ‘314’ (one case) and ‘602’ (one case). In the case of the actual class ‘Trinity’, the remaining two cases were incorrectly classified as ‘602’.
The classification models developed based on both selected image textures and color parameters of apple slices were characterized by values of the TP rate, precision, F-measure, MCC, ROC area, and PRC area less than 1.000, and FP rate higher than 0.000 for each genotype (Table 5). The models developed for both selected image textures and color parameters showed better classification than those including only selected image texture parameters (Table 3). The performance metrics in Table 5 indicate that the lowest FP rate of 0.020 was observed for ‘Trinity’ using the LMT algorithm. In the case of models built using other algorithms, ‘Trinity’ expressed the lowest FP rate from 0.023 (LDA, Bayes Net) to 0.033 (IBk), whereas the highest FP rate of 0.077 was found for the ‘602’ genotype for IBk and ‘Alex Red’ for LogitBoost. The highest TP rate of 0.940 was determined for ‘Trinity’ using the IBk and LMT algorithms. The models built using LMT also produced the highest precision and F-measure of 0.940, and MCC equal to 0.920 for ‘Trinity’, whereas the values of ROC area (0.990) and PRC area (0.973) were the highest for ‘Trinity’ and the model developed using Bayes Net.

3.4. Classification Results Based on Selected Texture Parameters of Cube Sample Images

For the classification of images of apple cubes, models including selected image textures produced overall accuracies ranging from 68.50% (IBk) to 74.74% (LMT), as illustrated in Table 6. The LMT algorithm resulted in 299 correctly classified cases of freeze-dried cubes, and the remaining 101 cases were incorrectly classified. The kappa statistic of 0.6633 was quite low, and MAE and RMSE reached 0.1698 and 0.2972, respectively, whereas the model built using IBk was characterized by lesser performance, incorporating only 274 correctly classified cases and 126 incorrectly classified cubes, a kappa statistic of 0.5800, MAE of 0.1599, and RMSE of 0.3947. The number of correctly and incorrectly classified cases shown in Table 6 revealed 84% as the highest correctness of classification of cubes, obtained for the ‘602’ genotype using the LMT classifier, whereas other genotypes showed accuracy values of 72% for ‘314’, 69% for ‘Trinity’, and 74% for ‘Alex Red’.
The highest correctness of the classification of the ‘602’ genotype was confirmed by the highest TP rate reaching 0.840 for models built using the LDA and LMT algorithms. The values of precision (0.816), F-measure (0.828), MCC (0.769), ROC area (0.969), and PRC area (0.927) were the highest for the ‘602’ genotype in the case of the model developed using the LDA algorithm, whereas the optimal FP rate of 0.063 was found for apple cubes belonging to the ‘602’ genotype using the LDA classifier, and for the ‘314’ genotype using the LMT classifier (Table 7).

3.5. Classification Results Based on Selected Image Textures and Color Parameters of Cube Sample Images

Models developed based on selected textures from cube images in selected color channels and color parameters (L*(D65), a*(D65), b*(D65)) were characterized by an overall accuracy of 71.75% (IBk) to 80.50% (LogitBoost) (Table 8). The classification model built using LogitBoost illustrated that 322 cubed samples belonging to the studied genotype were correctly classified vs. 78 misclassified cases with a kappa statistic of 0.7400, MAE of 0.1464, and RMSE of 0.2711. The number of correctly and incorrectly classified cases revealed the greatest mixing of cases between ‘Alex Red’ and ‘Trinity’, as well as ‘314’ and ‘602’ apple samples (Table 8). It was found that 81 and 83 cases of freeze-dried cubes belonging to ‘Alex Red’ and ‘Trinity’, respectively, were correctly classified. However, 13 cases of ‘Alex Red’ were classified as ‘Trinity’, and 11 ‘Trinity’ cases were incorrectly included in ‘Alex Red’. On the other hand, 76 cases of the ‘314’ apple genotype were correctly classified, and 14 cubes were misclassified as ‘602’. Additionally, 82 cases of the ‘602’ genotype were correctly included in the ‘602’ class vs. 13 cases that were incorrectly included in the ‘314’ class. Such results indicated a reasonable similarity between ‘Alex Red’ and ‘Trinity’, and between ‘314’ and ‘602’ freeze-dried cubes.
Classification results with models including both image textures and color parameters (Table 9) resulted in a better performance compared with those developed using only selected image texture parameters (Table 7). The optimal metrics were obtained for the ‘602’ using LDA and LMT classifiers, and for the LDA, maximum values of TP rate of 0.880, F-measure of 0.867, MCC of 0.822, ROC area of 0.979, PRC area of 0.947, and precision of up to 0.859 were observed. The LMT resulted in the lowest FP rate of 0.047 for the ‘602’.
The obtained results revealed the great usefulness of combining image textures and color parameters with traditional machine-learning algorithms for the classification of freeze-dried slices and cubes of red-fleshed apples belonging to different genotypes. The performed research sets new directions in the non-destructive assessment of the quality of dried apples. Data from previous literature confirmed the use of image textures in studies on apple drying. The application of optical sensors in general and of CIS in particular for monitoring the quality of apple slices during drying was feasibly implemented in several studies. Digital images were studied to yield a high correlation between CIELAB color parameters (L*, a*, b*, and ΔE) and either the moisture content or the drying time, with values of coefficient of determination, or R2, of 92.0–96.0% for moisture content and 68.0–99.0% for the drying time [38]. Among others, it is important to state that image texture parameters such as energy, contrast, entropy, and inverse different moment were reported to achieve a positive correlation with different drying times for apple slices [27]. The results obtained in this study also agree with those deduced by Sampson et al. [39]. The authors [39] investigated the utilization of a dual-camera system to evaluate the drying characteristics of apple slices. Texture features of images resulted in a coefficient of correlation, or r, of as high as 55.9% for the peak force, whereas image texture parameters presented R2 values higher than 90% for predicting the change in moisture content of hot-air-dried organic apple slices (‘Gala’). Another study by Raponi et al. [40] used a CMOS-color-camera-vision system to evaluate the quality of apple cylinders during and after drying. The results indicated R2 values of 99.8% for predicting moisture content as a function of the shrinkage in the surface area of the disc sample based on image processing. However, in the case of freeze-dried red-fleshed apples, the effectiveness of the models built using both selected image textures and color parameters to distinguish genotypes was not confirmed by previous literature. Therefore, the present results are very promising. Another note is that the LDA and LMT classifiers generally showed a consistently higher classification performance than other algorithms. The results illustrated the advantage of LDA and LMT algorithms. LDA can be effectively used for dimensional reduction for data sets with a relatively large number of features compared to the number of samples in the training set [41]. LMT benefits from employing logistic regression, which leads to significantly reducing the number of features used to build the classification model and consequently reduces the likelihood of overfitting [42]. In our study, in general, LDA, followed by LMT algorithms, outperform other algorithms, taking into account all metrics, which confirms classification results.
Current research dynamics in the applications of machine learning in machine vision systems indicate a further spread of it in agriculture and can make agricultural technologies robust, accurate, and low-cost [43]. In further studies, the classification accuracy can be improved, for example, by using deep learning. Deep learning (DL) can allow for precise image classification. The application of deep learning can increase learning capabilities and correctness of image classification due to a hierarchical data representation by means of various convolutions [44]. Moreover, in our future studies, image textures and color parameters may also be used in other types of drying experiments for the prediction of flesh changes caused by various drying techniques and the estimation of chemical properties of dried samples by regression equations based on image textures and color features.

4. Conclusions

The approach involving both image textures and color parameters proved to be useful for distinguishing freeze-dried samples of red-fleshed apples belonging to the ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ genotypes using machine-learning algorithms. The developed procedure can be used in practice to avoid mixing different genotypes of apples with different chemical properties. The LDA algorithm from the group of Functions, IBk from Lazy, LogitBoost from Meta, LMT from Trees, and Bayes Net from Bayes allowed for building the most successful models. The overall accuracies of the classification of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ genotypes were higher in the case of freeze-dried slices than freeze-dried cubes. The models that included both selected image textures and color parameters provided the highest accuracies both for apple slices and cubes. In further studies, besides the traditional machine-learning algorithms, the models could be built using deep learning. Additionally, in future research, image textures and color parameters may be used for the prediction of the changes in the flesh structure of red-fleshed apples caused by various drying techniques and for the non-destructive and objective estimation of the chemical properties of dried samples.

Author Contributions

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

Funding

The determination of fresh fruit quality, drying experiments, and measurements of color parameters of dried fruit samples were performed within the framework of the research project “Determining the suitability of red-fleshed apples as a raw material for the production of high-quality dried fruit and creating a raw-material base in the form of a commercial orchard of red-fleshed apples” (ZPiPOiW/4/2021-6.4.21), financed by the Ministry of Science and Higher Education, as part of the research subsidy granted to the National Institute of Horticultural Research. The purchase of the freeze dryer was co-financed by the European Union through the European Regional Development Fund within the Innovative Economy Operational Programme, 2007–2013. Project No UDA-POIG.01.03.01-00-129/09-10, entitled “Polish Trichoderma strains in plant protection and organic waste management”, under Priority 1.3.1, subject area ‘Bio’. The purchase of the flatbed scanner was financed by the European Regional Development Fund with the National Centre for Research and Development as an Intermediate Institution, as part of the research and development project “An innovative device for producing dried fruit with high pro-health properties” (POIR.01.01.01-00-1073/21-00).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

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

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Wang, B.; Jiang, S.; Wang, Y.; Xu, J.; Xu, M.; Sun, X.; Zhu, J.; Zhang, Y. Red-Fleshed Apple Anthocyanin Extract Reduces Furan Content in Ground Coffee, Maillard Model System, and Not-from-Concentrate Apple Juice. Foods 2021, 10, 2423. [Google Scholar] [CrossRef] [PubMed]
  2. Wagner, A.; Dussling, S.; Scansani, S.; Bach, P.; Ludwig, M.; Steingass, C.B.; Will, F.; Schweiggert, R. Comparative Evaluation of Juices from Red-Fleshed Apples after Production with Different Dejuicing Systems and Subsequent Storage. Molecules 2022, 27, 2459. [Google Scholar] [CrossRef] [PubMed]
  3. Catalán, Ú.; Pedret, A.; Yuste, S.; Rubió, L.; Piñol, C.; Sandoval-Ramírez, B.A.; Companys, J.; Foguet, E.; Herrero, P.; Canela, N.; et al. Red-Fleshed Apples Rich in Anthocyanins and White-Fleshed Apples Modulate the Aorta and Heart Proteome in Hypercholesterolaemic Rats: The AppleCOR Study. Nutrients 2022, 14, 1047. [Google Scholar] [CrossRef] [PubMed]
  4. Sun, X.; Li, X.; Wang, Y.; Xu, J.; Jiang, S.; Zhang, Y. MdMKK9-Mediated the Regulation of Anthocyanin Synthesis in Red-Fleshed Apple in Response to Different Nitrogen Signals. Int. J. Mol. Sci. 2022, 23, 7755. [Google Scholar] [CrossRef] [PubMed]
  5. Wang, X.; Li, C.; Liang, D.; Zou, Y.; Li, P.; Ma, F. Phenolic compounds and antioxidant activity in red-fleshed apples. J. Funct. Foods 2015, 18, 1086–1094. [Google Scholar] [CrossRef]
  6. Juhart, J.; Medic, A.; Veberic, R.; Hudina, M.; Jakopic, J.; Stampar, F. Phytochemical Composition of Red-Fleshed Apple Cultivar ‘Baya Marisa’ Compared to Traditional, White-Fleshed Apple Cultivar ‘Golden Delicious’. Horticulturae 2022, 8, 811. [Google Scholar] [CrossRef]
  7. Joshi, A.P.K.; Rupasinghe, H.P.V.; Khanizadeh, S. Impact of drying processes on bioactive phenolics, vitamin c and antioxidant capacity of red-fleshed apple slices. J. Food Process. Preserv. 2011, 35, 453–457. [Google Scholar] [CrossRef]
  8. Konopacka, D.; Seroczynska, A.; Korzeniewska, A.; Jesionkowska, K.; Niemirowicz-Szczytt, K.; Płocharski, W. Studies on the usefulness of Cucurbita maxima for the production of ready-to-eat dried vegetable snacks with a high carotenoid content. LWT - Food Sci. Technol. 2010, 43, 302–309. [Google Scholar] [CrossRef]
  9. Kidoń, M.; Grabowska, J. Bioactive compounds, antioxidant activity, and sensory qualities of red-fleshed apples dried by different methods. LWT - Food Sci. Technol. 2021, 136, 110302. [Google Scholar] [CrossRef]
  10. Yuste, S.; Macià, A.; Motilva, M.J.; Prieto-Diez, N.; Rubió, L. Thermal and non-thermal processing of red-fleshed apple: How are (poly)phenol composition and bioavailability affected? Food Funct. 2020, 11, 10436–10447. [Google Scholar] [CrossRef]
  11. Wojdyło, A.; Lech, K.; Nowicka, P. Effects of Different Drying Methods on the Retention of Bioactive Compounds, On-Line Antioxidant Capacity and Color of the Novel Snack from Red-Fleshed Apples. Molecules 2020, 25, 5521. [Google Scholar] [CrossRef]
  12. Davies, E.R. Machine vision in the food industry. In Robotics and Automation in the Food Industry; Elsevier: Amsterdam, The Netherlands, 2013; pp. 75–110. [Google Scholar] [CrossRef]
  13. Sun, D.W. Computer Vision Technology for Food Quality Evaluation, 2nd ed.; Academic Press: Cambridge, MA, USA, 2016; ISBN 9780128025994. [Google Scholar]
  14. Zheng, C.; Sun, D.-W. 2.2 Computer Vision for Quality Control. In Optical Monitoring of Fresh and Processed Agricultural Crops, 1st ed.; Zude, M., Ed.; CRC Press: Boca Raton, FL, USA, 2008. [Google Scholar]
  15. Alpaydin, E. Introduction to Machine Learning, 4th ed.; MIT Press: Cambridge, MA, USA, 2020. [Google Scholar]
  16. Sarker, I.H. Machine learning: Algorithms, real-world applications and research directions. SN Comput. Sci. 2021, 2, 160. [Google Scholar] [CrossRef]
  17. Gulzar, Y. Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer Learning Technique. Sustainability 2023, 15, 1906. [Google Scholar] [CrossRef]
  18. Mamat, N.; Othman, M.F.; Abdulghafor, R.; Alwan, A.A.; Gulzar, Y. Enhancing Image Annotation Technique of Fruit Classification Using a Deep Learning Approach. Sustainability 2023, 15, 901. [Google Scholar] [CrossRef]
  19. Suryawanshi, Y.; Patil, K.; Chumchu, P. VegNet: Dataset of vegetable quality images for machine learning applications. Data Brief 2022, 45, 108657. [Google Scholar] [CrossRef]
  20. Ropelewska, E.; Sabanci, K.; Aslan, M.F. The Use of Digital Color Imaging and Machine Learning for the Evaluation of the Effects of Shade Drying and Open-Air Sun Drying on Mint Leaf Quality. Appl. Sci. 2023, 13, 206. [Google Scholar] [CrossRef]
  21. 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]
  22. 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. [Google Scholar] [CrossRef]
  23. 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]
  24. Nazari, L.; Khazaei, A.; Ropelewska, E. Prediction of tannin, protein, and total phenolic content of grain sorghum using image analysis and machine learning. Cereal Chem. 2022, 99, 843–849. [Google Scholar] [CrossRef]
  25. Ropelewska, E.; Szwejda-Grzybowska, J. Relationship of Textures from Tomato Fruit Images Acquired Using a Digital Camera and Lycopene Content Determined by High-Performance Liquid Chromatography. Agriculture-Basel 2022, 12, 1495. [Google Scholar] [CrossRef]
  26. Aggarwal, S.; Gupta, S.; Gupta, D.; Gulzar, Y.; Juneja, S.; Alwan, A.A.; Nauman, A. An Artificial Intelligence-Based Stacked Ensemble Approach for Prediction of Protein Subcellular Localization in Confocal Microscopy Images. Sustainability 2023, 15, 1695. [Google Scholar] [CrossRef]
  27. Fernandez, L.; Castillero, C.; Aguilera, J. An application of image analysis to dehydration of apple discs. J. Food Eng. 2005, 67, 185–193. [Google Scholar] [CrossRef]
  28. Rutkowski, K.P.; Michalczuk, B.; Konopacki, P. Nondestructive determination of ‘golden delicious’ apple quality and harvest maturity. J. Fruit Ornam. Plant Res. 2008, 16, 39–52. [Google Scholar]
  29. Szczypiński, 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]
  30. Szczypiński, P.M.; Strzelecki, M.; Materka, A.; Klepaczko, A. MaZda—A software package for image texture analysis. Computer Methods and Programs in Biomedicine 2009, 94, 66–76. [Google Scholar] [CrossRef]
  31. Strzelecki, M.; Szczypiński, P.; Materka, A.; Klepaczko, A. A software tool for automatic classification and segmentation of 2D/3D medical images. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment 2013, 702, 137–140. [Google Scholar] [CrossRef]
  32. Ropelewska, E. The use of seed texture features for discriminating different cultivars of stored apples. J. Stored Prod. Res. 2020, 88, 101668. [Google Scholar] [CrossRef]
  33. Witten, I.H.; Frank, E. Data mining: Practical machine learning tools and techniques, 2nd ed.; Elsevier: San Francisco, CA, USA, 2005; p. 525. [Google Scholar]
  34. 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]
  35. Frank, E.; Hall, M.A.; Witten, I.H. The WEKA Workbench—Online Appendix for Data Mining: Practical Machine Learning Tools and Techniques, 3rd ed.; Morgan Kaufmann Publishers: Burlington, MA, USA, 2016. [Google Scholar]
  36. 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]
  37. Matysiak, B.; Ropelewska, E.; Wrzodak, A.; Kowalski, A.; Kaniszewski, S. Yield and quality of romaine lettuce at different daily light integral in an indoor controlled environment. Agronomy 2022, 12, 1026. [Google Scholar] [CrossRef]
  38. Sturm, B.; Hofacker, W.C.; Hensel, O. Optimizing the drying parameters for hot-air–dried apples. Dry. Technol. 2012, 30, 1570–1582. [Google Scholar] [CrossRef]
  39. Sampson, D.J.; Chang, Y.K.; Rupasinghe, H.V.; Zaman, Q.U. A dual-view computer-vision system for volume and image texture analysis in multiple apple slices drying. J. Food Eng. 2014, 127, 49–57. [Google Scholar] [CrossRef]
  40. Raponi, F.; Moscetti, R.; Chakravartula, S.S.N.; Fidaleo, M.; Massantini, R. Monitoring the hot-air drying process of organically grown apples (cv. Gala) using computer vision. Biosyst. Eng. 2022, 223, 1–13. [Google Scholar] [CrossRef]
  41. Tharwat, A.; Gaber, T.; Ibrahim, A.; Hassanien, A.E. Linear discriminant analysis: A detailed tutorial. AI Commun. 2017, 30, 169–190. [Google Scholar] [CrossRef]
  42. Landwehr, N.; Hall, M.; Frank, E. Logistic model trees. Machine learning 2005, 59, 161–205. [Google Scholar] [CrossRef]
  43. Rehman, T.U.; Mahmud, M.S.; Chang, Y.K.; Jin, J.; Shin, J. Current and future applications of statistical machine learning algorithms for agricultural machine vision systems. Comput. Electron. Agr. 2019, 156, 585–605. [Google Scholar] [CrossRef]
  44. Osako, Y.; Yamane, H.; Lin, S.Y.; Chen, P.A.; Tao, R. Cultivar discrimination of litchi fruit images using deep learning. Sci. Hortic. 2020, 269, 109360. [Google Scholar] [CrossRef]
Figure 1. The exemplary color images of freeze-dried slices of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apple genotypes.
Figure 1. The exemplary color images of freeze-dried slices of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apple genotypes.
Agriculture 13 00562 g001
Figure 2. The sample color images of freeze-dried cubes of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apple genotypes.
Figure 2. The sample color images of freeze-dried cubes of ‘Alex Red’, ‘Trinity’, ‘314’, and ‘602’ red-fleshed apple genotypes.
Agriculture 13 00562 g002
Table 1. Fruit quality at harvest time in 2022.
Table 1. Fruit quality at harvest time in 2022.
Apple GenotypeDateAverage Fruit Weight (g)Starch Index
(1–10)
IEC
(ppm)
Firmness
(N)
TSS
(%)
TA
(%)
‘Alex Red’31 August 20221066.00.1079.810.471.51
‘Trinity’31 August 20221197.30.1173.510.601.52
‘314’12 September 20221288.01.9555.712.871.30
‘602’12 September 2022896.70.20103.613.271.30
LSD 141.91.5319.820.640.10
Significant differences in main traits were tested by analysis of variance. The significance of differences between means for genotypes was evaluated using the LSD test at p < 0.05. IEC—internal ethylene concentration, TSS—total soluble sugar content, TA—titratable acidity.
Table 2. Classification results for individual classes and overall accuracies for all classes from distinguishing freeze-dried red-fleshed apple slices based on selected texture parameters of images.
Table 2. Classification results for individual classes and overall accuracies for all classes from distinguishing freeze-dried red-fleshed apple slices based on selected texture parameters of images.
AlgorithmPredicted Class Actual ClassOverall Accuracy (%)
‘Alex Red’‘Trinity’‘314’‘602’
LDA
(Functions)
92611‘Alex Red’90.25
79003‘Trinity’
31888‘314’
00991‘602’
IBk
(Lazy)
83845‘Alex Red’85.25
109000‘Trinity’
408412‘314’
111484‘602’
LogitBoost
(Meta)
83773‘Alex Red’85.50
49303‘Trinity’
507817‘314’
14788‘602’
LMT
(Trees)
90640‘Alex Red’89.50
29503‘Trinity’
51877‘314’
32986‘602’
Bayes Net
(Bayes)
83764‘Alex Red’84.75
108631‘Trinity’
408412‘314’
301186‘602’
Table 3. The results of distinguishing freeze-dried red-fleshed apple slices based on features selected from a set of image texture parameters.
Table 3. The results of distinguishing freeze-dried red-fleshed apple slices based on features selected from a set of image texture parameters.
AlgorithmActual ClassTP RateFP RatePrecisionF-MeasureMCCROC AreaPRC Area
LDA
(Functions)
‘Alex Red’0.9200.0330.9020.9110.8810.9870.967
‘Trinity’0.9000.0230.9280.9140.8860.9860.949
‘314’0.8800.0330.8980.8890.8520.9810.957
‘602’0.9100.0400.8830.8970.8620.9870.961
IBk
(Lazy)
‘Alex Red’0.8300.0500.8470.8380.7850.8900.745
‘Trinity’0.9000.0300.9090.9050.8730.9350.843
‘314’0.8400.0600.8240.8320.7750.8900.732
‘602’0.8400.0570.8320.8360.7810.8920.739
LogitBoost
(Meta)
‘Alex Red’0.8300.0330.8920.8600.8170.9620.923
‘Trinity’0.9300.0370.8940.9120.8820.9860.964
‘314’0.7800.0470.8480.8130.7550.9460.886
‘602’0.8800.0770.7930.8340.7770.9640.896
LMT
(Trees)
‘Alex Red’0.9000.0330.9000.9000.8670.9800.961
‘Trinity’0.9500.0300.9130.9310.9080.9790.953
‘314’0.8700.0430.8700.8700.8270.9650.928
‘602’0.8600.0330.8960.8780.8380.9760.899
Bayes Net
(Bayes)
‘Alex Red’0.8300.0570.8300.8300.7730.9530.896
‘Trinity’0.8600.0230.9250.8910.8580.9840.962
‘314’0.8400.0670.8080.8240.7630.9450.896
‘602’0.8600.0570.8350.8470.7960.9700.889
TP rate—true positive rate, FP rate—false positive rate, MCC—Matthews correlation coefficient, ROC Area—receiver operating characteristic area, PRC Area—precision-recall area.
Table 4. The number of correctly and incorrectly classified cases and overall accuracies of distinguishing freeze-dried red-fleshed apple slices based on features selected from a set of image textures and color parameters.
Table 4. The number of correctly and incorrectly classified cases and overall accuracies of distinguishing freeze-dried red-fleshed apple slices based on features selected from a set of image textures and color parameters.
AlgorithmPredicted ClassActual ClassOverall Accuracy (%)
‘Alex Red’‘Trinity’‘314’‘602’
LDA
(Functions)
93511‘Alex Red’91.25
69202‘Trinity’
22897‘314’
00991‘602’
IBk
(Lazy)
81946‘Alex Red’85.75
69400‘Trinity’
407917‘314’
11989‘602’
LogitBoost
(Meta)
91531‘Alex Red’86.00
108811‘Trinity’
828010‘314’
51985‘602’
LMT
(Trees)
90442‘Alex Red’89.75
29422‘Trinity’
41878‘314’
21988‘602’
Bayes Net
(Bayes)
82765‘Alex Red’85.50
88921‘Trinity’
508510‘314’
201286‘602’
Table 5. The performance metrics of the classification of freeze-dried red-fleshed apple slices based on features selected from a set of image textures and color parameters.
Table 5. The performance metrics of the classification of freeze-dried red-fleshed apple slices based on features selected from a set of image textures and color parameters.
AlgorithmActual ClassTP RateFP RatePrecisionF-MeasureMCCROC AreaPRC Area
LDA
(Functions)
‘Alex Red’0.9300.0270.9210.9250.9000.9870.970
‘Trinity’0.9200.0230.9290.9250.9000.9850.956
‘314’0.8900.0330.8990.8940.8600.9820.958
‘602’0.9100.0330.9010.9050.8740.9860.930
IBk
(Lazy)
‘Alex Red’0.8100.0370.8800.8440.7960.8870.761
‘Trinity’0.9400.0330.9040.9220.8950.9530.865
‘314’0.7900.0430.8590.8230.7680.8730.731
‘602’0.8900.0770.7950.8400.7840.9070.735
LogitBoost
(Meta)
‘Alex Red’0.9100.0770.7980.8500.7990.9760.940
‘Trinity’0.8800.0270.9170.8980.8650.9730.942
‘314’0.8000.0430.8600.8290.7760.9640.899
‘602’0.8500.0400.8760.8630.8180.9580.880
LMT
(Trees)
‘Alex Red’0.9000.0270.9180.9090.8790.9750.949
‘Trinity’0.9400.0200.9400.9400.9200.9840.971
‘314’0.8700.0500.8530.8610.8150.9660.925
‘602’0.8800.0400.8800.8800.8400.9820.923
Bayes Net
(Bayes)
‘Alex Red’0.8200.0500.8450.8320.7780.9630.918
‘Trinity’0.8900.0230.9270.9080.8790.9900.973
‘314’0.8500.0670.8100.8290.7710.9520.904
‘602’0.8600.0530.8430.8510.8010.9760.916
TP rate—true positive rate, FP rate—false positive rate, MCC—Matthews correlation coefficient, ROC Area—receiver operating characteristic area, PRC Area—precision-recall area.
Table 6. The number of correctly and incorrectly classified cases and overall accuracies of the classification of freeze-dried red-fleshed apple cubes based on selected image textures.
Table 6. The number of correctly and incorrectly classified cases and overall accuracies of the classification of freeze-dried red-fleshed apple cubes based on selected image textures.
AlgorithmPredicted ClassActual ClassOverall Accuracy (%)
‘Alex Red’‘Trinity’‘314’‘602’
LDA
(Functions)
752023‘Alex Red’74.50
2367100‘Trinity’
2107216‘314’
141184‘602’
IBk
(Lazy)
662284‘Alex Red’68.50
246952‘Trinity’
6126319‘314’
251776‘602’
LogitBoost
(Meta)
761923‘Alex Red’71.00
2463121‘Trinity’
476920‘314’
231976‘602’
LMT
(Trees)
742123‘Alex Red’74.75
236971‘Trinity’
397216‘314’
421084‘602’
Bayes Net
(Bayes)
751726‘Alex Red’71.00
2166112‘Trinity’
2156023‘314’
211483‘602’
Table 7. The performance metrics of distinguishing freeze-dried red-fleshed apple cubes based on selected image textures.
Table 7. The performance metrics of distinguishing freeze-dried red-fleshed apple cubes based on selected image textures.
AlgorithmActual ClassTP RateFP RatePrecisionF-MeasureMCCROC AreaPRC Area
LDA
(Functions)
‘Alex Red’0.7500.0870.7430.7460.6610.9240.731
‘Trinity’0.6700.1130.6630.6670.5550.8850.693
‘314’0.7200.0770.7580.7380.6550.9410.822
‘602’0.8400.0630.8160.8280.7690.9690.927
IBk
(Lazy)
‘Alex Red’0.6600.1070.6730.6670.5570.7770.529
‘Trinity’0.6900.1300.6390.6630.5460.7800.518
‘314’0.6300.1000.6770.6530.5430.7650.519
‘602’0.7600.0830.7520.7560.6740.8380.632
LogitBoost
(Meta)
‘Alex Red’0.7600.1000.7170.7380.6480.9120.767
‘Trinity’0.6300.0970.6850.6560.5490.8880.739
‘314’0.6900.1100.6760.6830.5760.8880.764
‘602’0.7600.0800.7600.7600.6800.9390.816
LMT
(Trees)
‘Alex Red’0.7400.1000.7120.7250.6320.9270.781
‘Trinity’0.6900.1070.6830.6870.5810.9040.717
‘314’0.7200.0630.7910.7540.6780.9220.828
‘602’0.8400.0670.8080.8240.7630.9620.912
Bayes Net
(Bayes)
‘Alex Red’0.7500.0830.7500.7500.6670.9260.777
‘Trinity’0.6600.1100.6670.6630.5520.8830.706
‘314’0.6000.0900.6900.6420.5350.8560.716
‘602’0.8300.1030.7280.7760.6970.9370.831
TP rate—true positive rate, FP rate—false positive rate, MCC—Matthews correlation coefficient, ROC Area—receiver operating characteristic area, PRC Area—precision-recall area.
Table 8. The number of correctly and incorrectly classified cases and overall accuracies from distinguishing freeze-dried red-fleshed apple cubes based on selected image textures and color parameters.
Table 8. The number of correctly and incorrectly classified cases and overall accuracies from distinguishing freeze-dried red-fleshed apple cubes based on selected image textures and color parameters.
AlgorithmPredicted ClassActual ClassOverall Accuracy (%)
‘Alex Red’‘Trinity’‘314’‘602’
LDA
(Functions)
752302‘Alex Red’77.25
237070‘Trinity’
387613‘314’
111088‘602’
IBk
(Lazy)
721972‘Alex Red’71.75
256870‘Trinity’
796915‘314’
221878‘602’
LogitBoost
(Meta)
811333‘Alex Red’80.50
118333‘Trinity’
557614‘314’
501382‘602’
LMT
(Trees)
761860‘Alex Red’78.25
217450‘Trinity’
357814‘314’
211285‘602’
Bayes Net
(Bayes)
851023‘Alex Red’80.25
138151‘Trinity’
3106918‘314’
021286‘602’
Table 9. The performance metrics of the classification of freeze-dried red-fleshed apple cubes based on selected image textures and color parameters.
Table 9. The performance metrics of the classification of freeze-dried red-fleshed apple cubes based on selected image textures and color parameters.
AlgorithmActual ClassTP RateFP RatePrecisionF-MeasureMCCROC AreaPRC Area
LDA
(Functions)
‘Alex Red’0.7500.0900.7350.7430.6560.9310.746
‘Trinity’0.7000.1070.6860.6930.5890.9020.733
‘314’0.7600.0570.8170.7880.7210.9510.862
‘602’0.8800.0500.8540.8670.8220.9790.947
IBk
(Lazy)
‘Alex Red’0.7200.1130.6790.6990.5950.8030.559
‘Trinity’0.6800.1000.6940.6870.5840.7900.552
‘314’0.6900.1070.6830.6870.5810.7920.549
‘602’0.7800.0570.8210.8000.7360.8620.695
LogitBoost
(Meta)
‘Alex Red’0.8100.0700.7940.8020.7350.9550.881
‘Trinity’0.8300.0600.8220.8260.7670.9560.896
‘314’0.7600.0630.8000.7790.7090.9340.847
‘602’0.8200.0670.8040.8120.7480.9580.886
LMT
(Trees)
‘Alex Red’0.7600.0870.7450.7520.6690.9380.808
‘Trinity’0.7400.0800.7550.7470.6640.9190.777
‘314’0.7800.0770.7720.7760.7010.9220.837
‘602’0.8500.0470.8590.8540.8060.9730.921
Bayes Net
(Bayes)
‘Alex Red’0.8500.0530.8420.8460.7940.9640.865
‘Trinity’0.8100.0730.7860.7980.7300.9440.883
‘314’0.6900.0630.7840.7340.6550.9360.839
‘602’0.8600.0730.7960.8270.7670.9640.913
TP Rate—true positive rate, FP Rate—false positive rate, MCC—Matthews correlation coefficient, ROC Area—receiver operating characteristic area, PRC Area—precision-recall area.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ropelewska, E.; Kruczyńska, D.E.; Rady, A.M.; Rutkowski, K.P.; Konopacka, D.; Celejewska, K.; Mieszczakowska-Frąc, M. Evaluating the Classification of Freeze-Dried Slices and Cubes of Red-Fleshed Apple Genotypes Using Image Textures, Color Parameters, and Machine Learning. Agriculture 2023, 13, 562. https://doi.org/10.3390/agriculture13030562

AMA Style

Ropelewska E, Kruczyńska DE, Rady AM, Rutkowski KP, Konopacka D, Celejewska K, Mieszczakowska-Frąc M. Evaluating the Classification of Freeze-Dried Slices and Cubes of Red-Fleshed Apple Genotypes Using Image Textures, Color Parameters, and Machine Learning. Agriculture. 2023; 13(3):562. https://doi.org/10.3390/agriculture13030562

Chicago/Turabian Style

Ropelewska, Ewa, Dorota E. Kruczyńska, Ahmed M. Rady, Krzysztof P. Rutkowski, Dorota Konopacka, Karolina Celejewska, and Monika Mieszczakowska-Frąc. 2023. "Evaluating the Classification of Freeze-Dried Slices and Cubes of Red-Fleshed Apple Genotypes Using Image Textures, Color Parameters, and Machine Learning" Agriculture 13, no. 3: 562. https://doi.org/10.3390/agriculture13030562

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