GLCM Based Locally Feature Extraction On Natural Image

- GLCM is a feature extraction method that uses statistical analysis using a gray scale. Contrast, correlation, energy and entropy are feature features whose value will be sought as the basis for finding the threshold which can then be used to find the threshold value in image segmentation. In this study, a local-based GLCM method is used where the image that has been made into grayscale will be divided into 16 parts of the same size. Each section will look for the value of its GLCM features, namely Contrast, correlation, energy and entropy. The calculation of these four features will be applied to 16 parts of the grayscale image, which can then be used to find the threshold value. The results of the four features in the calculation with an angle of 0 o are the contrast value = 0.0080, correlation = 0.619, energy : 0.00160 and entropy : 0.05591.


INTRODUCTION
Image segmentation is one of the processes in digital image processing to divide an image into homogeneous pixel groups. One of the tasks of segmentation is to divide an image into groups called foreground and background. The foreground and background extraction process is the first step before starting the matting process on an image [1]. This process has been studied for years using various methods [2], [3], [4], [5], [6]. By doing the right extraction process, it will be easy to separate the foreground from the background.
The right image segmentation method will have a big influence on the alpha matting process because it is in the alpha section that the value of a separator threshold will play its role in separating the foreground from the background. This limit value is called the threshold. Many studies have been carried out on the image segmentation method in alpha matting. J. Wang and MF Cohen conducted a study using the trimap model [5]. Their research refers to the research that has been done by Anat Levin [2], where the researcher gives different colors (scribble) manually as sampling sets and separates them into three parts, namely foreground (F), background (B), and unknown or also known as with alpha (α). The alpha value obtained from the trimap results in a distance from 0 to 1. Then from the resulting information it will be used to predict the known area ( F, B ) with the help of the alpha value. The results obtained from using trimap to separate the foreground and background areas show close to perfect results visually [1]. However, this has a weakness, namely from the level of thickness of the scratches manually in the scribble process requiring a high level of experience from the user and also this will apply more complexly to images with more complicated areas such as falling snow images [7].
Ruri Suko Basuki, Moch. Hariadi, and Ricardus Anggi P. conducted research on segmentation at the threshold value as a substitute for alpha values in image matting using the Fuzzy C-Means algorithm. Threshold is obtained from the average maximum value in the class which has the smallest and lowest middle value among other classes, where the pixel cluster value uses three class concepts in Fuzzy C-Means [8]. Thresholding in method this calculated with method collect clusters in areas that have level same similarity and mutual distance close by with develop level resemblance gray-level from grayish based on inter class and intra class so that separation Among background, foreground andalpha can more perfect.
Success best in method threshold a image picture determined by technique extraction feature from picture the [9]. Wrong one technique extraction feature to image picture is GLCM (Gray Level Co-occurrence Matrix). GLCM is method extraction feature with use analysis statistics with use scala gray. GLCM is method checking statistics texture with consider connection spatial from pixels on a image. As for threshold method on discussion this will used method l local adaptive threshold with hope method this capable produce optimal value in segmentation a image.

RESEARCH METHOD
In discussion this, stages method used are :

Convert the input image to grayscale
Change RGB image to level gray (grayscale) this working for make composition scale color from original image _ have three fruit value (RGB) to worth two ( grey ). Next image scale gray this will processed Becomes image with score scale binary for make it easy search score threshold (value 1 and value 0). Process change image from image of type RGB to Grayscale shape can use matlab order rgb2gray which when write in equality is as following : 0.2989 * R + 0.5870 * G + 0.1140 * B Following is results conversion to grayscale image

Region of Interest (ROI) Process
Process Region of Interest (ROI ) used here use method block processing where image original that has been converted to form grayscale divided into 16 block images that have size same.
Following is results ROI process on grayscale image above :

Process Extraction GLCM Features
Process extraction feature use method Gray Level Co-Occurance Matrix (GLCM) use calculation texture on order two. On order second, relationship betweencouple two pixels image original taken into account [9].
Reading extraction GLCM features taken of the input sub image. In discussion this using 4 features extraction GLCM features are : Contrast, Correlation, Energy and Entropy.

RESULT AND DISCUSSION
For To do process extraction GLCM features, done to all block image of ROI process. Each block have window size 121 x 104 pixels like on figure 2. Wrong one method for represent connection this that is in the form of (1 0, 0), which states connection two pixels aligned horizontally with pixels value 1 followed with pixels value 0. Based on composition that, the amount group pixels that meet connection the calculated. After composition formed then determine intensity pixels based on composition so that generated data as following :  After obtained matrix results summation, step next is normalize values the so that amount worth 1, step normalize this used for remove dependency on ukran image. With method share every score pixels results addition (matrix c) with total value all pixels i.e. 10 then will obtained score new. From calculation GLCM matrix in on step next is start count required GLCM features. On discussion this use four GLCM features, namely : contrast, correlation, energy, and entropy. Four feature the already can produce good GLCM features as data extraction for used in various study about GLCM.
From calculation GLCM matrix above and calculation features used next entered to in dataset calculation and produce values as following :

Contrast
Contrast is size existence variation level gray pixels image could calculated use equality in lower this : Where L is number of levels used in computing, n is amount pixels, i is intensity pixels smallest, and j is intensity pixels biggest.

Correlation
Correlation which is size linear dependence between values level gray in image calculated with use equation 10 like in lower this : where L is number of levels used in computing. n is amount pixels, i is intensity pixels smallest, and j is intensity pixels biggest. Then ′ ′ is the standard deviation for all intensity pixels on GLCM matrix. So that score correlation on direction angle 0 o in on could determined with calculation as following : = 1 -0.040 / standard GLCM deviation = 1 -0.04 / 0.064 = 0.619

Energy
Energy is size intensity from variation a region area is calculated with equation 11 like in lower this : where i is the average intensity pixels in GLCM matrix. So that take example GLCM matrix on Figure 6 can be calculated energy as following : = 0.04 x 0.04 = 0.00160

Entropy
Entropy state size irregularity level gray in in image could calculated use equation 12 like in lower this : the zero value this because example illustration on writing this take example matrix sized small 5 x 5 pixels course. Score entropy very influenced by score other GLCM elements (features). So that from matrix example on picture the could calculated score entropy as following : = -(GLCM installment-installment) x LOG (GLCM installment-installment) = -(0.040) x LOG (0.040) = 0 , 05591 For next on GLCM matrix with direction angles 45 o , 90 o , and 135 o , then the steps same. What makes the difference is on making composition with change direction corner in accordance with degrees calculated angle.

CONCLUSION
Image segmentation is one of the processes in digital image processing to divide an image into homogeneous pixel groups. The function of segmentation is to divide an image into groups called foreground and background.
GLCM (Gray Level Co-Occurance Matrix) is a feature extraction method that uses statistical analysis using a gray scale. The four features used in this GLCM calculation include contrast, correlation, energy and entropy. The results of the four features in the calculation with an angle of 0 o are the contrast value = 0.0080, correlation = 0.619, energy : 0.00160 and entropy : 0.05591.
Furthermore, the results of the four features can be used as a threshold value. By getting the threshold value, it can be used for calculating the threshold value in image segmentation.