Different Types of Beef And Pork Using Histogram Texture Anda K-Means Clustering Method

The largest source of protein needed by the human body comes from meat. Basically a high number of buyers and beef is much more expensive than other meats giving chances to irresponsible parties to mix beef with pork, In the Islamic religious teachings, pork is forbidden because consuming pork there is a physical, psychological and very easy to be contaminated by bacteria. Humans have the limitation of identifying beef and pork manually using the senses of human vision are still many weaknesses and less effective. In this research, meat image extraction applies histogram and clustering by applying K-Mean. By applying this method is expected to help to group the image of meat with a high degree of accuracy.


INTRODUCTION
Meat is the main protein sources of human, there are various kinds of meat to consume like beef, goat, pork and fowl [1].However, beef has high enough protein that's why most people consume it.From those various kinds of meat, beef is one of the most expensive ones, by this situation many butchers have an idea to do deceitful way by changing beef with pork to get more profit because the texture and color are somewhat similar.In the Islamic religious teaching pork is forbidden because there are physical, psychological harm and easy contaminated by bacteria.Alquran is Moslem scripture directly sent by Allah Subhanahu Wata'ala and revealed by prophet Muhammad through Jibril using the Arabic language.Alquran is the last revelation from Allah SWT as the guidelines for Moslem people in the world.Recommendation of Islamic people about nutrient consumption lead to physical hygiene and guarantee the health.This was discussed 4 surahs (chapter) forbid pork in Alquran and the importance of physical and psychological harm to consume pork because pork is very easy contaminated by bacteria.Proof of its harm has found in many laboratory types of research.So, those researches proof to not consume pork because of its harmful [1].Because the cheap price of pork and the amount of beef consumption, make many butchers taking advantage by mixing beef with pork to get more profit.According to that case, the consumer should know how to differentiate which one is beef and pork by using the newest technology.Today, there are many application with high technology to introduce pattern, document classification, economy study, digital image processing [2].By using application of digital image processing we can make our own computer like human vision which is able to different things around, so this can help people to differ beef and pork.By using K-Means method and feature of histogram texture would be more effective to optimize data collecting and producing a picture.We can collect the data by its characteristic in clustering method, object with dominant similarity level closer to another object so it belongs to the same cluster.K-means method is clustering that makes data partition in one cluster or more based on the distance to centroid.There are many methods used to classify image and identify its cluster which uses Kmeans method.By using K-means algorithm the cluster classification would not be hard to do and the opportunity of success [2], besides for processing digital image of K-means algorithm, this also used for making applications like introducing pattern until medical application.According to its proof K-means algorithm used to monitor students' academic score, evaluate the performance of the university by formula different space Euclidian [3,4,5].Feature extract method of histogram texture is a static method to get texture feature.The excellence of the texture feature method of histogram texture is very useful to know the limitation to determine the background of the object and to determine the percentage of intensity texture composition as image identification [6,7,8].There are some feature in this method, such as deviation, energy, skewness, average intensity, smoothness and entropy [5,9,10].

RESEARCH METHOD
This research was starting with collecting some online journals and materials which reviewed K-means and histogram texture feature about pork and beef image.The activity happened to support this research after all the materials have been got.Later, this research needed data set as supporting sample.The data of meat image found by buying beef and pork, after obtained meat image data then continue the process to change image data into data needed in this research [11,12].

Image Data Source
This research will use meat image data like beef and pork obtain, then the data will be processed to change image data into data needed in this research.Pork image Market Kobong, Semarang 50 a research source.2. Using the texture feature extraction method of beef and pork image by histogram base later it would get texture feature data in form of deviation, energy, skewness, average intensity, smoothness, and entropy.3. The next is processing clustering with K-means clustering.4. Then it would be identified the kinds of beef and pork from image data result have processed before.

Extraction result data
In the extraction result which obtains a feature of deviation, energy, skewness, average intensity, smoothness and entropy into numeric data will be used to count K-means algorithm method with Euclidean Distance count for beef and pork clustering in order to be identified soon [14,15].

Proposal
There are some procedure and method applied in this research to finish the recent problems.In clustering beef and pork, the researcher applied some methods they are image normalization method, feature extraction method, a classification method, and Davies Bouldin Index by combining the fourth method and some procedures which can solve the problems.
Here are some procedures: In this research, there are 3 application methods used, the first is the image normalization method, it is original data of pork and beef image changed into greyscale form with 400xx400 pixel resolution.
The second method is the feature extraction method, by applying feature extraction based histogram to obtain deviation, energy, skewness, average intensity, smoothness, and entropy.The third method is K-Means algorithm method to clustering pork and beef image that has run through both methods before able to identify.

