## 2 Material and Method
### Gray Level Co-Occurrence Matrix
An explanation of how the GLCM is used to describe the relationship between pixels in meat texture images can be found in the researcher's analysis of the GLCM computational stages. For example, \(I\) is a grayscale image with a size of \(M\times N\). The specified distance and direction are \(d\) and \(\theta\), respectively. GLCM \(G\) with a size of \(K\times K\) (where \(K\) is the number of gray levels in the image) is calculated by matching each pair of pixels with a specified distance and direction. The general equation for GLCM elements is  
\[G_{ij}(d,\ \theta)=\sum_{m=1}^{M}\sum_{n=1}^{N}\delta(I_{mn},i)x\ \delta(I_{m+\delta_{x}}),\ (n+\delta_{y}),\ j \tag{6}\]  
where  
* \(G_{ij}(d,\ \theta)\) is the GLCM element for the intensity pairs \(i\) and \(j\) at a distance of \(d\) and a direction of \(\theta\). * \(\delta\) is the Kronecker delta function, with a value of 1 if the values in it are the same, and 0 if they are different. * \(I_{mn}\) is the pixel intensity at the coordinate \((m,n)\) in the image. * \(\delta_{x}\) and \(\delta_{y}\) is the shift in direction that determines the distance. This process is repeated for each pair of pixels at the specified distance and direction, resulting in a complete GLCM. The GLCM can then be used to extract various texture features, which are useful for further analysis. The different stages of GLCM computation are as follows:  
1. Direction and Distance Selection Determining direction and distance has important meaning since it affects the measurement of the relationship between pixels. This affects the texture information extracted from the image. 2. GLCM Calculation Counting the occurrence of a pair of pixel intensities at a given distance and direction is necessary to calculate the GLCM. The final product is a matrix that displays the frequency of certain pairs of pixels that appear together. 3. Matrix Normalization Matrix normalization is applied to determine the probability distribution of the occurrence of pixel pairs. This probability distribution can calculate the probability of a pair of pixels occurring in the entire image size. 4. Feature Extraction from Matrix Normalization  
Figure 4: GLCM: (**a**) horizontal, (**b**) vertical, and (**c**) diagonal images of fresh meat types and their histograms. After normalization, various texture properties, including energy, contrast, correlation, homogeneity, and entropy, can be extracted from the matrix. Each element offers different details of the texture characteristics of the image. 5. Texture Statistics and Characteristics  
Energy calculation can be used to ascertain the extent to which pixel intensity approaches a certain value. The difference in intensity of neighboring pixels is called contrast. The degree of correlation between pixel brightness in a given distance and direction is reflected in the correlation. The degree of uniformity of pixel intensity distribution throughout the image is called homogeneity. The degree of uncertainty in the pixel intensity distribution is measured by entropy. Following this procedure will produce a set of attributes to identify or describe a meat texture image more accurately. This method has several benefits in pattern recognition and image analysis, especially in image processing for the identification and classification of meat types. Based on the classification of meat type texture images using k-NN, Haar wavelet, and GLCM approaches presented in (Figure 5), The k-NN, Haar Wavelet, and GLCM methodologies can be used to identify the different stages and procedures in classifying texture images of various types of meat. Color images of different types of beef are converted to grayscale as an initial step in the processing procedure. Image decomposition using Haar wavelets with smoothing and reduction on lines and columns is the second feature extraction stage using GLCM and Haar wavelets. We create four images: HH (detail components), LH, HL, and LL (estimated).