Multivariate Analysis Approaches for Dimension and Shape Discrimination of Vitis vinifera Varieties

In this study, berry dimensions and shape traits, which are important for the design of the grape processing system and the classification of 10 different grape varieties grown in same ecological conditions (‘Ata Sarısı’, ‘Barış’, ‘Dımışkı’, ‘Hatun Parmağı’, ‘Helvani’, ‘Horoz Karası’, ‘Hönüsü’, ‘İtalia’, ‘Mevlana Sarısı’, and ‘Red Globe’) were determined; differences between the varieties were identified with the use of discriminant analysis. The largest grape varieties were identified as ‘Ata Sarısı’ and ‘Red Globe’. The ‘Red Globe’ and ‘Helvani’ varieties had geometrically sphere-like shape. The ‘Barış’ variety had the lowest size averages. According to elliptic Fourier analysis, the primary source of shape variation was ellipse and sphere-looking varieties. However, shape variation was seen due to the existence of a small number of drop-like varieties. According to discriminant analysis, shape differences of the varieties were defined by two discriminant functions. Based on these discriminant functions, the greatest classification performance was achieved for ‘Mevlana Sarısı’ and ‘Dımışkı’. In scatter plots, three shape definitions (sphere, ellipse, and drop) were made for grape varieties. Cluster analysis revealed 4 sub-groups. The first sub-group included the ‘Mevlana Sarısı’ variety; the second sub-group included the ‘Hönüsü’, ‘Hatun Parmağı’, ‘Dımışkı’, and ‘Horoz Karası’ varieties; the third sub-group included the ‘Ata Sarısı’ variety; the fourth sub-group included the ‘Barış’, ‘Helvani’, ‘İtalia’, and ‘Red Globe’ varieties. The variety in the first group had a geometrically ellipse-like shape, the largest length, and the smallest width. The size data were the smallest for the second sub-group. The third sub-group, with the ellipse-like shape, had the large size data. The grape varieties the closest to the sphere were classified in the fourth group, and these varieties had the large sizes.


Introduction
Horticulture sector, including viticulture, constitute an enormous income source for millions of farmers worldwide. All horticulture plants are an important source of nutrients, vitamins, minerals, dietary fibres, etc. They have been using in traditional medicine for a long time, because they contain health benefiting compounds. Horticulture plants are also widely used in the industry [1][2][3][4][5].
Viticulture is practiced in various parts of the world. It could be defined as an opencomplex growing system, influenced by several factors, especially including the climate and pastries (as an additive). Thus, it could be stated that the grape is a significant, directly processed foodstuff. In grape processing facilities, the washing, cleaning, separation, screening, classification, pressing, and packaging systems are designed based on the physical characteristics of the berries.
In the present study, the physical characteristics of 10 different grape varieties were determined, and the shape and dimensional traits were compared. Elliptic Fourier descriptors were used to put forth morphological differences, define shape geometries, and identify variations in the shape geometries of the grape varieties. Despite this, there are no reports on the application of image-based techniques, particularly EFA, to systematically establish shape descriptor states in Turkish main grape samples.

Sampling Location
Grape samples were harvested from the vineyards of Ahmet Münir Bilgen Production Facility of Pistachio Research Institute (Gaziantep) of Turkey in the 2020 growing season. The sampling vineyard is 11 years old, with a wired training system. Samples were taken to the Image Processing Laboratory of Advanced Technology Education Research and Application Center at Mersin University in the same day with frigorific vehicles (+4 • C).

