Classification of Toxic Plants on Leaf Patterns Using Gray Level Co Occurrence Matrix (GLCM) with Neural Network Method

Poisonous plants are plants that must be avoided and not consumed by humans, because the presence of poisonous plants is also often found in the surrounding environment without realizing it. Because of the lack of knowledge to classify poisonous plant species, it will be more difficult to find out. With the help of a computer system, it will be easier to identify the types of poisonous plants. There are 3 types of poisonous plants that will be used in this study, namely cassava, jatropha, and amethyst. There are also 3 types of non - toxic plants with almost the same morphology as a comparison, namely cassava, figs, and eggplant. In this study, researchers tried to classify poisonous plant species using leaf pattern features that would be extracted using shape features and Gray Level Co - occurrence Matrix (GLCM). The value taken from the shape feature is the values of area, width, diameter, perimeter, slender, and round. While the value of contrast, entropy, correlation, energy, and homogeneity for Gray Level Co - occurrence Matrix (GLCM) attributes. To classify data using Neural Network with RapidMiner application. From this study, it is known that from 300 total datasets used, the highest accuracy is 96.13% using the Neural Network method. With an AUC value of 0.986 and is included in the very good category. With this research, it is hoped that it can provide benefits for everyone to know more about the types of poisonous and non - toxic plants with similar morphology in the leaves.


Introduction
Poisonous plants are plants that must be avoided and not for human consumption, because of the importance of plants for humans (Nithaniyal et al., 2021), then the presence of poisonous plants is also often found in the surrounding environment without realizing it (Habibie, 2019). There are many types of plants in the environment that can be consumed by humans and animals, but some plants contain toxins in them (Zheng et al., 2021). From the many types of plants, it makes us less able to distinguish which plants contain toxins and which do not. Because of the types of plants that contain toxins and those that are not, several types of plants tend to have similarities in their morphology (Zheng et al., 2021). So we need a system that can classify the types of poisonous plants. Along with its development in the world of technology, researchers use models based on the application of image textures, because in this way, computers can recognize the characteristics of a leaf from density, diversity, regularity, and roughness (B et al., 2018). From this process, it can be seen the value of the characteristics or characteristics of the leaf pattern which will be processed for classification. There are several models for analyzing image textures, one of which is by using the Gray Level Co-occurrence Matrix (GLCM) model. Gray Level Co-occurrence Matrix (GLCM) is a method that is often used as a reference to identify images in texture processing (B et al., 2018). The accuracy obtained from the GLCM method used for feature extraction is by secondorder feature extraction (d=2) to calculate the probability of the relationship between pixels that have exactly the same value as the pixel distance (d) and use angles of 0°, 45°, 90 °, and 135°. From the results of extraction with various types of poisonous leaves, for the classification process using the Neural Network method

Materials and Method I. Material A. Shape Features
The extraction used in leaf feature extraction uses six types of features, including:

Slimness
The slenderness value is taken from the ratio of the length and width of the leaf. (1) Where : lp = leaf length wp = leaf width.

Roundness
The roundness value is taken from the ratio between the area of the object and the square of the perimeter. (2) Where : A = leaf area P = perimeter of the leaf.

Diameter
Diameter is the distance that has the longest size between two edge points of the object.
(3) 4. Perimeter Perimeter or also known as circumference is the number of pixels contained in the boundary of the shape. Perimeter value is obtained from the edge detection of image objects.

Large
The calculation of the area value is taken from the number of pixels in an object. Here is the calculation to get the area value. (5)

Wide
Is the longest measure of the line that connects the pixels on the edge of the destination that has a perpendicular line to the object with the maximum length. (6)

B. GLCM
This algorithm is used as an assessment of the textures contained in the 2nd order (Neampradit et al., 2018). The measured value taken on the texture of the 1st order uses a statistical assessment based on the pixel value of the original image.This model has at least five attributes in obtaining a value in an image. of the five attributes include ASM, Entropy, IDM, Contrast, Correlation (Ni'mah et al., 2018). There are four angle directions in GLCM, namely the angle of 0°, 45°, 90°, and 135°. The GLCM direction used in this study uses an angle of 90°. (Figure 1 and Figure 2) 1. IDM Often referred to as a measure of homogeneity which serves to measure the concentration of intensity pairs in the GLCM matrix.

Correlation
It is the value of the dependence of the gray direction to find the neighboring pixels of the image. the formula can be known as follows: Where :

A. Neural Network
Neural Network is a computational model that is almost the same as the structure of a neural network in humans (Liu et al., 2020). Neural network belongs to the category of computing science. Neural network describes the ability to resemble the human brain that can perform a certain process, and the output (output) (Ramdhani et al., 2018). Called a neural network because it is designed to follow the workings of the human brain. Pitts and Mc. Culloch, the founder of the neural network method in 1943, showed a mathematical model that could simplify a process derived from real human brain capabilities.
Information : Signal with vector dimension n T will be amplified by synapse w . From the results of the calculations carried out will be changed by the function f. This function can monitor, if the collection of signal gain shows the appropriate excess limit, then the neuron cell which was initially in a state of "0", will produce a signal output of "1". From the output value (y), the neuron has two categories, namely: "0" or "1". And Neurons are said to be firing when they issue an output value of "1". (Figure 3)

Results and Discussion
For trials in this study, the dataset used for toxic plants in the form of cassava, rubber, amethyst, and castor oil plants. The following is a sample of each poisonous plan. The way the system works is as follows: (Figure 7). In this study, researchers used personal data as data from image extraction results obtained from shape features and the GLCM algorithm, so that the extraction value from the collection of image results Journal Of Development Research, 6 (1), May 2022, Pages 1-5 3 Copyright © 2022, JDR, E-ISSN 2579-9347 P-ISSN 2579-9290 Figure 2. Illustration of the steps of the GLCM method could be determined using the neural network method.

A. Data Collecting
The researcher uses images with two categories of plant species, namely poisonous plants and non-toxic plants as comparisons which have almost the same morphology. Where for the category of poisonous plants there are 3 types of plants and for the category of non-toxic plants there are 3 types of plants, each of which uses 50 images for a total of 300 images. The initial stage after the image retrieval process is to change the white background to remove noise contained in the image and minimize damage during the extraction process. Af-ter changing the background color to white, then changing the image size from the original image size of 3120 x 4160 pixels to645 x 879pixels. The following is an example of an image in the early stages of the process until it becomes a gray image.

B. Data Set
From the shape features and GLCM there are a total of 11 attributes, including: Perimeter, Area, Diameter, Round, Slender, and Width taken from the shape feature. As well as ASM, Energy, Entropy, Correlation and Contrast taken from GLCM.

C. Test
The testing phase is carried out using the RapidMiner application. The result of this test is to know the value of accuracy. The accuracy value obtained from the training data in this trial is 96.19% +/-4.03% (micro: 96.17%). While the accuracy value of the testing data obtained in the amount of 92.22% with AUC value = 0.989. for accuracy results from class precision and class recall are in (table 1) and (table 2).

Conclusion
This study conducted an image processing experiment to classify toxic plant species with a comparison system using non-toxic plant species that have a morphology of leaf shape that is almost the same as poisonous plants.

Suggestion
It is hoped that further research can improve the accuracy of comparisons with various methods or by adding other features to extract images.