Image processing for snake indentification based on bite using Local Binary Pattern and Support Vector Machine method

False identification snake bite from observation of visual features is a dangerous thing, because if it is get wrong in handling of first aid against poisonous snake bites, it would be result in death. In Indonesia there are 348 types of venomous snakes, of course with a very large number of it must be wary if bitten by snake. In general, ordinary people with snake bite patterns will panic and do not know what to do for first aid if they are bitten by snake. Even a doctor can be wrong in identifying snake bites. Difficulty of identifying snake directly, then made an Image Processing System for Identification snake bite using Local Binary Pattern and Support Vector Machine method that helps identify and classify snakes automatically. This system classifies venomous and non-venomous snake based on its bite pattern image using two methods ie Support Vector Machines(SVM) and Local binary Pattern(LBP). Final result from this research yielded 89% accuracy with P=8, r=1 for LBP and C=1, Ϭ=0.15 for SVM using the RBF kernel. The dataset used has 28 data, the data divided into 19 training data and 9 test data.


Introduction
Snakes are one of dangerous reptiles that are divided into 2 groups, namely venomous and nonvenomous snakes. If bitten by a poisonous snake, it can cause local poisoning, hypotension, paralysis, blood clotting disorders, and even death [1]. Antivenom is the only sure therapy for handling snakebites [2]. However, in one type of antivenom that is given cannot neutralize all the toxins, so this creates a further risk to human health, making identification of snakes an important problem [3]. Snakes can be identified by looking at the shape of the head, scales and teeth [4]. To distinguish venomous and non-venomous snakes can be seen from the bite pattern. Figure 1 is example of picture bite pattern.
It is difficult to identify snakes by observing visual features directly, so Alex James [3] conducts research by building a system that processes images to identify these problems. The system is "Snake Classification from Images". The system classifies snakes based on snake body image seen from 4 perspectives: upper, side, bottom and body [3]. The system built demonstrates the use of taxonomic features in the classification of snakes with the nearest neighbor classification, the system uses a snake image database and is converted to extract the taxonomic base features of snakes [3].
Based on research that has been done using snake body image, then in this study a system was built that classifies venomous and non-venomous snakes based on the image of snake('s) bite patterns. The method used is Local Binary Pattern (LBP) for feature extraction and uses the Support Vector

Literature review 2.1. Related research
In 2017 Alex James thought that it was wrong to identify snakes directly was the reason for death from snake bites, and so far no automatic classification method was proposed to distinguish snakes by describing the taxonomic features of snakes. So he created a system for the classify of the snakes automatically based on the body image of snakes seen from 4 perspectives: top, side, bottom and body. The system built demonstrates the use of taxonomic features in the classification of snakes that develop product similarities to the nearest neighbor classification, the system uses a snake database and is converted to extract taxonomic base features and generate snake data [3]. The highest accuracy result in this paper is 86.46%.
The other research conducted by Adiyasa and the team in 2016 on cancer detection based on miccroarray data classification using PCA and modified back propagation (MBP) resulted in the highest accuracy of PCA + MBP, which is 76% -97% and PCA + BP which was 83-97% , this shows that cancer or disease can also be classified and studied [19]. Warih Maharani and the team in 2013 conducted a study entitled Degree Centrality and Eigenvector Centrality in Twitter, in this study using eigenvector to observe the effect of centrality value for twitter data, and the results using vector calculations in this case the eigenvector managed to produce good results [20] In addition, the book written by Adiwijaya entitled Application of Matrix and Vector Space, is written that the implementation of a matrix or vector can be made into an application using Matlab [21]. This shows that SVM which is a vector calculation can be implemented using Matlab.
In a study entitled The Multiple Watermarking on Digital Medical Image for Mobility and Authenticity written by Adiwijaya and the team, research on the authenticity of digital medical or health-related photographs [22]. In this study using multiple watermarking, and the results of this study show good results, because the authenticity of the image can be detected. Based on the research, it was found that the pattern of snake bites could be detected and classified.

Research methodology
The thing that will be done on this system is starting with the image input, then the image is converted into a grayscale image, after that the image enters the pre-processing stage. In the pre-processing stage, morphology is carried out, namely erosion and dilation. The erosion process is done by reducing the pixels on the contour of the object with a 3 × 3 element structure that has a value of 1 whose function is to eliminate the noise in the image, the noise is a pixel that is white but not an object of that image, this process causes pixels the object becomes thinner. Whereas dilation is processed by adding pixels to the object's contours according to the 3 × 3 element structure which is 1 to thick the pixels of  3 objects that have been thin due to the erosion process, resulting in an image output with more focused pixel objects. The next process in pre-processing is segmentation. This segmentation process, using watershed segmentation, aims to find out the parts of the snake bite pattern, so that it can differentiate venomous and non-venomous snakes based on the bite pattern image.
After the pre-processing stage is carried out, the next is feature extraction using LBP, the end result of which is a characteristic of the image input in the form of a histogram, which is then represented as a 1 × n matrix. with the values generated in the normalized feature vector into the range 0-1. And finally the classification with the SVM method uses the RBF kernel. For more details, figure 2 is a flowchart or flow chart of this system.

Experiment and analysis 3.1.1 System testing.
System testing is done to find the value of the best parameters so as to produce an optimal system. Table 1 below shows the scenario in system testing. And the results of this scenario will be analyzed.  In table 2 above shows that the sampling point P and radius R is very influential for the classification results using LBP because different P and R can produce different of accuracy values. The higher P and R values are very influential for the results of feature extraction, because the more number of sample points taken, then the more points are tested, which ultimately results in errors in classification.

Testing the parameters C and Ϭ on SVM against the classification results
The test of the sigma value parameter (Ϭ) was done to determine which scenario got the best results for the sigma parameter values 0.15, 0.6, 0.638, 0.65 and 1. With the parameter value P = 8, R = 1, C = 1. While testing the parameter value C is done to find out which scenario gets the best results for sigma parameter values of 0.98, 1, 5, 10 and 50. With the parameter value P = 8, R = 1, Ϭ = 0.15. In table 3 shows the results for testing the sigma value (Ϭ), indicating that if the greater the sigmata value the smaller the accuracy level. This happens because the sigma value affects the calculation of kernel values which later affect the calculation of alpha (α) and the value of the bias, to distance the distance of the hyperplane.
In table 4 shows the results of testing the value of C, it can be seen in the table, that the greater the value of C, the lower the accuracy, this occurs because the value of C affects the size of the penalty due to errors in data classification, and also affects the determination of alpha values ( α) and alpha (α) have an effect on the bias value to calculate the margin, the smaller the value of C, the wider the margin and the many supporting vectors will be in the margin or the margin will come out, the smalle r the value of C, the margin will be narrower and there will be a vector support on margin or out of margin.
For the determination of sampling points for P and R, it is recommended to take a sample point P = 8, because by taking a sample point with a value of 8 errors in classification becomes reduced. In addition to the sigma value (Ϭ) it is recommended not to take the value too small or large because it affects the calculation of the bias value and class determination. To take the value of C, it is recommended to do not to take too large a value because if it is too large, a lot of the results of determining the wrong class.

Conclusions
Based on the research that has been done, it can be concluded, that the taking of the sample point P and radius R is very influential on the feature extraction process using LBP on the classification results. For SVM using the RBF kernel the sigma value (Ϭ) affects the distance to calculate the hyperplane and the value of C affects the distance of the margin. Image data that has images with wrinkled or hairy skin or bruising on the bite or wound area that is still not dry and blood clots on the bite marks causes classification errors, errors in this classification because the system incorrectly detects snake bites, which should not snake bites but the system detects it is a snake bite resulting in poor accuracy. Conversely, if the image data does not have an image with the conditions previously explained, the system detects and classifies the image correctly. The results of this final project research obtained the highest accuracy of 89% with a value of P = 8, R = 1, C = 1, Ϭ = 0.15. With 89% accuracy, it can be said that the system is good at recognizing the bite of a poisonous and nonvenomous snake.