Sample Imaging and Image Processing
As presented in Figure 1, 10 different grape varieties ('Ata Sarısı', 'Barış', 'Dımışkı', 'Hatun Parmagı', 'Helvani', Horoz Karası', 'Hönüsü', 'İtalia', 'Mevlana Sarısı', and 'Red Globe') were used in this study. A randomly selected 40 samples were used for the image processing purposes of each variety. Sampled berries were imaged on white color fiberglass plates, supplemented with artificial lighting beneath for clear images [36] and a transparent surface to provide a contrast between plate and grape color. Samples were arranged in 4 × 5 matrix of 2 groups. Samples fixed with cylindrical plastic supports were imaged at horizontal and vertical orientations, with the use of Nikon D90 model digital camera and the resultant images were saved in *.tiff files. The schematic diagram of the imaging system, with a digital camera mounted on a tripod allowing imaging from 56 cm above the samples, is presented in Figure 2. An external shutter release button was used to prevent vibrations while imaging. A millimetric ruler was used to convert pixel units into metric units.

Dimension and Shape Traits
To determine the dimension and shape traits of the grape varieties, SigmaScan Pro v.5.0 software was used. Thresholding was applied to monochrome images in the range of 0-255, and dimension analysis was conducted automatically. The length (L, mm), width (W, mm), thickness (T, mm), projected area (PA, mm 2 ), equivalent diameter (ED, mm), perimeter (P, mm), and circularity (C) values were measured. The measured dimension and shape traits are provided in Figure 3, and the equations used to calculate these values are provided in Table 1. Table 1. Equations used for size and shape traits of the grape varieties.

Dimension and Shape Traits
To determine the dimension and shape traits of the grape varieties, SigmaScan Pro v.5.0 software was used. Thresholding was applied to monochrome images in the range of 0-255, and dimension analysis was conducted automatically. The length (L, mm), width (W, mm), thickness (T, mm), projected area (PA, mm 2 ), equivalent diameter (ED, mm), v.5.0 software was used. Thresholding was applied to monochrome images in the range of 0-255, and dimension analysis was conducted automatically. The length (L, mm), width (W, mm), thickness (T, mm), projected area (PA, mm 2 ), equivalent diameter (ED, mm), perimeter (P, mm), and circularity (C) values were measured. The measured dimension and shape traits are provided in Figure 3, and the equations used to calculate these values are provided in Table 1.

Elliptic Fourier Analysis
Image files of 40 berries of each variety were used in elliptic Fourier analysis (EFA) was conducted in 4 stages with the use of SHAPE (version 1.03) software [39]. Shape contours were defined in the first stage, x-y coordinates of the points on resultant curves were determined in the second stage, coordinates were converted into mathematical functions in the third stage, and function coefficients were determined over 20 harmonics in the fourth stage [40]. The harmonics each produced 4 Fourier coefficients (an, bn, cn, and dn) with an-bn representing the x coordinate and cn-dn representing the y coordinate of the curve [41,42].
Berry images were converted into 24-bit*.bmp files and shape for image processing. Shape data were gathered with the use of 4 different modules: image processing and shape contours were formed in the first module (ChainCoder), contour codes were normalized and elliptic Fourier descriptors were determined in the second module (Chc2Nef), PC analysis was conducted on resultant descriptors and PC scores were determined in the third module (PrinComp), and the shape variations of contours of berry shapes were visualized in the fourth module (PrinPrint).

Statistical Analyses
Variance analysis (ANOVA) was applied to data of the variables for physical characteristics with the use of SPSS 20.0 software, and Duncan's test was used to compare significant means (p < 0.05).
PAST v.4.02 software was used for multivariate variance analysis (MANOVA), applied to the size and shape data of the grape varieties, and the contour codes were normalized with elliptic Fourier analysis (EFA).
The Hotelling's pair-wise comparison test, including corrected Bonferroni values and Mahalanobis distances, was used to explain the size and shape differences of the grape varieties.
Discriminant analysis was conducted with the use of the size and shape data, and PC scores, to identify the functions yielding the size and shape differences of grape varieties and similarity relationships, were presented on a scatter plot. In addition, such similarities were also revealed with the hierarchical clustering analysis using the Euclidean similarity index, and the size and shape differences/similarities, using the discriminant scores obtained from both EFA and size data between the grape varieties, were presented on a dendrogram.

Results and Discussion
The greatest projected area, equivalent diameter, and perimeter values at both the horizontal and vertical orientations were obtained from 'Ata Sarısı' and 'Red Globe' varieties (Table 2). On the other hand, the lowest values were obtained from the 'Barış' variety at the horizontal orientation and from the 'Hatun Parmagı' variety at the vertical orientation. A circularity value of 1 represents a full circle. Therefore, the 'Helvani' and 'İtalia' varieties at the horizontal, and the 'Helvani' and 'Hönüsü' varieties at the vertical orientation, had the closest shape to a circle. Grape breeding in Turkey is, in general, focused on the development of table grapes with desirable traits such as large berries and bunch size [20,24]. In fact, the grape berry and bunch characteristics are widely investigated in grape-growing countries, and all studies revealed significant differences among the studied varieties for the measured characters [22,23,25,28]. Abiri et al. [43] used 55 grape varieties in their morphological analysis and reported variable berry dimensions. They found berry lengths between 12.32-31.85 mm, and berry widths between 10.55-23.45 mm. Khadivi-Khub et al. [44] reported berry lengths and widths between 10.00-34.00 mm and 7.00-23.00 mm, respectively. Vafaee et al. [45] reported the range of 9.80-30.30 mm for berry length.
Abiri et al. [43] found quite variable berry shapes in grape varieties in Iran and among 55 investigated varieties, 7 varieties were found to have an oblong berry shape, 8 genotypes had a narrow-elliptic shape, 13 varieties had an elliptic shape, 16 varieties had a round shape, one variety had an oblate shape, 5 varieties had ovate shapes, 4 varieties had obtuse-ovate shapes, and one variety had an obovate berry shape. Khadivi-Khub et al. [44] observed three types of berry shape: oblong, elliptic, and round in grape cultivars grown in Iran.
'Horoz Karası' and 'Mevlana Sarısı' varieties had greater length and elongation ratios than the other varieties (Table 3). Geometric mean diameter, surface area, and volume variables are used to compare fruit size. Based on these values, 'Red Globe' was identified as the largest variety. In terms of sphericity, 'Helvani' and 'Red Globe' had the closest shape to a sphere; thusly, elongation ratios prove that finding. 'Barış' and 'Hatun Parmagı' varieties had the lowest surface areas. Bart-Plange et al. [52] indicated that the heat transfer rate of a material relied on its surface area. Increasing heat transfer rates were reported with decreasing volume/surface area ratios, and such criteria was indicated as an important parameter characterizing the drying duration.
The unique nature and attractive appearance of the horticulture crops, including fruits, vegetables, and grapes (which are used both for fresh and industrial purposes) has attracted more and more consumers' attention in recent years [53,54]. Among external quality parameters, fruit shape, related to dimensions, is an important quantitative trait closely related to the fruit quality [5]. Fruit shape is a widely searched parameter in horticulture, and this information is important in selecting appropriate parents and in developing the most appropriate strategy for breeding horticulture crops, both for table and industrial use. Horticulture plants are, in general, grown in an open field and their morphology is affected by environmental conditions, e.g., weather, soil, cultivation, and management [55][56][57]; however, the phenotypic variations for many horticulture crops are mainly affected by genetic background (parents) [58][59][60][61].  In general, fruit morphological approaches for external characteristics (in most of the horticultural crops) are used, and often rely, on the human eye to make categorical assessments. However, fruit shape is an inherently multi-dimensional, continuously variable trait and is not adequately described by a single categorical or quantitative feature. Thus, more recently, some digital image approaches were developed to eliminate human mistakes. Those approaches make fruit shape categories human-recognizable. These methods are based on select quantitative features, extracted from multiple morphometric analyses, that are the best fit for genetic dissection and analysis [10,11,16,35].
The structure matrix, obtained as a result of the discrimination analysis, is given in Table 4. The size and shape variables that were not included in the discrimination functions were excluded from the analysis. The first and second discriminant functions have the largest correlations. The first function divides grape varieties into sphericity and elongation characteristics. The second function reveals the differences in the size characteristics of grape varieties. The other, largest correlations have the fifth and seventh functions. These functions distinguish grape varieties according to their circularity. In Table 5, the size and shape traits of grape varieties were classified with 9 discrimination functions. The first function explains 65.7% of the total variance, and the second function explains 12.3%. According to the canonical correlation coefficients, the difference between the groups can be explained by 95.8% of the first function and 82.4% of the second function. According to the results of MANOVA and Hotelling's pairwise comparison, the grape varieties differ from each other, according to the size and shape traits. However, in paired comparisons, the affinities between the varieties can be examined according to Mahalanobis distances. The smaller the distance value, the higher the similarity rate between varieties. The classification performance of the discrimination functions is 80.8%. Although there are significant differences between the varieties, according to their size and shape traits, the varieties with similar characteristics are clearly seen in the table. For example, the correct classification rate of the 'Mevlana yellow' variety, by the discrimination function, is 70%. However, this grape variety has similar characteristics with the 'Horoz Karası' and 'Hatun Parmagı' varieties. It is seen that the Mahalanobis distances of both varieties are smaller than the other varieties.
According to Figure 4, the 'Red Globe' and 'Helvani' varieties, placed on the right side of the function 1, had the largest sphericity. On the other hand, 'Mevlana Sarısı' had the smallest sphericity. Sayinci et al. [16] reported average sphericity of cherry laurel genotypes as 94.3%. Compared to the general average, the sphericity of cherry laurel genotypes is higher than that of grape varieties. The maximum elongation value had negative correlation with the discrimination function 1. Therefore, all grape varieties ('Mevlana Sarısı', 'Hatun parçagı', 'Horoz Karası', 'Dımışkı', and 'Hönüsü') to the left of the function 1 axis had greater elongation values. The correlation between the discriminant function 2 and the size of the grape varieties is positive. Therefore, the size data of the grape varieties above the function 2 axis are larger than the others. types is higher than that of grape varieties. The maximum elongation value had negative correlation with the discrimination function 1. Therefore, all grape varieties ('Mevlana Sarısı', 'Hatun parçağı', 'Horoz Karası', 'Dımışkı', and 'Hönüsü') to the left of the function 1 axis had greater elongation values. The correlation between the discriminant function 2 and the size of the grape varieties is positive. Therefore, the size data of the grape varieties above the function 2 axis are larger than the others.  The results of elliptic Fourier analysis are presented in Figure 5. Two principal components explained 97.02% of the total variation in the shapes of the grape varieties. PC1 explained 95.54% of the total variation. Shape differences, the majority of which were explained by PC1, were mainly attributed to ellipse and sphere-looking varieties. Similar findings were also reported by Bodor et al. [35] for five different grape genotypes. PC2 explained only 1.48% of the total variation in the shapes of the grape varieties. Considering the shape variation of PC2, it was observed that there were drop-like varieties, apart from ellipse and sphere geometries. The results of elliptic Fourier analysis are presented in Figure 5. Two principal components explained 97.02% of the total variation in the shapes of the grape varieties. PC1 explained 95.54% of the total variation. Shape differences, the majority of which were explained by PC1, were mainly attributed to ellipse and sphere-looking varieties. Similar findings were also reported by Bodor et al. [35] for five different grape genotypes. PC2 explained only 1.48% of the total variation in the shapes of the grape varieties. Considering the shape variation of PC2, it was observed that there were drop-like varieties, apart from ellipse and sphere geometries.

−2SD
Mean +2SD PC1 95.54% of total variance PC2 1.48% of total variance In the present study, berry traits proved useful in assessing the diversity and relationships of Turkish grape varieties as well-known grape genetic resources. The current study revealed considerable diversity in some berry characteristics of the grape varieties. The potential use of Turkey's grape varieties as genetic resources in breeding programmes was highlighted for further investigation.
Principal component analysis is one of the most important and powerful methods in both the morphometric and chemometric characterization of grape varieties, as well as PCA revealing dimension and shape differences among grape varieties [25,26,47]. Abiri et al. [43] used PCA to establish the relationships among 55 grape cultivars in Iran and In the present study, berry traits proved useful in assessing the diversity and relationships of Turkish grape varieties as well-known grape genetic resources. The current study revealed considerable diversity in some berry characteristics of the grape varieties. The potential use of Turkey's grape varieties as genetic resources in breeding programmes was highlighted for further investigation.
Principal component analysis is one of the most important and powerful methods in both the morphometric and chemometric characterization of grape varieties, as well as PCA revealing dimension and shape differences among grape varieties [25,26,47]. Abiri et al. [43] used PCA to establish the relationships among 55 grape cultivars in Iran and showed the method effective to grouping grape cultivars. The present findings, in some cases, corresponded with the previous results in the grape PCA analysis [44][45][46][47][48].
Principal component analysis was also used in put forth dimension and shape differences in walnuts [13], oranges [7], and beans [36].
The results of multivariate variance analysis, conducted with the use of elliptic Fourier component scores and results of canonic discriminant analysis, are provided in Table 6. There are significant shape differences between the varieties. Two functions, discriminating varieties based on shape differences, explained 100% of total variation. The classification performance of the discriminant functions was identified as 56.0%. This result shows that the canonical functions are not able to classify grape varieties properly. However, considering that the shape geometries of the grape varieties are only ellipse, sphere, and drop-like, the success of the canonical functions in classification is quite high. This success in classification depends on the scores of the first two principal components, which explain the shape differences between the grape varieties. By using these component scores, the discrimination functions are obtained. While the first discriminant function classifies grape varieties according to ellipse and sphere geometry, the second discrimination function classifies them according to the drop appearance. The greatest classification performance was achieved for the 'Mevlana Sarısı' and 'Dımışkı' varieties. Pairwise comparison tests revealed that the shape difference between 'Red Globe' and 'İtalia' varieties was not significant. The shape differences between the other varieties were explained with Mahalanobis distances, and values closer to zero indicated increasing similarity between the varieties.
A scatter plot is presented in Figure 6 for the discriminant scores of the grape varieties. While the 'Red Globe' and 'Helvani' varieties on the right side of the Function 1 axis had a sphere-like shape, the 'Mevlana Sarısı' on the left side had a geometrically ellipse shape. Among the varieties, 'Dımışkı' was placed on a different coordinate. It was placed beneath the Function 2 axis and had a drop-like shape. The results of the cluster analysis are presented in Figure 7. According to cluster analysis, grape varieties were gathered under two main groups, in terms of size and shape. Each main group had two sub-groups (a total of 4 sub-groups): the first sub-group included the 'Mevlana Sarısı' cultivar; the second sub-group included the 'Hönüsü', 'Hatun   The results of the cluster analysis are presented in Figure 7. According to cluster analysis, grape varieties were gathered under two main groups, in terms of size and shape. Each main group had two sub-groups (a total of 4 sub-groups): the first sub-group included the 'Mevlana Sarısı' cultivar; the second sub-group included the 'Hönüsü', 'Hatun Parmagı', 'Dımışkı', and 'Horoz Karası' varieties; the third sub-group included the 'Ata Sarısı' variety; the fourth sub-group included the 'Barış', 'Helvani', 'İtalia', and 'Red Globe' varieties. The variety in the first group had a geometrically ellipse-like shape and the lowest sphericity. The size data of the varieties in the second group were smaller than those of the others. The geometric shape of the variety in the third sub-group was similar to the ellipse and had the large size data. A definition of a sphere was made for the shape of the varieties in the fourth sub-group, and these varieties had the highest size average.

Conclusions
The majority of harvest machines exhibit image-processing-based operation. Fully automated systems include identification, cut/pull off, and transfer processes, based on color, dimension, and shape variables. Present findings constitute a significant source of data for the design of grape processing technologies. Shape traits, determined based on the closed contour geometry of the grape varieties, also play an important role in monitoring possible mutant changes to be encountered, due to production conditions. Among the present grape varieties, there were small, medium, large, and very large varieties. The geometrical shape of grape is generally ellipse. However, sphere-like geometries generated a shape variation. Accordingly, an ellipse could be defined for 'Mevlana Sarısı', and a sphere could be defined for 'Helvani' and 'Red Globe' varieties. The analysis conducted, with the use of elliptic Fourier descriptors, revealed that there were also drop-like varieties. According to the discriminant analysis, the shape differences of the varieties were explained by two discriminant functions. According to the pairwise comparison test, there were not significant shape differences between the 'Red Globe' and 'İtalia' varieties. On the other hand, there were significant shape differences between the other varieties. However, the use of more than one variety may offer some advantages in the design of food processing systems. In this sense, the shape similarities of the varieties could be assessed with the use of Mahalanobis distances. In scatter plots, generated based on discriminant functions, contour changes were re-evaluated to describe the geometric shapes of the varieties, and matching was made with picture images to prove the shapes. Accordingly, Figure 7. Dendrogram of 10 grape varieties for the discriminant scores obtained from the size and shape data, and principle component scores of the elliptic Fourier analysis using hierarchical cluster analysis (between-group linkage method and Euclidean distance).

Conclusions
The majority of harvest machines exhibit image-processing-based operation. Fully automated systems include identification, cut/pull off, and transfer processes, based on color, dimension, and shape variables. Present findings constitute a significant source of data for the design of grape processing technologies. Shape traits, determined based on the closed contour geometry of the grape varieties, also play an important role in monitoring possible mutant changes to be encountered, due to production conditions. Among the present grape varieties, there were small, medium, large, and very large varieties. The geometrical shape of grape is generally ellipse. However, sphere-like geometries generated a shape variation. Accordingly, an ellipse could be defined for 'Mevlana Sarısı', and a sphere could be defined for 'Helvani' and 'Red Globe' varieties. The analysis conducted, with the use of elliptic Fourier descriptors, revealed that there were also drop-like varieties. According to the discriminant analysis, the shape differences of the varieties were explained by two discriminant functions. According to the pairwise comparison test, there were not significant shape differences between the 'Red Globe' and 'İtalia' varieties. On the other hand, there were significant shape differences between the other varieties. However, the use of more than one variety may offer some advantages in the design of food processing systems. In this sense, the shape similarities of the varieties could be assessed with the use of Mahalanobis distances. In scatter plots, generated based on discriminant functions, contour changes were re-evaluated to describe the geometric shapes of the varieties, and matching was made with picture images to prove the shapes. Accordingly, grape varieties were defined with three geometric shapes: sphere, ellipse, and drop. Cluster analysis revealed 4 sub-groups, and these sub-groups could further be divided into sub-sub-groups. The operational performance of the product classification system relies on product dimensions and shape traits. Therefore, alternative products should be designed for the classification of different varieties in the same system.