DISCUSSION AND RESULT
This research used data of raw pork and beef which is not yet processed, there are 100 data with resolution 400x400 pixel obtained from direct butcher in traditional market, it took process taking an image in order to get data into meat image data.Some image data has been used are beef with label 1 as 50 data and pork with label 2 as 50 data.Then, the whole data through normalization and cropping or picture cutting with Adobe Photoshop.All the data are 100 images will use as data training and data testing with 50 data with label 1 and 50 data with label 2.
3.1.Pre-processing The first image data would run into pre-processing later it would be used to obtain data in this research.In the beginning, the image is in the cropping process into RGB image with 400x400 pixel resolution with the beef image as 50 data and pork image as 50 data.Then, the image will continue to normalization process into greyscale.Because in the method of Histogram Feature Texture extraction needs greyscale to look for the greyscale value that is average intensity or mean.with Euclidean Distance formula.The first step in clustering K-means algorithm is to make sure how much cluster amount.In this opportunity, there are 2 groups of the cluster.Whereas in every centroid defined randomly.The example of pork and beef image texture feature extraction result with 100 data set from table 1, which will define the centroid.Here, centroid will use to count clustering K-means algorithm method with Euclidean Distance formula can be seen on table 2 as follows: From distance count iteration 1 above get result in table 3., cluster is determined from the lowest value between the first center spot (D1) and the second center spot (D2), next group value can be defined from cluster value comes from which one is center spot, for example, cluster value comes from the first center spot value (D1) it means that group value has value 1, conversely, if cluster value comes from the second center spot value (D2) so the group value is 2. In a group, value 1 means beef label and value 2 is pork label, however, group value is still temporary until the new centroid value is equal with the old centroid value, so the group value will become final value from counting then do the counting until old centroid is equal with the new centroid.

Davies Bouldin Index
After counting clustering K-means algorithm with Euclidean Distance formula so the next process is counting distance formula validity by using Davies Bouldin Index.Step to count it as follows: a. Find out SSW  = 1  ((1, 1)) + (2, 1) + (3, 1) + (4, 1) + (5, 1) + ⋯ + ( , , ) Where m is number of class in every iteration and d is the total summary of all classes.
b. Find out SSB Where SBB is root from summary from centroid c.Find out R  = 1 + 2  Where R is the result of summary from SSW then divided by SSB

CONCLUSION
This research shows how high the percentage accuracy from seeking of Euclidean Distance formula in clustering K-Means method to differ raw meat, in order to identify beef or pork, through histogram texture feature extraction, so can be concluded that Euclidean Distance as distance seeking formula can be used in further research.The more formulas applied, the more apparent different from every image.By using result 6 features such as average intensity, deviation, energy, skewness, smoothness, and entropy can be processed by applying many methods, one of them is K-means clustering.The high method has been applied is 65%.Suggestion for the further researcher related to this research are: a) Using more sample data, whether they give effect to the accuracy result or not.b) Addition kinds of meat to know whether the result of distance seeking formula will be different or not.c) It can be developed into a system in order to be more useful for users.

Figure 3 .
Figure 3. Research method has been applied Original data of beef and pork for clustering image beef and pork Normalization of pork and beef original image Pork and beef image feature extraction Result of Clustering Data texture feature extraction Test of Algorithm accuracy result Pre processing RGB image into greyscale and cropping image into 400x400 pixel Classify the data that has been feature extracted using K-means method clustering Euclidean Distance count Result of Pork and beef image clustering Using histogram texture feature extraction method an then obtain Average Intensity, Deviation, Energy, Skewness, Entropy and Smoothness

Figure 4 .
Figure 4. RGB image and image normalization into greyscale

From 5 Figure 5 .
Figure 5. Implementation on system

Table 2 .
The example of extraction result pork and beef image texture feature

Table 2
From example the result of pork and beef image texture feature with 100 dataset in table1and centroid data on table 2 has been determined would be used to define D spot (center spot) in clustering K-means algorithm count by Euclidean Distance formula.After counting by using Euclidean distance formula, the result as in table 3:

Table 3 .
The result of counting Euclidean distance in the first iteration

Table 4 .
The result of summary from SSW then divided by SSB