Segmentation of Leaf Spot Disease on Apples Plants using Variational Level Set

The apple industries become an important part in Batu City, Indonesia. More than 100,000 workers work in the apple industries such as apple porridge, apple vinegar, apple chips, and other products from apple. Leaf spot diseases on apple tree are one disease that often appears on the apple tree in Batu City. Early detection of this disease will maintain the quality and quantity of the apple production. The usage of drones to detect the health of the plant is an alternative to prevent the apple production in large area. For detecting the leaf spot disease of the apple plant, the apple leaf taken by the drone needs to be segmented into infected and healthy leaves. In this research studied how segmented leaf spot disease on apple tree by using variational level set method. The first step, the image of the leaves are converted from RGB format to format CIE L*a*b. The reddish-greenish component of the format CIE L*a*b is taken and filtered by using the Perona-Malik diffusion filter method to reduce the noise. The second step is that segmentation by using variational level set method. From the experimental results can be shown that the proposed method can segment leaf spot disease correctly almost for all test images were used.


Introduction
The apple industry becomes an important part in Batu City, Indonesia. More than 100,000 workers work in the apple industries such as apple porridge, apple vinegar, apple chips, and other products from apple. Because of this, apple tree should be cultivated continuously and maintained its quality.
Leaf spot diseases on apple tree are one disease that often appears on the apple tree in Batu City. Early detection of this disease becomes an important preventive action to maintain the quality and quantity of the apple production. The usage of drones or unmanned aircraft to detect the health of the plant is an alternative to prevent deterioration of the apple tree production to a large area. One step in detecting the health of the plant is processing the image generated by the drone. The first step to detect the health of the leaves on the apple tree is taking a leaf image by using drones, then do the preprocessing and image segmentation. By using image segmentation method, the leaf can be separated into the infected leaves and healthy leaves.
Active Contour Method is one of the very well-known methods and widely used for image segmentation. This method has been successfully used in medical image segmentation [1,2,3,4]. Active contour models can be classified into two categories, namely, snake method and level set methods. Level set method has several advantages over other segmentation method [5,6] as methods of snake, region growing and thresholding. Image segmentation by using level set methods can be formulated into a variational problem. Therefore, this method is known as a level set methods variational level set. This method can be solved by formulating functional energy that depends on the contour and other characteristics of an image. The solution of the segmentation problem is how to minimize the energy functional contours.
The variational level set method cannot work well for detecting images that contain noise. Noise often causes failure in edge detection of object or causes the curve of the level set stopped prematurely in the process of evolution curve, resulting in unsatisfactory results. The speed function of the level set cannot detect the boundaries of the object correctly. This problem is caused by a filtering process that removes the true boundaries of the object. In general, the variational level set methods using a Gaussian filter to reduce noise. Gaussian filter method this often causes the object boundaries become blurred. Some methods of filtering have conventionally been proposed, among others: the median filter [7], morphological analysis [8], filter bilateral [9] are well known, but at the same time limit the image also becomes suddenly blurred by applying this method. Perona-Malik diffusion method (PMD) filter is superior to the above method [10]. This method is known as a smoothing method that can maintain object boundaries effectively. This method has also been widely used, one of which is used for medical images [11]. By taking the advantages of the PMD filter method, the PMD filter is used in this research.
Based on the problem described on above, this paper proposes a method for segmenting leaf spot disease on apple tree by using variational level set method. Before the segmentation process, the image of the leaves are converted from RGB format to format CIE L*a*b. The reddish-greenish component of the format CIE L*a*b is taken and filtered by using a Perona Malik diffusion filter method to reduce the noise. This method is known as a smoothing method that can maintain object boundaries effectively.

Segmentation
Information technology is very rapid development. It has been utilized in agriculture, such as image processing technology. Image processing technology along with artificial intelligence and robotics becomes a promising technology in agriculture. Zhai and Du in 2008 [12] proposed a classification method based on the image of the leaves of plants using extreme methods of machine learning. Image classification leaves of plants is an important part in the identification of plants.
Image segmentation is one of the preprocessing methods in the classification or identification task. On the image segmentation stage, the image is divided into homogeneous regions based on criteria specific similarities between the gray level of a pixel with gray level pixel neighbors. Mazid in 2013 [13] proposed a method of image segmentation tobacco leaves using Canny method. Canny method has shortcomings can not produce smooth results. In 2005, Li et al. [13] proposed a segmentation method leaves using the snake method. This method cannot work when the image has two or more objects.
The other image segmentation method is level set method. Level Set Methods introduced by Osher and Sethian [15]. Level Set method has advantages compared to the conventional image segmentation methods such as gradient-based method (sobel, Prewitt, Canny and Laplacian methods) and template-based methods. Level set method is very robust and accurate for tracking moving interfaces are complex. Level Set method has also been widely applied in various fields, in particular for the boundary detection of the image or the image segmentation [ 4, 3, 1, 2].

