Introduction

Beetroot (Beta vulgaris L.) is a vegetable belonging to the Amaranthaceae family [1]. This herbaceous plant is a root vegetable. Beta vulgaris includes three subspecies, such as subsp. vulgaris, subsp. maritima and subsp. adanensis. Beta vulgaris is known as red beet, garden beet, sugar beet, golden beet, table beet, beet [2]. Beetroot is considered an edible taproot of Beta vulgaris [3]. The edible root may have a cylindrical or globe, stout and tapered shape with side roots [4]. Beetroot is a horticultural product [5]. Beetroot is cultivated worldwide, mainly in Europe, Asia, North America, and North Africa in temperate areas. The red beetroot is a vegetable used, among others, as the soup ingredient, red food colorants for sauces, tomato paste, desserts, ice cream, jellies, jams, cereals, sweets, dried chips, powder in bakery, beetroot tea, food supplements. Beetroot may be considered as a functional food with health-promoting properties. It has polyphenols, flavonoids, betalains, carotenoids and saponins [6]. Beetroot includes very effective antioxidants. The antioxidant activity is revealed mainly by the presence of polyphenols and betalains which belong to bioactive compounds. Beetroot has also anti-cancer, anti-inflammatory, hepatoprotective, proapoptotic and immunosuppressive activity [7]. Furthermore, this vegetable is also a reach source of vitamins (B-complex, ascorbic acid, retinol) and minerals (sodium, potassium, iron, magnesium, phosphorus, copper, zinc, calcium) [8]. Beetroot as a source of iron, treats and prevents anemia, folate in beetroot may protect against congenital disabilities, and dietary fibers may have a beneficial effect on the colon [1]. Thus, it is very a nutritionally and economically popular vegetable [9].

Fresh beetroots have high moisture content. Thereby, they are susceptible to spoilage [10]. Processing allows the preservation and the use of beetroots in the off-season. Drying involving the removal of water and thus preventing microbial spoilage and deterioration is very popular. The drying may result in changes in the color, structure, shape and content of nutritional components. In the case of dried beetroot, consumers especially pay attention to the flavor and color [6]. Gokhale and Lele [11] reported that the final color of beetroot during convective hot air drying at a temperature of 50–120 °C was temperature-dependent and the lowest temperature allowed for the maximum retention of color. Whereas, according to Figiel [10], freeze-drying affecting the reduction in moisture content of beetroot results in a significant change of color. Freeze-drying ensures water removal from frozen material by sublimation of ice crystals. Due to the parameters of the process, the dried products may be of the best quality (very good chemical and physical properties) compared to ones dried by traditional methods [12]. However, Tomic et al. [13] reported that freeze-dried beetroot unfavorably affected the appearance attributes and beetroot flavor of samples. Another way to treat beetroot before consumption is fermentation, which also caused the softening of the product [14]. It can also result in changes in beetroot structure and sensory quality.

Color is a crucial parameter in the perception of product quality and determines the acceptance of food by consumers. This property may be changed during processing. The sensory analysis allows for a simple evaluation of color. However, it is subjective. Computer image analysis allows evaluating the sample on a pixel-based level. Therefore, it is very useful for the comparison of food products [15]. In image processing, the function of spatial variation of the intensity of pixel brightness is called texture. Textures provided numerical data about the structure of the object and information even on changes of its quality, which are visually imperceptible. Even if the products have the same color histograms and the number of pixels, but different distribution of color, they may be different in terms of textures [16, 17]. For this reason, studies have been developed for the discrimination of different food products, such as apple [18], cherry [19], potato [20], wheat [21] based on properties, such as color, texture, shape. However, to our knowledge, studies such as classification based on texture parameters selected from individual channels of images for raw and processed (dried, fermented) beetroots are insufficient.

The choice of type of fermentation used in this experiment was caused by the results of the previous experiments regarding the fermentation of cucumber. The results of the sensory evaluation of cucumbers fermented with two types of fermentation: spontaneous and with probiotic starter cultures revealed a higher flavor and aroma quality of spontaneously fermented cucumber (results not published). Spontaneous fermentation of plant material, such as cucumbers, cabbage and beetroots, is a very common method, used mainly by small entrepreneurs and in individual households. Specific strains of starter bacteria are used on an industrial scale. In the available literature, there are few reports on the sensory quality of fermented vegetables using two types of fermentation: spontaneous and with probiotic starter cultures. Walkowiak-Tomczak and Zielińska [22] investigated the quality of beetroot leaven and its suitability for the preparation of borscht depending on the type of fermentation: traditionally produced leaven with a slice of rye bread, leaven with the addition of Lactobacillus plantarum starter culture and natural leaven (without additives). Czyżowska et al. [23] determined the changes in the content of bioactive compounds (polyphenols) of fermented beetroot after the long-term storage using the samples obtained from the entrepreneur who used spontaneous fermentation to obtain the fermented beetroot.

