Leaf detector box : Artificial vision system for leaf area identification

The detection of leaf area in plants is a very important parameter to evaluate growth rates. Nowadays, this analysis is performed manually through a process of counting, cutting and weighing leaf that involves long periods of time, providing subjective results and with low repeatability. The purpose of this research was to develop a computational tool (leaf detector box) to detect leaf area through image processing techniques. The methodology implemented based on application of image processing techniques to segment leaves. Later, morphological operations were apply to eliminate objects that were not part of leaf. Finally, the leaf area was identified through a conversion of pixel to squared centimeter. The validation results showed a determination coefficient greater than 0.97 for four species of plants analyzed with regard to manual analysis by a technical expert. In addition, it validated in a set of 40 leaves precision of algorithm implemented carrying on three measurements for each one at different positions. The results showed a variance of 0.00024 for orange tree leaves, 0.007 for lemon tree leaves, 0.008 for almond tree leaves and 0.001 for mango tree leaves, indicating precision of algorithm providing similar results when it was applied in different opportunities to one leaf. Therefore, the tool becomes a reliable technological support in process of detection leaf area allowing reducing long periods of time and subjectivity in process. Likewise, the repeatability in results were increased.


INTRODUCTION
Currently, various agri-environment processes are developed in different laboratories and institutions worldwide such as Ministry of Agriculture in Colombia (Ministerio de agricultura, 2016), Food and Agriculture Organization (Organización de las Naciones Unidas para la Alimentación y la Agricultura, 2012), Universidad Del Valle (Universidad del Valle, 2016), Universidad Politecnica De Madrid (Universidad Politecnica de Madrid, 2016), among others.One of these processes is study of plant growth by measuring leaf area; this magnitude *Corresponding author.E-mail: eeduardoroa@mail.unicundi.edu.co.
Author(s) agree that this article remain permanently open access under the terms of the Creative Commons Attribution License 4.0 International License is one that defines ability to capture the photosynthetically active radiation where the plant makes the development of tissues and nutritional compounds for its own development.
Nowadays, different scientific and technological advances exist to do this measurement.One of them was develop by LI-COR company (Li-cor, 2016), in 2007, they developed a system capable of doing recognition and classification of plants of an automated way using Probabilistic Neural Networks (Gang et al., 2007).In 2009, semiautomatic systems were use making a software CAD (Rico et al., 2009) which used lines of reference to calibration of measurement.Other authors in 2011 used MatLab software (Shivling et al., 2011) to do automatic measurement of leaf area, likewise, there were some algorithms used based on invariants moments (Zalikha et al., 2011) with diverse characteristics that could be used in subsequent analyzes.In 2012, using the software ImageJ (Rincon et al., 2012) the area of semiautomatic way was determined.Also, they developed new advances on using a digital scanner (Mahdi et al., 2012) allowing progress in the detection of the rims of the leaf, due to the big precision of capturing the image with one that counts.Moreover, they developed rapid and precise algorithms in (Piyush et al., 2012), it means the conversion to another color space (CieLab), or through bonding techniques such as Zernike moments and neural networks and radial basis probabilistic (Kulkarni et al., 2013).Finally, in 2014 the segmentation was realized using the component of tone making use of the format HSI (Lin et al., 2014), this segmentation worked with an index of very low error, the last advances in the topic of the measurement of the leaf area were focusing in mobile systems principally in cell phones with operating system android.
However, in Colombia and in case of vegetal physiology laboratories at Universidad de Cundinamarca, an expert measure leaf area manually and result of measurement depends on inspection and visual experience, causing systemic errors during process that affects the reliability and repeatability of results.
The main objective of this research was development of a computational tool that allowed to quantify leaf area, through an artificial vision system based on image processing techniques using the MatLab software.

MATERIALS AND METHODS
In Figure 1, it presents methodology used to develop measurement system of leaf area using artificial vision techniques, which consists of three main stages that are prototype development, processing image algorithms and tool validation.First, the designs in 3D of prototype for image acquisition were developed, following analyzing of requirements and restrictions of user.

Design of computational tool
To develop project, an artificial vision system was propose, in order to identify leaf area in plants with a maximum size of (30 × 30) cm, with controlled lighting parameters.Then, in Figure 2, show step by step of its construction in Solid Edge.
In the computational tool design, Coll Roger laminas were use, in order to fulfill requirements of user.The system was design with boxy measures of 50 cm wide, 50 cm long and 70 cm high, as is shown in Figures 2A and B. This allowed include image acquisition system (Logitech webcam C270) and lighting system (lED type) inside box to capture images up to (30 × 30) cm.In addition, a support was design to place leaf on an antireflective glass (40 × 40) cm, which helped to prevent contrast variations in image as shown in Figure 2D and C respectively.Additionally, two dampers were adapted to the sides of lid to avoid sharp blows as shown in Figure 2E and F. Finally, they were implemented four-rubber foot to give support and stability to tool, allowing displacement in laboratories.Furthermore, it is reprogrammable allowing to be apply to other projects.

Development of algorithm for identification leaf area
The computational tool acquires images by a traditional artificial vision system.The proposed methodology identifies leaf area through application of techniques of image processing.Then, each one described in process stages of in Figure 3.
The first stage consisted in image acquisition process.Then, a contrast adjustment was applied to ease process of segmentation of leaves.Later, Otsu method and morphological operators were use, to segment objects of interest eliminating objects that were not part of leaves.Finally, leaf area was determined through a direct proportion between pixels and image centimeters.