Anisotropic Diffusion Filter
An anisotropic diffusion filter, has been proposed by Perona and Malik. It is known as Perona-Malik Diffusion (PMD) filter. PMD filter is used to filter noise and preserve the edges of an image. The basic idea of the PMD filter is to get an increasingly smoothed image ) , This PMD filter can be interpreted as an image convolution by a Gaussian kernel ) , with an increasing width as follows: ). , , refers to an edge stopping function, which is defined by: The discrete version of PMD filter is defined as follows:

Variational Level Set Method
The level set method has been applied in many areas, especially for detecting the image boundary. The contour of level set is represented by the zero level set of a higher dimensional function. This is called a level set function, and it formulates the motion of the contour based on the evolution of the level set function.
The curve evolution of a parametric contour )), , ( ), , The curve evolution of (7) is converted to: (8) which is referred to as a level set evolution equation. In this paper, we use the level set where   is a dirac delta function, div is a divergence operator, and g is a speed function, which is given by: where  G is the Gaussian filter and I is the image to be processed [4].

Proposed Method
This paper proposes the segmentation method for detection the leaf spot disease in apple plant by using variational level set method. Flowchart of the proposed method can be seen in Figure 1.

Convert RGB to CIE L*a*b
We use the image data of leaves infected by leaf spot disease. The image has a format RGB (Red, Green, Blue). After analyzing the image of the RGB format, each component of R, G or B cannot distinguish the leaves infected by leaf spot disease and healthy leaves. Grayscale images from the RGB image of leaf also cannot differ the leaf infected by leaf spot disease and healthy leaf. We try to convert RGB format to CIE L*a*b format. After analysis, we obtain the reddish-greenish components on the image of leaf format CIE L * a * b which can distinguish the image of leaves infected with the image of healthy leaves. Hence the image of leaf format RGB needs to be converted to image format CIE L * a * b. CIE is abbreviation of the International Commission on Illumination. CIE L * a * b is an improvement of the model CIE. CIE L * a * b has an element L (Luminance), a (range from green to red) and b (range from blue to yellow).

Perona-Malik Diffusion Filter
The next step is that reducing image noise in the leaves by using the method of Perona-Malik diffusion filter. In Figure 2 (b) it can be seen that the white area or black area still contains spots and not smooth. If the object boundary detection is done by using a variational level set then it will not be detected properly, therefore the noise of image in Figure 2 (b) should be reduced and the image should be smoothed. By using Perona-Malik diffusion filter, these spots can be reduced and the image becomes more smoothed.  Figure 4 shows the filtering results of image in Figure  2 (b) by using the Perona-Malik diffusion fiter method. After filtering, the image becomes smooth and the spots on the image can be reduced.

Segmentation by Variational Level Set Method
Level set function evolves depending on the function g (edge stopping function) that is dependent gradient of the image. The function g will make the zero level set function will move to find a gradient image of the high value that is at the limit of the object to be detected. In Figure 3 (a) shows the value of edge stopping function of the image before it was filtered by Perona-Malik diffusion method while Figure 3(b) shows the value of edge stopping function of the image after filtered by Perona-Malik Diffusion Method. The red areas are high value (close to 1) and the blue areas are low value. Zero level set function will continue to move in the red area and it will stop in areas of blue. In Figure 3

Experimental Results and Discussion
For evaluating the performance of the proposed method, we use the image of the apple leaves infected by leaf spot disease. The number of the leaves used is 6 varied imagery. Figure 2 (b) displays a redness-greenish component of the image of the Figure 2 (a). From Figure 2 (b), it can be seen that the reddish-greenish components can differentiate between areas infected by spot diseases and healthy areas. The areas affected by leaf spot are shown by bright area and healthy areas are shown by dark area. Figure 2 (b) also shows that image still contain the spots (noise) and is not smooth. This condition will cause the unsatisfied detection, when the object is detected directly by using variational level set. Noise will be detected as edge therefore noise need to be reduced and unsmooth areas need to be refined. Figure 4 shows the image of the leaves that has been filtered using the method of Perona-Malik diffusion filter.
The image of the leaves in Figure 4 look smoother and spots are gone. This shows that the method of Perona-Malik diffusion filter successfully used to eliminate freckles and soften the image of leaf. Figure 4 also shows the boundary between leaf area infected and healthy leaves elapsed areas can be maintained properly. Figure 5 shows the segmentation result of leaf area infected by leaf spot disease. From Figure 5, It can be seen that the proposed method can segmented leaf spot disease successfully for almost all data. However, leaf spot disease of leaf image in Figure 5 (c) cannot be detected properly. It is caused by some boundaries of objects are blurred. Figure  6 shows the edge stopping function of Figure 5 (c). In Figure 6 shows some of the objects blurred boundaries,

Conclusions
The reddish-green component of image in the CIE L*a*b format is able to distinguish between leaves infected by leaf spot disease and healthy leaf. After filtering by Perona-Malik diffusion filter, the noise can reduced and the image becomes smooth. The variational level set methods successfully segment leaf spot disease for almost all of the images used. The variational level set methods in detecting an object depends on the gradient boundary.