This study was aimed at evaluating the effect of freeze-drying and spontaneous lacto-fermentation on the texture parameters of images and sensory attributes of beetroots. The processing of beetroot included freeze-drying, lacto-fermentation and the combination of freeze-drying and lacto-fermentation. The evaluation of samples was performed using the images acquired using a flatbed scanner. The distinguishing of beetroot samples with the discriminative classifiers was carried out. Additionally, this study was performed to compare the parameters related to smell, color, texture and taste of processed beetroots. The novelty and contributions of this study were related to the development of discriminative models to distinguish the raw and processed beetroots, the indication of the most appropriate color channels for beetroots classification and the determination of the differences in sensory quality of beetroots subjected to different processing.

Materials and methods

Materials

The materials comprised the raw and processed samples of beetroot ‘Cylindra’. The beetroots of this cultivar are characterized by the elongated and cylindrical shape. The raw beetroots were obtained directly from the manufacturer located near Skierniewice (Poland). The samples used in the experiments were prepared by peeling and cutting the beetroots into slices with 5 mm thickness and then by cutting each slice into quarters. The exemplary quarters of beetroot slices are presented in Fig. 1. The samples that were tested in raw form and samples intended to be processing before examination were prepared in the same way. The lacto-fermentation of quarters of slices of beetroots was performed in glass jars with the addition of the horseradish, garlic, dill, tap water and the table salt ensuring the final concentration of sodium chloride of 3.5% in brine. First, the process was carried out at a temperature of 20 °C for 3 days, then at 12–15 °C for the 10 days, and in the final step at a temperature of 5 °C. In the case of the freeze-drying, the raw and lacto-fermented samples previously frozen at a temperature of − 29 °C using a freezer (Whirlpool) were freeze-dried for 24 h without heating, then 24 h at a temperature of 0 °C, as well as 5 h at a temperature of 30 °C at the final pressure of 0.030 mBar with the use of a freeze dryer (LABCONCO, Kansas City, MO, USA).

Fig. 1
figure 1

The exemplary original images and images from selected color channels of raw and processed beetroot samples

Image processing

The beetroot samples were scanned against a black background with the use of the Epson Perfection flatbed scanner. Based on the results of previous research [20, 24, 25], a flatbed scanner was selected as an imaging device. The above-mentioned literature reported the advantages of image acquisition using a flatbed scanner as relatively low cost, wide accessibility, ease of use. The use of a scanner allows obtaining the digital images with high resolution. The selected textures calculated from these images enable the development of accurate discriminative models. In the present study, the use of the scanner provided the same stable parameters of image acquisition for all samples. In the first step, the flatbed scanner was calibrated against a reflective target. The scanner included LED (Light Emitting Diodes) as a light source. As a result, the samples did not overheat during imaging. In the case of each raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroot sample, one hundred quarters of slices were examined. Raw and lacto-fermented beetroots were drained before imaging to remove excess juice from the surface. The resolution of the obtained images was 800 dpi. The images were uploaded to a computer using a USB cable. The computer contained the Intel(R) Core(TM) i7-8550U processor, 16 GB Installed RAM, 64-bit operating system, Windows 10 Home. The obtained scans saved in TIFF format (image size 6800 × 9359 pixels, file size 180 MB, 24-bit color depth) were converted to BMP (image size 5191 × 7145 pixels, 24-bit color depth) and were processed using the Mazda software (Łódź University of Technology, Institute of Electronics, Poland) [26]. The BMP format is necessary for image processing using the MaZda software. After loading into the MaZda, the image was in brightness = (299*Red + 587*Green + 114*Blue)/1000. The original color images in brightness were converted to color individual channels L, a, b, R, G, B, X, Y, Z. The exemplary original images of raw and processed beetroot samples and images from selected color channels are presented in Fig. 1. First, the region of interest (ROI) as a set of pixels was determined for each quarter of the slice. This step allowed the calculation of the texture parameters from the outer surface of the image. Each whole quarter of the beetroot slice was considered as an individual ROI. Due to the application of black background for scanning, the separation of ROI was facilitated. The acquired images included a lighter quarter of the beetroot slice on a black background. Therefore, a set of lighter pixels belonging to the beetroot sample could be separated by segmentation into brightness regions using the determined manually brightness threshold. This step of image processing was repeatable and was performed in the same way for each sample. In the case of each quarter of beetroot slice, approximately 200 textures based on the gradient map, autoregressive model, histogram, co-occurrence matrix and run-length matrix were calculated [26].

