Estimation of the flower buttons per inflorescences of grapevine ( Vitis vinifera L . ) by image auto-assessment processing

1 Laboratoire de Développement et Valorisation des Ressources Phytogénétiques, Université de Constantine 1, B. P. 325 Route Ain El Bey, Constantine 25017, Algérie. 2 Département des Sciences de la Nature et de la Vie, Faculté des Sciences, Université de Msila, B. P. 166 Ichbelia, 28000 M'sila, Algérie. 3 Laboratoire d'Automatique et Productique, Département de Génie Industrielle, Université de Batna, 05 Avenue Chahid Boukhlouf, 05000 Batna, Algérie.


INTRODUCTION
Determining fruit set rates requires a flower button counting at stage H (separate flower buttons) of Baggiolini code (1952) in the development cycle of the vine, and at another stage (J).The first attempt of counting procedure is done smoothly and cautiously by manual manipulation of a lot of inflorescences of vines.This monotonous procedure has some technical and spatiotemporal constraints.The manual flower counting is very difficult, *Corresponding author.E-mail: benmehaiarad@univ-msila.dz.
Author(s) agree that this article remain permanently open access under the terms of the Creative Commons Attribution License 4.0 International License and deals with many problems having influence on the requested research results.The main problem is the large number of flower buttons (several hundreds or thousands) that can be grouped into clusters (cluster compactness).This may cause a loss in flower buttons during manipulation.Other disadvantages are the possible severe natural conditions of experimentation and time constraints.
The research of Bessis (1960) suggests a method for determination of the flower number.It is based on a linear regression between the cluster length and its richness in flower.He affirmed a positive relationship.This is actually the common method for flower assessment.
More recently, counting objects by using computer simulation has been of great research interest involving important methodological problems of image processing.Researchers have developed various techniques.Formerly, Girard et al. (2009) have developed a method of counting flexible oblong objects that may overlap.This method uses a combination of image processing morphological and statistical filtering.
Moreover, Vallotton and Thomas (2008) have introduced a system based on algorithms of image processing for counting the number of hairs and its length.Whereas, Sossa et al. (2003) have proposed a technique for counting objects in an image without separating the conglomerates of objects, this technique is based on the skeletonization.Similarly, in applied biological processes, Guérin et al. (2004) studied the feasibility of counting of wheat grain by colored images based on texture analysis.
In viticulture, Poni et al. (2006) found a relatively strong correlation between actual and manual count flower numbered on prints.In order to operate the automatic assessment, Cubero et al. (2014) developed a fast and accurate method for detecting and removing the pedicel in images of berries.This method is based on a novel signature of the contour.Diago et al. (2014) developed a simple and robust machine vision methodology to be applied on image taken under field conditions in order to estimate automatically the number of flowers per inflorescence.The later work is taken as reference for our comparative statistical analysis by comparing the robustness and the significance level of the methods.
About the applications on the grapevine, Dunn and Martin (2004) and Tardaguila et al. (2010) developed a program, which recognizes automatically the grapes from a digital image of the canopy of Cabernet Sauvignon grapevine.This method is used to predict vineyard yield.In order to count berries in grapes, Font et al. (2014) presented an automatic method for counting red grapes from high-resolution images of vineyards taken under artificial lighting.The proposed method is based on detecting the specular reflection peaks from the spherical surface of the grapes.Ivorra et al. (2015) propose a three dimensional computer vision approach to assessing grape yield components based on new 3D descriptors.More advanced methodologies applied in viticulture is found in the studies of Nuske et al. (2011), Liu et al. (2013), Nuske et al. (2014), Aquino et al. (2015), Diago et al. (2015), Font et al. (2015) and Schöler et al. (2015).
The main objective of this work is to develop a new method automatic assessment system using image processing and based on watershed in order to detect and separate contiguous flower buttons.It will be pursued by a comparative statistical analysis to obtain a predictive estimation of the flower assessment in the vineyard, which the utility lies in determining fruit set rate.

