ADRI International Journal of Sciences, Engineering and Technology 1 (2017) 1-4
Comparison Identification of Leaf Shapes in Indonesia Using Edge Detection of Sobel, Roberts, Prewitt, Ant Colony Optimization, Ratio of Length and Width Leaf ISSN : 2549-550X (print) ISSN : 2549-5518 (online)
Ratnadewi 1), Dominicus Reynaldi Farada2) 1)
Electrical Engineering Department, Maranatha Christian University 65th, Prof. Drg. Suria Sumantri Street, Bandung, West Java, Indonesia E-mail:
[email protected] 2) Electrical Engineering Department, Maranatha Christian University 65th, Prof. Drg. Suria Sumantri Street, Bandung, West Java, Indonesia E-mail:
[email protected] Received February 2017; accepted April 2017; published online May 2017
Abstract. There are many plants in Indonesia with different leaf shapes. The leaf can be treated especially for medicine. The leaf shapes can be categorized into some groups. One way to classify leaf shapes is by image processing. The advantage of image processing is that the processed object will not be damaged because the camera is not in direct contact with the object. The object in this research is leaf. Leaves identification are processed by: first, with the transformation of the colored leaf image into black and white leaf image. Second, edge detection leaf shape is done by several methods of edge detection of Sobel, Roberts, Prewitt, and Ant Colony Optimization. Third is thinning processing. The difference in the size of leaves cause the classification restricted. The difference in size of leaves caused by leaves age or distance shooting. Therefore, it necessary the ratio of length and width leaf. Some of the observed leaves are Acicular, Cordate, Lanceolate, Linear, Lobed, Bipinnate, Spatulate, and Even Pinnate. From the observation edge detection of Sobel, Prewitt, Roberts and Ant Colony Optimization have the same accuracy of 91,67%. An error occurred in the group even pinnate and lanceolate. Keywords: Edge Detection, Leaf Shapes, Sobel, Roberts, Prewitt, Ant Colony Optimization
I. INTRODUCTION
There are many plants in Indonesia with different leaf shapes. The leaf can be treated especially for medicine. The leaf shapes can be categorized into some groups. One way to classify leaf shapes is by image processing. The advantage of image processing is that the processed object will not be damaged because the camera is not in
direct contact with the object. The object in this research is leaf. The utilization of image processing is widely used in various fields. The one of application of digital image processing is Sobel edge detection method in the identification of koi fish color pattern brought by Milfa Yetri [1]. A. Johar et. al. [2] Using Sobel edge detection method on the application of computer answer detection on answer sheets in the case study of SMP Negeri 2
- 2 - Ratnadewi et al/ ADRI International Journal of Sciences, Engineering and Technology 1 (2017) 1-4
Bengkulu. Gonzales, RC, and R. E. Wood. [3] Explaining several edge detection methods such as Roberts, Prewitt, Sobel. W. Lestari and P. Widyaningsih. [4] Using mathematical morphology and edge detection to detect a person's fingerprint. S. A. A. Bowo, et. al. [5] Analyzing edge detection to identify leaf patterns using Roberts, Prewitt, Sobel edge detection. C.A. Martinez. [6] Proposed new ACO algorithm for image edge detection using heuristic and knowledge information and applied operator improvements, binary images including edge detection obtained. In this paper we use Roberts, Prewitt, Sobel Ant Colony Optimization (ACO) edge detection to identify leaf shapes. II. EDGE DETECTION
Edge detection is one of the most important tasks to find the image. Edge is significant local change of intensity in an image. Edge detection on similar digital images to analyze the relationship between pixels and its environment. The information on intensity and orientation of those changes can be found by gradient. The norm of gradient is given by [ACO] G G G 2 x
2 y
(1)
Where Gx and G y are the first derivatives of the image in the x and y direction, respectively. The orientation of the gradient is given by: G arctan y (2) Gx A. Roberts Edge Detection
Using pixel coordinate notation with j corresponds to the x direction and i to the negative y direction. The first derivatives of the image in the x and y direction can be given by: g Gx g i, j g i 1, j 1 x g Gy g i 1, j g i, j 1 y This approximation can be implemented by the following masks:
1 0 Mx 0 1
0 1 My 1 0
B. Prewitt Edge Detection
Consider the pixels arrangement of pixel i, j a0 a1 a2
a7
i, j
a3
a6
a5
a4
The partial derivatives can be computed by: M x a2 ca3 a4 a0 ca7 a6
M y a6 ca5 a4 a0 ca1 a2 The constant c implies the emphasis given to the pixels that close to the center of the mask. Setting c 1 , we get Prewitt operator: 1 0 1 M x 1 0 1 1 0 1
1 1 1 M y 0 0 0 1 1 1 C. Sobel Edge Detection
Setting c 2 , we get Sobel operator:
1 0 1 M x 2 0 2 1 0 1 1 2 1 M y 0 0 0 1 2 1 D. Ant Colony Optimization (ACO) Edge Detection
Ant life is in the colony. One behaviour studied is food search. If ants find food then walked from food sources to its nest and vice versa. Real ants store hemic substances called pheromones on the ground. The high level of pheromone remains on the shorter paths because pheromones are placed faster. This situation caused the colony crossing the shorter paths. In general, ACO algorithm can be described like this: 1). Construct Ant Solutions (): controlling, that all ants construct its solutions
- 3 - Ratnadewi et al/ ADRI International Journal of Sciences, Engineering and Technology 1 (2017) 1-4
incrementally. 2). Update Pheromones (): increasing pheromones value on paths recently constructed by the colony and decreasing all pheromones value on the graph. 3). Daemon Actions (): can be used to implement centralized actions that are not done individually by ants. These actions are related to improve solutions or solutions search process.
(a)
(c)
III. EXPERIMENTAL RESULTS
One of the important parts of the plant are the leaves. Leaf pattern can be divided into two categories, those are single leaf and compound leaf. Single leaf is observed only one leaf on the stem. Compound leaf is observed more than one leaf on the stem. Test images can be shown in Fig. 1 There are eight leaf shapes: The experimental result for Acicular leaf can be shown in Fig. 2 and Bipinnate leaf in Fig 3.
(b)
(a)
(b)
(c)
(d)
(d)
(e)
(f)
(e) Fig. 2 (a) Original image (b) Roberts Edge detection (c) Prewitt Edge detection (d) Sobel Edge detection (e) ACO Edge detection
(g) (h) Fig. 1 (a) Acicular (needle shape), (b) Linear (parallel margins, elongate), (c) Cordate (heart shape, stem in leaf), (d) Lanceolate (pointed at both ends), (e) Spatulate (spoon shape), (f) Bipinnate (leaflets also pinnate), (g) Even Pinnate (leaves in rows, two at one point), (h) Lobed (deeply indented margins)
After edge detection image, the next process is to calculate the ratio of length and width, and the total white pixels of leaf image. The value of ratio of length and width, and the total white pixels of leaf image will be saved in database. For the identification process, we compare the value in database and the value of test image. If comparison value is equal to one then the test
- 4 - Ratnadewi et al/ ADRI International Journal of Sciences, Engineering and Technology 1 (2017) 1-4
image similar to the database image. Table 1 is the ratio of comparison value of test image and database image.
(a)
TABLE 2 THRESHOLD RATIO TOTAL WHITE PIXEL
(b)
Leaf Shapes
Sobel
Prewitt
Roberts
acicular
ACO
0.6380
0.6343
0.6311
0.6375
bipinnate
0.8844
0.8906
0.8673
0.8609
cordate
0.7656
0.7635
0.7649
0.7560
even pinnate
0.7335
0.7398
0.7395
0.7309
lanceolate
0.5000
0.5019
0.5018
0.5512
linear
0.6135
0.6132
0.6130
0.6041
lobed
0.7513
0.7512
0.7510
0.7525
spatulate
0.5740
0.5714
0.5710
0.5689
IV. CONCLUSIONS
(c)
(d)
From the observation Edge Detection of Sobel, Prewitt, Roberts and Ant Colony Optimization have the same accuracy of 91,67%. An error occurred in the group even pinnate and lanceolate with 8 database images and 24. REFERENCES [1]
[2]
(e) Fig. 3 (a) Original image (b) Roberts Edge detection (c) Prewitt Edge detection (d) Sobel Edge detection (e) ACO Edge detection)
[3] [4] [5]
TABLE I THE RATIO OF COMPARISON VALUE TEST IMAGE AND DATABASE IMAGE
Database image
Test image
Acicular 1
Acicular 1 Acicular 2 Acicular 3 Acicular 4 Acicular 5 Bipinnate 1 Bipinnate 2 Bipinnate 3 Bipinnate 4 Bipinnate 5
Bipinnate 1
Comparison of Total white pixel 1 0.63 0.96 0.67 0.97 1 0.97 0.92 0.87 0.88
Comparison of Ratio Length and Width 1 0.98 o.92 0.89 0.82 1 0.99 o.85 0.81 0.82
M. Yetri, Yusnidah, M. Ramadhan, “Analisis Identifikasi Pola Warna Ikan Koi Menggunakan Metode Sobel Edge Detection Dalam Karakteristik Citra Sharpening”, Jurnal Ilmiah Saintikom, Vol. 14, No. 1, Januari 2015. A. Johar, D. Andreswari, G. Triyana., “Aplikasi Pengolahan Citra Digital Untuk Pendeteksi Jawaban Pada Lembar Jawaban Komputer Menggunakan Algoritma Sobel (Studi Kasus SMP Negeri 2 Kota Bengkulu”), Jurnal Teknik Informatika Vol. 7, No. 2 Oktober 2014. Gonzales, RC, R.E. Wood, Digital Image Processing Third Edition, Pearson Prentice Hall, 2008. S.A.A. Bowo, A. Hidayatno, R.R.Isnanto, “Analisi deteksi tepi untuk mengidentifikasi pola daun,” in Proc. Teknik Elektro Undip. C.A. Martinez, M.E. Buemi, “New ACO Algorithm for Image Edge Detection”,