Sensory analysis

The sensory quality of processed beetroots was evaluated by ten assessors. The previously trained panel performed the quantitative description analysis of samples in a specialized laboratory. The attributes related to (1) smell: beetroot smell, sweet smell, off-odor, (2) color: beetroot color, attractiveness color, (3) texture: hardness, crunchiness, (4) taste: beetroot taste, sweet taste, bitter taste, off-flavor taste, as well as (5) overall quality were determined using sensory profiling. The results included an intensity of each attribute using a scale of 0 (low intensity) to 10 (high intensity). The freeze-dried, lacto-fermented and freeze-dried lacto-fermented samples were included in the experiment. Raw beetroots were of unacceptable quality to consumers in terms of sensory properties. Therefore, the sensory analysis for raw samples was not carried out. The sensory analysis was performed in two sessions and the mean for each attribute was calculated.

Statistical analysis

The WEKA software (University of Waikato) [27] was applied for the discrimination of raw and processed beetroots. The beetroot samples were discriminated using four classes including “raw”, “freeze-dried”, “lacto-fermented”, “freeze-dried lacto-fermented”. The discriminative models were developed based on selected textures from individual color channels. The texture parameters were selected with the use of the Best First with the CFS subset evaluator. For each channel L, a, b, R, G, B, X, Y, Z, the texture selection was carried out and a separate model was built. The examples of selected texture parameters are included in Table 1. The discriminant analysis was performed using the Multilayer Perceptron classifier from Functions and ten-fold cross-validation mode [28]. Also, other classifiers from the groups of Functions, Decision Trees, Rules, Meta and Bayes were tested. However, the Multilayer Perceptron provided the highest discrimination accuracies and the results obtained for this classifier are included in the paper. The criterion for the evaluation of the results of discrimination for models built separately for each color channel L, a, b, R, G, B, X, Y, Z based on selected textures was the highest accuracy of discrimination of beetroot subjected to different processing including freeze-drying, lacto-fermentation and the combination of freeze-drying and lacto-fermentation. The average accuracy of 100% meant that all cases belonging to the actual classes: raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented were correctly included in the predicted classes: raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented and the accuracy for each class was also 100%. When the accuracy for the individual class was below 100%, it meant that not all cases were correctly classified and some cases belonging to the actual class were incorrectly included in other predicted classes.

Table 1 The examples of texture parameters selected from color channels R, L, X

The comparison of means was performed for the sensory attributes of freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroots. The differences in beetroot smell, sweet smell, off-odor, beetroot color, attractiveness color, hardness, crunchiness, beetroot taste, sweet taste, bitter taste, off-flavor taste, and overall quality were analyzed using STATISTICA (StatSoft Inc., Tulsa, USA) application at a significance level of p ≤ 0.05. The assumptions were checked and the Newman–Keuls parametric test was applied.

Results and discussion

The discrimination of raw and processed beetroots was performed for nine individual color channels R, G, B, L, a, b, X, Y, Z of images. The discriminative models were built for each color channel based on sets of selected textures. Four classes including raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroots were considered. The confusion matrices with the actual classes and predicted classes were determined. For predicted classes, the predicted cases were expressed as percentages (%). The results for three color channels R, G, B from color space RGB were presented in Table 2. In the case of models built for textures selected from color channel R, the accuracy was the highest and was equal to 95.25%. The lacto-fermented beetroots were completely different from the other samples and were discriminated with the accuracy of 100%. It means that all cases belonging to the actual class “lacto-fermented” were correctly included in the predicted class “lacto-fermented”. The lacto-fermentation of beetroots resulted in the highest changes in textures of the outer surface of beetroots images compared with raw beetroots. The raw samples were correctly classified in 96%. The other 4% of cases were classified as freeze-dried (2%) and freeze-dried lacto-fermented beetroots (2%). The highest mixing of beetroot cases occurred between classes “freeze-dried” and “freeze-dried lacto-fermented”. In the case of freeze-dried beetroots, the accuracy of discrimination was equal to 93% and as many as 6% of cases were incorrectly classified as freeze-dried lacto-fermented beetroots. Whereas freeze-dried lacto-fermented samples correctly classified in 92% and 6% of cases were incorrectly included in the class “freeze-dried”. The slightly lower accuracies were obtained in the case of color channels G and B, 92.5% and 94.75%, respectively. For the models based on textures selected from color channel G, the raw and lacto-fermented beetroots were classified with the highest accuracy of 97%. Both freeze-dried and freeze-dried lacto-fermented samples were classified with an accuracy of 88%, and mixing case between these classes was the highest. 12% of cases belonging to class “freeze-dried” were incorrectly included in class “freeze-dried lacto-fermented” and 11% of cases belonging to class “freeze-dried lacto-fermented” were incorrectly classified as “freeze-dried”. These results indicated that freeze-drying and freeze-drying of previously lacto-fermented beetroots caused the most similar changes in the appearance of samples that manifested in the most similar textures of the images. In the case of images from color channel B, the raw and lacto-fermented samples were completely distinguished (100% accuracy) from other classes. Whereas the freeze-dried beetroots were classified with the correctness of 89% and 10% of cases were included in the class “freeze-dried lacto-fermented”, and the freeze-dried lacto-fermented samples were correctly discriminated in 90% and 10% of cases were classified as “freeze-dried”.