Acquisition and image preprocessing
The stage of image acquisition of tool, was based in a web cam Logitech c270, which obtained images with resolution of (640×480) pixels and relation 4:3 in JPG format, computer equipment presented a processor Amd c60 APU 1Ghz, memory RAM de 2Gb, with an operative system Windows 8.1.Later, edges that limit space were eliminate on images, used to limit size of the leaves.Finally, stage of preprocessing was apply to adjust contrast, allowing decreasing the variance of intensity in pixels.

Extraction of area of the leaves
To extract leaf Otsu method and histogram analysis were implement.This method consisted in comparing values of image in gray scale with a threshold defined by colors that presented object and background of image, was assigned white color to pixels that are above threshold and black color to pixels that are below threshold.

Detection of leaves area
The stage of area detection on leaves was realized by application of Equation 1 through of a factor relation of pixels to cm 2 on image.(1)

Validation of artificial vision system
The validation of computational tool done by a statistical correlation analysis, applying coefficient determination, to evaluate grade of concordance between methodology implemented and conventional methods used.Finally, algorithm precision was determined through a variance analysis of measurements obtained with computational

RESULTS AND DISCUSSION
In order to standardize a methodology to identify leaf area in plants, design and assembly of computational tool and each of modules that composed system of artificial vision were apply; in Figure 4, obtained results are shown.In them is evidenced that it allows to obtain the leafs area with a maximum size of (30 × 30) cm, in addition to count with parameters of lighting controlled whit lid to prevent of lighting environment unwanted situations.
The first stage tested was process of acquisition and preprocessing images, in order to get leaves area in a simple form without distortions that affect measurement.For this reason a contrast adjustment stage was implemented to diminish changes of intensity in images, then in Figure 5 are showed images acquisition results and it is preprocess respectively.
Later, extraction stage of leaf regions was evaluated, having controlled parameters of lighting without depending on external light, it was possible to apply segmentation process through a conventional technique as Otsu method and histogram analysis.Then, results of segmentation process are shown in Figure 6.
Finally, identification stage of leaf area was test by determining area of leaves, through pixels relation to cm 2 as shown in Equation 1.Then, in Figure 7, graph shows interface developed to visualize results.
To validate computational tool, analysis of leaf area of four different species from plants with 10 leaves was apply.Later, it was determined leaf area.The results were compared with results obtained by an expert in agronomy through conventional methods used in the Universidad de Cundinamarca.
Initially, a correlation analysis was identify between developed tool, manual measure and precision scales, demonstrated high correlation for orange tree leaves, with a coefficient of determination 0.9953 with regard to manual method and a coefficient of determination of 0.9768, with regard to method of precision scales, as shown in Figures 8 and 9, respectively.
Likewise, validation allowed demonstrating to lemon tree leaves, high correlation with a coefficient of  Later, validation was apply for almond tree leaves and the test allowed to demonstrate high correlation with a coefficient of determination of 0.992 regarding manual method and a coefficient of determination of 0.9686 with regard to method of precision scales, as shown in Figures 12 and 13 respectively.This test evidenced that for leaves with a size and a weight relatively high differences between implemented methodology and conventional methods are most notorious but with percentages of an acceptable precision.
Finally, the validation was apply to mango tree leaves and test allowed to demonstrate high correlation with a    allows technological support for leaf area analysis, due to its high indexes of correlation that it was present for the four plants species.
Finally, validation of computational tool was done, by a variance in three different measurements for every leaf in a set 40 images, then, it showed the variances for every   1 to 4, it was evidenced a variance of 0.00024 for orange tree leaves, 0.007 for lemon tree leaves, 0.008 for almond tree leaves and 0.001 for mango tree leaves, showing precision of algorithm to provide very similar results when it is applied in different occasions for same leaf.

Figure 2 .
Figure 2. Design in 3D of computational tool. A. front view of lid; B. Side views module; C. diagonal view of glass; D. front view of glass support; E and F. front view damper.Source: Authors.

Figure 3 .
Figure 3. Algorithm for identification of leaf area.Source: Authors.

Figure 6 .
Figure 6. A. Original image with computational tool.B. Segmentation of leaf.Source: Authors.

Figure 7 .
Figure 7. Interface graph of user for computational tool.Source: Authors.

Figure 8 .
Figure 8. Correlation of computational tool with regard to manual method, for orange tree leaves.Source: Authors.

Figure 9 .
Figure 9. Correlation of computational tool with regard to precision scale, for orange tree leaves.Source: Authors.

Figure 10 .
Figure 10.Correlation of computational tool regarding to manual method, for lemon tree leaves.Source: Authors.

Figure 11 .
Figure 11.Correlation of computational tool with regard to precision scale, for lemon tree leaves.Source: Authors.

Figure 12 .
Figure12.Correlation of the computational tool regarding to a manual method, for almond tree leaves.Source: Authors.

Figure 13 .
Figure 13.Correlation of computational tool with regard to precision scale, for almond tree leaves.

Figure 14 .
Figure 14.Correlation of computational tool with regard to manual method, for mango tree leaves.Source: Authors.

Figura 15 .
Figura 15.Correlation of computational tool with regard to precision scale, for mango tree leaves Source: Authors.

Table 1 .
Precision of system (Leaf detector box) for orange tree leaves.Leaf Detector Box) for leaf area identification in plants, it was of vital importance adequacy of parameters of lighting, because it must ensure that in process of images acquisition, presence of unwanted objects, impurities or abrupt changes in intensity is minimized.The previous thing facilitated the extraction of leaf, since at present lighting inadequate conditions generates erroneous detections in edges, causing error in measurement.Through developed tool, leaf area was obtained with high precision compared to ConclusionsIn computational tool development (

Table 2 .
Precision of system (Leaf detector box) for lemon tree leaves.