1. Introduction
Plants commonly known as mint belong to the genus
Mentha (Lamiaceae) and are of great economic importance [
1]. Mint leaves can be considered an aromatic and medicinal plant material. Mint can alleviate flu, cold, fever, food poisoning, poor digestion, flatulence, motion sickness, rheumatism, hiccups, sinus and throat ailments, and earaches [
2]. Consuming mint is highly desirable for its health benefits. However, this herb can only be grown for a certain period of the year. To store mint for a long time, it should be dehydrated [
3]. Drying reduces the water content of the plants, inhibits microorganism development and biochemical reactions, and thus allows for preventing degradation, preserving and extending the shelf life of materials. Despite its disadvantages related to, among others, the evaporation of volatile compounds, open-air sun drying is common, mainly in places with plenty of solar radiation [
4].
During open-air sun drying, plants are in an open environment directly exposed to solar radiation. This open exposure also results in direct exposure to contamination with insects, dust, or sand particles [
5]. Furthermore, it causes discoloration and loss of aroma, which is important for consumers because it can reduce dehydrated-mint quality and quantity. Thermal processing results in numerous reactions affecting the hue. The Maillard reaction, degradation of chlorophyll pigment, and oxidation of ascorbic acid take place. Open-air sun drying causes browning. Furthermore, it destroys the vitamin C content, which is heat- and light-sensitive [
3].
Another herb drying method that employs solar energy as a heating source is shade drying. This drying approach protects photosensitive compounds while reducing light-induced chemical reactions such as oxidation [
6]. However, the drying time of shade drying is longer than that of sun drying [
7]. Additionally, shade drying is a better method for drying herbs since it maintains the integrity of the trichomes [
8]. Shade drying also causes less damage to the epidermal surface than sun drying [
9]. Nonetheless, due to its low investment cost and high-quality dried products, shade drying, like sun drying, is still popular in rural areas and small enterprises [
10].
The leaf classification can be performed based on color, shape, and texture parameters using computer vision [
11]. Image processing can be used to detect leaves and extract leaf parameters useful for leaf classification using machine learning algorithms [
12]. Machine learning techniques for developing Artificial Intelligence allow computers or machines to learn from experience without explicit programming. The objective of machine learning algorithms is to improve the performance of models using data [
13]. Thanks to computer vision-based methods for classifying leaves, various and powerful features can be extracted from leaf images. The leaf features are easy to extract and analyze and can be used for the identification of plants. Manual identification can be vulnerable to human error. Therefore, automated system identification systems are desirable. In the case of mint leaf classification, features from the digital images of the front and back sides of leaves can be taken into account [
14]. Intelligent computer models can be very effective in identifying herbs and their properties [
15].
In the available literature, there is a lack of information on the presence of classification models based on textures of mint leaf images in the individual color channels R, G, B, L, a, b, X, Y, and Z, computed using image analysis techniques to monitor the effect of natural drying techniques on the changes in the structure of mint leaves. The novelty of the study is to reveal that the changes that occur after leaf drying can be distinguished with computer vision and machine learning applications. This study was aimed at comparing the effect of shade drying and open-air sun drying on the ventral side (upper surface) and dorsal side (lower surface) of mint leaves using image processing and machine learning. The reason for undertaking the research was a need for a more complete understanding of the changes occurring in the image textures of mint leaves caused by different drying techniques to acquire new knowledge and develop the procedure for the detection of these changes.
The contribution of the article is far superior to the current state of the art. The innovative nature of this study is related to the acquisition of new information, not found in the literature, on 1629 texture parameters of fresh and dried mint leaves and the selection of attributes with the highest discriminative power. The article presents a new approach to assessing changes in mint leaves caused by natural drying techniques. The leaf classification performed using models based on selected texture parameters extracted from the digital color images converted to color channels
R,
G,
B,
L,
a,
b,
X,
Y, and
Z built using machine learning algorithms from groups of Lazy, Rules, and Trees is a unique approach to distinguish dried and fresh mint leaves. For the first time, the assessment of the influence of natural drying techniques on the structure of mint leaves was carried out using attributes selected from sets of 1629 image textures from different color channels. Furthermore, monitoring the degree of changes in the structure of leaves under the influence of drying without the need to damage or destroy the leaves can be a problem. The proposed approach may be a non-destructive, objective, cost-effective, and fast practical solution to this problem. Justification for tackling the problem results from insufficient data in the literature on an experimental and theoretical description of the changes in texture parameters of mint leaf images as a result of the drying. The problem addressed in this study is to reveal, with technological solutions, the textural changes caused by the drying techniques used to preserve the mint leaf for a long time. The proposed solution is to combine the power of computer vision and machine learning, as used in many different agricultural applications today [
16,
17]. In this way, discrimination systems with non-destructive, non-biased, high-accuracy, and autonomous capabilities can be developed. The proposed solution also does not depend on a single machine learning algorithm or a single color space of images. The robustness of the proposed approach was proven with different machine learning methods and image textures from different color spaces determined experimentally.
3. Results
The results of the classification of fresh mint leaves and leaves dried using two natural drying techniques were obtained. The effect of shade drying and open-air sun drying on the ventral and dorsal leaf sides was assessed. The distinguishing of samples was carried out using models including textures selected separately for each color channel from color spaces RGB, Lab, and XYZ. Models were developed using different machine learning algorithms. It was found that KStar from the group of Lazy, JRip from the group of Rules, and J48 from the group of Trees were the most effective. These algorithms provided the highest average accuracies of the classification of up to 100% for the selected datasets, which meant distinguishing the samples entirely correctly. Therefore, the results obtained by the KStar, JRip and J48 algorithms were chosen to be presented in this paper.
3.1. The Effect of Shade Drying and Open-Air Sun Drying on the Ventral Side (Upper Surface) of Mint Leaves
In the case of the ventral side (upper surface) of mint leaves, the classifications were carried out to compare the structure of fresh vs. shade-dried leaves and fresh vs. open-air sun-dried leaves. The models were built separately for color channels R, G, and B from color space RGB, color channels L, a, and b from color space Lab, and color channels X, Y, and Z from color space XYZ.
3.1.1. Classification of the Images of the Ventral Side of Fresh and Shade-dried Mint Leaves
For models built based on selected textures of images in color channels
R,
G, and
B from color space RGB, fresh and shade-dried mint leaves were classified with an average accuracy reaching 100% only in the case of color channel
B and KStar and J48 machine learning algorithms (
Table 1). This meant that both fresh and shade-dried leaves were completely correctly classified. Also, the results of Precision, Recall, F-Measure, and MCC (Matthews Correlation Coefficient) equal to 1.000 were the most satisfactory. In the case of color channel
G, all presented algorithms (KStar, JRip, J48) provided an average accuracy of 97.5%. However, models built using KStar and JRip classified fresh leaves with an accuracy of 95% and shade-dried leaves with an accuracy of 100%. In contrast, the model developed using J48 was characterized by an accuracy of 100% for fresh leaves and 95% for shade-dried leaves. The lowest accuracies of distinguishing fresh and shade-dried mint leaves were determined for models built based on textures selected from images in color channel
R. For the KStar and J48 algorithms, average accuracy reached 92.5%. The model built using JRip provided the lowest average accuracy, at 90%, and values of Precision, Recall, and F-Measure of 0.900 and MCC of 0.800 for both fresh and shade-dried classes.
In the case of individual color channels from the color space Lab (
Table 2), an average accuracy of 100% and values of Precision, Recall, F-Measure, and MCC of 1.000 were obtained for color channels
a (KStar and J48) and
b (KStar). Selected textures belonging to these channels allowed for building models that completely and correctly distinguished fresh and shade-dried mint leaves. For color channel
L, the correctness of the classification of both samples was also high, up to 97.5% for KStar and J48. The model developed using the KStar algorithm correctly classified shade-dried leaves in 100% of cases and of fresh leaves in 95%, while the remaining 5% of cases belonging to the actual class of fresh leaves were incorrectly classified as shade-dried ones. The application of J48 resulted in 100% correctness of the classification of fresh leaves and 95% for shade-dried samples.
Fresh and shade-dried mint leaves imaged on the ventral side were also classified with a correctness reaching 100% and other classification performance metrics equal to 1.000 for one color channel (
Y) from color space XYZ using the KStar algorithm (
Table 3). Models built based on selected textures from images in color channels
X and
Z produced an average accuracy of up to 97.5%. In the case of color channel
X, the model built using JRip revealed accuracies of 100% and 95% for fresh and shade-dried mint leaves, respectively. For J48, shade-dried leaves were correctly distinguished from fresh ones with an accuracy of 100%, fresh samples were correctly classified as fresh in 95% of cases, and the remaining 5% of cases were classified as shade-dried leaves. For the color channel
Z, fresh leaves were correctly classified in 100% of cases and shade-dried samples in 95% of cases, for KStar and JRip.
3.1.2. Classification of the Images of the Ventral Side of Fresh and Open-Air Sun-dried Mint Leaves
In the next step of classification analysis, images of the ventral side of fresh and open-air sun-dried mint leaves were compared using models based on selected textures from individual color channels.
Table 4 presents the results of distinguishing samples using selected textures extracted from images in color channels
R,
G, and
B. The obtained results were very successful. An average accuracy of 100% and values of Precision, Recall, F-Measure, and MCC of 1.000 were found in the case of each color channel as channels
R and
G for J48, and channel
B for all KStar, JRip, and J48 algorithms. It proved the high differentiation of fresh and open-air sun-dried mint leaves in terms of selected textures belonging to color space RGB and thus the great influence of open-air sun drying on the structure of the outer surface of the mint leaves.
Very high correctness of classification of fresh and open-air sun-dried mint leaves was also obtained for color channels
L,
a, and
b from the color space Lab (
Table 5). A completely correct classification with an average accuracy of 100% was observed in the case of models built based on selected texture parameters from images in color channels
a and
b for all algorithms (KStar, JRip, and J48). A slightly lower average accuracy reaching 97.5% was determined for a model built using selected textures from color channels
L and the J48 algorithm.
The models built using selected textures from color channels belonging to color space XYZ of images of the ventral side of leaves produced the lowest results for distinguishing fresh and open-air sun-dried mint classes (
Table 6). Samples were completely correctly classified only in the case of models developed using the KStar algorithm for selected textures from color channels
X and
Y. For other machine learning algorithms of JRip and J48, an average accuracy of 95% was obtained for color channel
X and 97.5% for color channel
Y. An average accuracy of the classification of fresh and open-air sun-dried mint leaves reached 97.5% for a model including selected textures from color channel
Z developed using J48.
3.2. The Effect of Shade Drying and Open-Air Sun Drying on the Dorsal Side (Lower Surface) of Mint Leaves
To assess the effect of different natural drying techniques on the structure of the dorsal side of mint leaves, various classification models were developed. In the case of both the classification of fresh vs. shade-dried mint leaves and fresh vs. open-air sun-dried leaves, models included image textures selected separately for individual color channels R, G, B, L, a, b, X, Y, and Z.
3.2.1. Classification of the Images of the Dorsal Side of Fresh and Shade-dried Mint Leaves
In the case of color channels
R,
G, and
B from color space RGB, the images of the dorsal side of shade-dried mint leaves were distinguished from the fresh ones with an average accuracy of 75% for a model built based on selected textures from color channel
G using the KStar algorithm to 100% in the case of color channel
B and KStar (
Table 7). For the model producing 75% correctness, fresh leaves were classified with an accuracy of 70% and shade-dried samples with an accuracy of 80%. The values of Precision, Recall, and F-Measure were in the range of 0.700–0.800, and MCC was equal to 0.503 for both classes. These results are relatively low compared with the 100% accuracy and values of other metrics of 1.000 for one model including selected texture parameters extracted from images in color channel
B. For color channel
G, average accuracy reached 82.5% (75% for fresh leaves and 90% for shade-dried leaves) for the J48 algorithm. For models built for selected textures from images in color channel
R, average accuracy ranged from 77.5% (KStar) to 90% (JRip).
The higher accuracies of the classification of images of the dorsal side of fresh and shade-dried mint leaves were obtained for the models built based on textures selected separately for individual color channels of Lab space (
Table 8). It indicated that the differences in the image textures were more noticeable. All applied machine learning algorithms provided 100% accuracy for textures from images in color channel
a. Slightly lower average accuracies reaching 97.5% (KStar, J48) and 95% (J48) were found in the case of the color channels
b and
L, respectively.
In the case of models including selected image textures from color channels
X,
Y, and
Z, a completely correct classification was not observed (
Table 9). The differentiation of the structure of the dorsal side of fresh and shade-dried mint leaves allowed for distinguishing both samples at an average accuracy of up to 97.5% (100% for fresh and 95% for dried leaves) for color channel
X and J48 as well as color channel
Z and KStar and J48. An average accuracy of 95% was determined for models developed based on selected textures of images in color channel
Y using all algorithms.
3.2.2. Classification of the Images of the Dorsal Side of Fresh and Open-Air Sun-dried Mint Leaves
Very successful classifications were performed for the fresh and open-air sun-dried mint leaves using models built based on selected textures of the dorsal leaf side images converted to color channels
R,
G, and
B (
Table 10). Average accuracy reached 97.5% for models developed using the KStar, JRip, and J48 algorithms based on features of images in color channel
B. All the other models produced an average accuracy of 92.5% in the case of color channels
R and
G.
In the case of the color space Lab, images of the dorsal side of fresh and open-air sun-dried mint leaves turned out to be completely different in terms of selected textures from color channels
a (KStar, JRip, J48) and
b (J48) (
Table 11). The accuracies were equal to 100% and the values of Precision, Recall, F-Measure, and MCC were 1.000 for both classes. In the case of the color channel
L, the correctness of classification was slightly lower, reaching 97.5% for the model built using the JRip machine learning algorithm.
The classification of fresh and open-air sun-dried mint leaves based on image textures of the dorsal leaf side revealed 100% correctness in the case of color channel
Z and the J48 algorithm (
Table 12). For channel
Z, other algorithms (KStar, JRip) also produced a high average accuracy of 97.5%. Furthermore, an average accuracy of 97.5% was found for models built using KStar and J48 based on selected textures of images in color channel
Y. In the case of individual color channels from color space XYZ, the lowest correctness of distinguishing fresh and open-air sun-dried mint leaves based on image textures of the dorsal leaf side was determined for color channel
X. Average accuracy reached 95% for a model developed using J48.
Texture features from images in color channels
R,
G,
B,
L,
a,
b,
X,
Y, and
Z and artificial intelligence involving models built by traditional machine learning algorithms proved to be useful for distinguishing fresh and shade drying or open-air sun-dried mint leaves. Machine learning-based algorithms are considered an innovative approach to advancing food drying technology. Machine learning algorithms have a superior capacity to predict specific trends and patterns using large volumes of data. Machine learning-based strategies are used, among others, for drying modeling to determine the optimal drying condition to improve product quality and reduce energy consumption. Machine learning models can also be used for modeling to predict food properties during drying [
31]. Machine learning found application for the monitoring of different drying processes employed in industry, for example, of convective drying, osmotic-convective drying, microwave drying, infrared drying, microwave- and infrared-assisted drying, fluidized bed drying, spouted bed drying, spray drying, rotary drying, deep bed drying, renewable drying, and freeze drying [
13,
32]. In the case of mint, machine learning was also used to investigate drying behavior and assess drying kinetics [
33]. Additionally, machine learning algorithms were successfully applied to discriminate between different mint samples [
34]. Our research has set new directions for the application of machine learning in the drying and discrimination of mint. The research carried out with the use of traditional machine learning models may be expanded in the future to include deep learning to distinguish fresh and dried mint leaves.
4. Conclusions
This study aimed to analyze the changes caused by two different drying methods on mint leaves. Because these changes cause significant changes in the nutrient content of the leaf, it is important to provide drying with the least loss and to develop additional techniques to do so. In order to clearly observe the effect of drying, the detectability of these changes with computer vision and machine learning algorithms is adopted as a hypothesis. The most obvious changes as a result of drying occur in leaf textures, and therefore texture analysis is performed for computer vision. In experimental studies, different image spaces and different machine learning techniques are used to prove that the proposed method is scientifically sound.
The combination of digital color imaging and machine learning proved to be an effective approach to the evaluation of the effect of natural drying techniques on mint leaf structure. Models built based on selected textures of images in color channels R, G, B, L, a, b, X, Y, and Z were useful for monitoring the changes in the ventral side (upper surface) and dorsal side (lower surface) of mint leaves caused by shade drying and open-air sun drying. Fresh and dried leaves were distinguished with an accuracy of up to 100% using selected machine learning algorithms from groups of Lazy, Rules, and Trees. The obtained results were promising, and the developed procedure involving image features and machine learning could be used to evaluate the quality of mint leaves dried by other techniques. When the accuracy rates obtained as a result of experimental studies are examined, it is seen that the discrimination accuracy in all steps is generally above 90%. Compliance and consistency of all results indicate the accuracy and robustness of the results. Besides traditional machine learning, deep learning as well could be applied in further studies for the classification of fresh and dried leaves. For the deep learning application, data with more samples will be created in the future, and experiments will be carried out with different deep learning models on this data. Different drying techniques will also be included in the dataset.