Table 2 The confusion matrices and accuracies of discrimination based on selected textures from color channels R, G, B of images of raw beetroots and beetroots subjected to different processing

In the case of models built for individual channels L, a, b from color space Lab based on selected textures, the average accuracy of discrimination of raw and three classes of processed beetroots was in the range of 94% for channel L to 97.25% for color channel b. The accuracy for color channel a was equal to 96.25% (Table 3). In the case of channels L and a, the lacto-fermented beetroots were characterized by the highest discrimination accuracies, 98% (2% of cases classified as raw beetroots) and 100%, respectively. For the color channel L, most incorrectly classified cases (9) belonged to class “freeze-dried” and were included in the class “freeze-dried lacto-fermented”. Also, in the case of color channel a, the developed discrimination models produced the most incorrectly classified cases (8) for class “freeze-dried” and these cases were included in the class “freeze-dried lacto-fermented”. For color channel b, the lacto-fermented beetroots were discriminated with the highest correctness equal to 99%.

Table 3 The confusion matrices and accuracies of discrimination based on selected textures from color channels L, a, b of images of raw beetroots and beetroots subjected to different processing

The discrimination using models built for individual color channels X, Y, Z from color space XYZ revealed very high accuracies in the case of color channels X (94.5%) and Y (95%). For color channel Z, the discriminative model produced the lowest correctness equal to 88.25% (Table 4). For predicted classes, the accuracy did not reach 100% for any class and any channel. The highest accuracies were observed for raw and lacto-fermented beetroots, 97% and 97% for color channel X, 96% and 98% for color channel Y, 98% and 96% for color channels Z, respectively. Most mixed (incorrectly classified) cases were between the classes “freeze-dried” and “freeze-dried lacto-fermented” in the case of each color channel. The freeze-dried beetroots were incorrectly classified as freeze-dried lacto-fermented ones in 5% for color channel X, 8% for color channel Y and 21% for color channel Z. Whereas freeze-dried lacto-fermented samples were incorrectly included in the class “freeze-dried” in 9% for color channel X, 4% for color channel Y and 19% for color channel Z. These results confirmed that freeze-dried and freeze-dried lacto-fermented beetroots were the most similar in the terms of textures of the outer surface of images and the correct discrimination of these samples was the most difficult.

Table 4 The confusion matrices and accuracies of discrimination based on selected textures from color channels X, Y, Z of images of raw beetroots and beetroots subjected to different processing

The freeze-dried and freeze-dried lacto-fermented beetroots were also similar in terms of selected sensory attributes, such as off-odor, beetroot color, attractiveness color, hardness, crunchiness, bitter taste and overall quality (Fig. 2). All processed samples, such as freeze-dried beetroot, lacto-fermented beetroot and freeze-dried lacto-fermented beetroot, had a high overall quality acceptable to consumers. The mean values of overall quality were equal to 9.35 for lacto-fermented beetroot, 8.25 freeze-dried sample and 7.54 for freeze-dried lacto-fermented beetroot using a scale of 0–10. These results were satisfactory. Therefore, the consumers may prefer to consume processed beetroot in these forms. For beetroot color, color attractiveness, hardness, crunchiness, and overall quality, the freeze-dried and freeze-dried lacto-fermented beetroots were characterized by statistically significantly lower values of these attributes than lacto-fermented samples. For the freeze-dried and freeze-dried lacto-fermented samples, the off-odor was noticed. It probably was caused by the drying process. Whereas lacto-fermentation statistically significantly decreased the values of beetroot taste and sweet taste, as well as resulted in a significant increase in beetroot smell. The differences in sweet smell, off-odor, bitter taste and off-flavor taste were not statistically significant.