MATERIALS AND METHODS
In this section, the image acquisition and the process analysis carried on these images and flower counting are described.In order to get a better counting system, a large number of images, which are considered as learning data are worked on.The study was carried out with 80 grapevine inflorescences from different Cardinal (Vitis vinifera L.) cultivar.
The images were taken in the field conditions using a Bridge Digital Camera (Sony HX100v) at stage H (separate flower buttons) of Baggiolini (1952) code against a dark background to assure a high contrast.The camera was set to automatic mode and the distance between the inflorescence and the camera lens was not fixed because of the inflorescence size.In the same time, a cautious and precise manual counting was carried in the field for each photographed inflorescence.
Images were processed using Matlab (v7.14) in particular the Image Processing Toolbox.The proposed algorithm is divided in two parts.In a first step, a pre-treatment is necessary to prepare the image.Then, the watershed is applied to the processed images to obtain the final segmentation of flower buttons.
The pre-treatment is based on image processing.It is a very interesting scientific topic that provides more applications (Serra, 1982;Soille, 2002).The objective is to prepare the image by cleaning (noise elimination) or by reducing the information quantity to be processed in order to keep only the most significant information.Consequently, this step is based on the mathematical morphology.The basic idea is to compare objects to be analyzed with another object of a known shape called "structuring element".
Therefore, to prepare our image (Figure 1a), the following steps were realized: (i) The images are converted to grayscale (Figure 1b).(ii) The images background is removed using the operation "Top Hat", which represents a residue for amplifying the contrast (Figure 1c).(iii) The resulting image is then converted into a binary image by using thresholding (Figure 1d).The function graythresh automatically computes an appropriate threshold to use to convert the grayscale image to binary (iv) The flower buttons are separated by morphological operations (Erode the binary image with a disk structuring element using "imerode" function, then remove small objects by the function bwareaopen and imopen) (Figure 1e).
The watershed introduced for image analysis is one of the most powerful methods to accomplish the delineation steps in image segmentation chains.The watershed technique allows partitioning the image pixels into a set of connected regions, separated by a closed contour.It is an adapted tool for segmentation (Cousty,  The bad separation of raffles that appears before taking images results a superimposed flower button.( 6) The emergence of additional objects.These issues require changes in the developed algorithm (threshold adjustment and structural element size) from one image to another in order to eliminate the additional objects, and to separate the inflorescence from background for better detection of flower buttons.
The main objective was the determination of the correlation between manual counting (MC) procedure and automatic counting estimated by Watershed (EW) of flower buttons in our proposed method.Evaluation of the performance of the developed method was carried by the correlation coefficient (r) and the coefficient of determination (R 2 ).Statistical analysis was conducted using SAS (v9.1).

RESULTS AND DISCUSSION
To determine the number of flower buttons per inflorescence on the image, the objects were divided into three categories: Flower buttons, objects removed because of the smaller size, the unidentified objects (stalks).
By eliminating the stalk and the small objects, a better estimation of the number of flower buttons was obtain (Figure 2b).The number found by the program (Figure 2b) is 283 flowers on the total of 301 manually counted.This reflects an approximation of manually calculated number.
After the algorithm implementation on the total images, results named "Estimated by Watershed" (EW) were gotten.They are graphically presented with the manually counted measurements (MC) in Figure 3.
The uniform lightness from an image to another is corrected by the elimination of background (distinguishing inflorescence from background) that makes the method independent of lightness.This involves changes in the level from a grayscale image to another.The difference in brightness between different images of the database shows that the method is robust for this factor.
A sensitivity to the shape and size of the morphological filter shows that a change in size of the structuring element "disk" is required for each picture due to volume of flower buttons.
The noise has the effect to perturb the labelling of objects (flower buttons) by the existence of more objects.However, the threshold easily removes these very small objects.
Both measures showed a strong correlation (with R 2 : 0.99), which leads us to draw that regression line as shown in Figure 4. Poni et al. (2006) found, by a regression between actual (real) flower number and the number of flowers counted on photo prints, that the coefficient of determination was 0.88 and 0.87 for the two worked varieties.Compared with our results based on automatic counting, it seems to be more significant and presents a higher correlation (R 2 =0.98).Diago et al. (2014), by using the same software but with another function in toolbox labeled bwconncomp, have similar findings.Comparing our results with Diago et al. (2014Diago et al. ( , 2015) ) results, regardless of the used technique, it seems that our results have a more significant level.They found the coefficient of determination between 0.76 and 0.89 among the four studied cultivars.
The flower buttons assessment is done for a single upper surface (a perpendicular view of the image, where flower buttons on the other side of the inflorescence were invisible in images and consequently, undetectable by the algorithm).This makes the counting of the total flower buttons per inflorescence impossible.For this reason, we explain the underestimation of the occurred flower number.
To solve this problem, the implementation of a regression method giving low counting error (with no influence on the results) is required.Through the linear regression method, we could obtain predicted values (Figure 5).By comparing the predicted values with those counted manually, the subject of our estimation, we have found that there is a strong correlation with quite a strong significance with a coefficient of determination of 0.99 (with p<0.00001).
To evaluate the error in the resulting model, the analysis of the linear regression estimator has shown that the values of residuals are reduced.In fact, they have low values by which its standard error of 34.4.Returning to the precedent example, the number found by the prediction is 312 flowers, which is closer to the manual count (301 flowers) than that obtained from the watershed program (283 flowers).In order to get closer to the manually counted values, our research has shown that we should add 5% of the estimated value to the original one.
Most studies of flower number per cluster were used to estimate fruit set.Therefore, account of the flower button number per inflorescence is essential for accurate assessment of fruit set.In this research paper, we have developed a method of grapevine flower buttons assessment per inflorescence by image processing.This method is based on image processing techniques (The mathematical morphology and the watershed), with a comparative statistical analysis.The comparative analysis has shown that the applied technique presents a more significant level and high robustness compared with some previous studies.Our study is in progress to overcome the difficulties of automatic counting and to implement a reliable tool to estimate the flower buttons per inflorescence automatically, which will be very useful and may be of great help for researchers seeking for the determination of estimated fruit set of grapevine.In the future research, efforts will focus on the correlation estimation between the automatic grape counting results and the ripeness degree of the clusters of grapes and on applying the proposed counting method to other grape varieties and to other families of fruit to estimate yield production.

Figure 1 .Figure 2 .Figure 3 .
Figure 1.(a) The original image; (b) The image converted to grayscale; (c) Separating the background from the flowers clusters; (d) The image after binarisation; (e) Separation of flower buttons by morphological operations.

Figure 4 .
Figure 4. Relationship between the number of flower buttons manually counted and those estimated automatically by watershed (R 2 = 0.988 at p<0.00001].

Figure 5 .
Figure 5. Graphical presentation of predictions with confidence interval of 95%.