Modeling Grape Leaf Quality Using Image Processing Technique

Grapes are familiar fruits in the Mediterranean, Central Europe and Southwest Asia. Various components of this plant have many uses, including leaves used in the preparation of foods. The quality of the grape leaves is especially important for the preparation of food and this requires careful consideration. One of the indicators of grape leaf selection in food is its surface integrity and absence of grooves. In this paper, by using image processing technique, the geometrical characteristics of the grape leaf including its area and perimeter are extracted and numerical value is given based on the defined index. For this purpose, leaves of four grape varieties were collected from different areas of Boroujerd City in Iran and modeling was done according to this research method. By categorizing the results that range between zero and one, two grape varieties have better Quality Index than other varieties and it is suggested as a suitable type for leaf use.

One has examined the quality of four types of grape leaves in Sarma (a traditional Turkish dish) preparation., In the research, Hacitesbihi, Agrazaki, Karaerik, and Kabuguyufka varieties were considered and it found that Karaerik variety was better than other ones (Sat, Sengul and Keles, 2002).
In a research it was compared 12 different equations to estimate leaf area. The simplest and most accurate of them is = 0.587 with a value of 2 = 0.987. Their research method is using image processing which has been done in globlab software. The variables of the study were maximum width, leaf length, petiole length and leaf dry weight (Montero et al., 2000).
In another study it has presented a method based on image processing to determine leaf disease and its classification. The proposed model includes these steps: Image acquisition, Image pre-processing, Image preprocessing, Image segmentation, Feature extraction and Statistical analysis and comparison. They considered three diseases, Black rot, Downy Mildew and Powdery mildew. The research results indicate the efficiency of the model in determining leaf diseases of plants (Narvekar, Kumbhar and Patil, 2014).
In this research, the physical characteristics of the leaf have been extracted using image processing technique and the leaf surface quality index has been defined for it. This index has the quality of application in the food industry.

Equations
In this study, grape leaf quality was defined based on the lowest groove and maximum leaf area integrity. So, in general terms, the following equation can be written:

=
(1) In the above formula, the Initial Quality Index has a unit of [L], leaf area unit of [L 2 ] and leaf perimeter unit of Since the quality index changes as the leaf area increases or decreases, a constant form of the index is needed. Thus, by dividing the index by the index corresponding to the equal circle with the area of the leaf, the dimensionless index is obtained that called Quality Index (QI).
The equation (3) can be summarized below.
We know that = � . So, equation (4) can be summarized below.
And finally, we will have the simple form of QI Equation as below.
In relation (5), A is leaf area in unit of [L 2 ] and P is leaf perimeter in unit of [L]. The QI value is in the range of zero for worst case and one for best case (0 < ≤ 1).

Image Processing
"Image J" image processing software was used to determine the geometric characteristics (area and perimeter) of grape leaves. This software is an open-source model that has many capabilities in the field of image processing. In order to achieve the desired result, the image used in image processing must be of acceptable quality. The photos used in this review were taken and used by a Canon D80 camera. In using Image J Software there must be an index to define the scale. Therefore, a 10 cm marker was used in this study.
To determine the geometry values of the image, first it's need to have a scale. Then converting the image type to 4-bits and specify the boundary of the phenomenon in the image is need. Figures (1) and (2) shows the actual and transformed image of a sample under investigation. Finally, by selecting the desired range, and performing the analysis, the leaf area and perimeter values are determined. The outputs of Image J software analysis are various. But determination of two parameters of area and perimeter is sufficient in this research.

discussion
In this study, four grape varieties (a, b, c and d) were studied. Figure 3 shows the types of grape leaves studied in this research. The types of grapes studied are Ruby Grape, Sour Grape, Sultana Grape (variety 1) and Sultana Grape (variety 2). Each grape variety is unique in terms of the appearance of the leaves, but they are all somewhat similar. The subject of study is the amount of leaf surface integrity and the number of grooves in grape leaf.
In each of the grape varieties, 2 samples were selected. Using the Image J software and equation 5, the QI was determined and summarized in accordance with Table 1.  According to the equations of this study, the value of the QI can be between zero and one, which is the value of the worst and the best quality subsequently. It can be seen from Table 1 that types 1 and 2 have a lower QI and types 1 and 2 have a higher one. According to the governing equations in the present study, the value of QI depends on the degree of leaf integrity as well as the low grooves. So, types 1 and 2 are more desirable in terms of quality. In the quality rating system of leaves, the QI can be used as a good indicator along with other quantities.

Summary and Conclusions
In this research, image processing method was used to evaluate the quality of grape leaves and by using geometrical equations an index for numerical presentation of leaf quality was introduced. Using image processing software, an image was taken from the grape leaf surface and geometrical components including grape leaf area and perimeter were determined by defined scale. What makes the application of image processing software imperative is its ability to calculate the geometric properties of irregular shapes. Because without the software, it is not possible to easily calculate these values accurately.
With the geometrical parameters of the grape leaf, the quality of the leaf can be affected by the integrity and absence of grooves in the leaf. In order to properly compare the leaves in terms of quality and in any size and shape, the quality index was defined relative. This relative index is the result of dividing the initial index by the circles quality index as well as the leaf area. The initial index is also the result of dividing the leaf area by the amount of leaf perimeter.
In order to evaluate the model of this study, 4 types of grapes were studied. These four types are Ruby Grape, Sour Grape, Sultana Grape (variety 1) and Sultana Grape (variety 2), all of which are from different parts of Boroujerd city in Iran. The results showed that two types Sultana Grape (variety 1) and Sultana Grape (variety 2) have better quality than the types of are Ruby Grape and Sour Grape From the results, it can be concluded that the index presented in this study is capable of expressing grape leaf quality.