Fig. 2
figure 2

The sensory attributes of freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroots; a, b—the same letters denote no statistical differences between samples

Although freeze-dried and lacto-fermented beetroot was not used in previous computer vision and artificial intelligence studies, different studies with sugar beet are available in the literature. Niedbała et al. [29] evaluated the quality of the topping sugar beet from 50 sugar beet images using computer image analysis and artificial neural networks. Hallau et al. [30] classified sugar beet leaf images captured by smartphone cameras using the Support Vector Machine (SVM) algorithm to recognize sugar beet leaf diseases, such as Cercospora leaf spot (CLS), phoma leaf spot, ramularia leaf spot. In a similar study, Ozguven and Adem [31] applied Faster R-CNN based on deep learning for automatic detection of leaf spot disease in sugar beet. Yang et al. [32] classified three different types of sugar beet with the Extreme Learning Machine (ELM) using different pre-processing methods. In the study, features in different bands were extracted using hyperspectral technology. Zhou et al. [33] presented the pattern recognition algorithm including L*, a*, Entropy × Density fusion features and SVM, and orientation code matching (OCM)-based template matching algorithm to observe the development of CLS disease in sugar beets under real field conditions. In addition, different studies were carried out to identify the diseases of sugar beet [34], to diagnose nutrient deficiencies [35], and to evaluate the effect of inoculation [36].

The results obtained in this paper revealed the usefulness of machine vision to evaluate the raw and processed beetroots. Techniques using image processing may have many advantages compared to, e.g., traditional visual evaluation of quality (human vision). The evaluation of samples by experienced workers may generate higher costs and may result in the destruction of the sample [25, 37,38,39]. The use of machine vision may be easier, and more objective for the evaluation of the quality of consumer food products. It allows obtaining high correctness in a non-destructive, repeatable and inexpensive way. The manual evaluation may be also repeatable, efficient, and inexpensive, but the human errors may be more frequent that is undesirable. Furthermore, the usefulness of discriminative models based on the textures calculated from the digital images for the evaluation of food product quality, verification of authenticity, and detection of sample adulteration was reported in the available literature [19, 20, 24].

In this study, the discriminative models were built based on textures selected from each of the individual color channels L, a, b, R, G, B, X, Y, Z of images of raw beetroots and beetroots subjected to different processing. Color channels L (lightness component from black to white), a (green for negative values, red for positive values), b (blue—negative values, yellow—positive values) were from Lab color space. Color channels R (Red), G (Green), B (Blue) were from RGB color space. Whereas, the color channels Y (lightness), X (additional color information) and Z (additional color information) were from XYZ color space [40]. In this paper, discrimination accuracy was the highest for the model built based on textures selected from the color channel b. Visible differences in the images of individual samples from the color channel b were noticeable that resulted in high accuracy. Therefore, textures calculated from images converted to color channel b can be most useful for distinguishing the raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroots.

Conclusion

The freeze-drying and lacto-fermentation resulted in the changes in the texture parameters of images of beetroots allowing for the distinguishing of raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented samples with a high probability. The discrimination accuracy reached 97.25% for the model based on textures selected from images converted to color channel b. The lacto-fermented beetroots were most distinguished from other samples. The correctness of discrimination was the lowest between freeze-dried and freeze-dried lacto-fermented beetroots. It was caused by the most similar features of images of these samples. The sensory attributes (attractiveness color, beetroot color, off-odor, crunchiness, hardness, bitter taste, overall quality) of freeze-dried and freeze-dried lacto-fermented beetroots were also the most similar, and the lacto-fermented beetroots differed.

The practical applications of performed research are related to developing fast and non-destructive techniques for the evaluation of the quality of beetroot subjected to different processing. The obtained results indicated that the selected textures from the images acquired using a flatbed scanner may be useful for the distinguishing of raw, freeze-dried, lacto-fermented and freeze-dried lacto-fermented samples. The textures from color channel b of images allowed for the highest discrimination accuracy. The sensory quality of processed beetroots and the features of beetroot images were related. The differences in smell, color, texture and taste of freeze-dried, lacto-fermented and freeze-dried lacto-fermented beetroots were also revealed. Thus, machine vision proved to be effective for the evaluation of the quality of consumer food products.