## 2 Materials and Methods
### Feature Extraction
#### 2.4.2 Texture Features  
The method of extracting masks from the images is helpful for the next feature extraction techniques. With the thresholding techniques and the creation of masks, matrices were created that contain exclusively the mass and exclusively the background. The matrix that contained the mass was created by inserting the value of the initial image if the pixel was above the threshold value, and the value of the initial image was ignored if it was below the threshold value. The opposite procedure was followed in order to create the background matrix. The process of extracting texture features is performed indirectly with the image. These features need a gray-level co-occurrence Matrix (GLCM) to be extracted. A GLCM matrix has lines and columns equal to the gray levels of the image. That means if an image has 256 gray levels, the dimensions of the GLCM matrix will be 256 \(\times\) 256. Each element of the table represents the combination of the row and the column of it. A GLCM matrix usually has large dimensions, and this is why much temporary data are stored, i.e., a 256 \(\times\) 256 for each image. Such a matrix is very sensitive to extracting texture features. The gray levels of an image are usually decreased because of the large dimensions and sensitivity of a GLCM matrix. The composition of a GLCM matrix is described in Figure 5 for four gray levels. By scanning, from left to right, the image from which the GLCM matrix is generated, which means a degree of 0\({}^{\circ}\), the upper left element of the GLCM matrix fills with the number of times that the combination 0,0 occurs. This indicates how many times a gray level 0 pixel (neighbor pixel) is to the right of another gray level 0 pixel (reference pixel). If the degree of creating the GLCM matrix is different, i.e., 45\({}^{\circ}\), then the upper left element of the GLCM matrix will fill with the number of times that the combination 0,0 occurs; however,  
Figure 4: Mass segmentation. it would indicate how many times a pixel with gray level 0 (neighbor pixel) is diagonally at the upper right of another pixel with gray level 0 (reference pixel) [39]. The MATLAB command \"graycomatrix\" was used for the creation of the GLCM matrix with a degree of 0\({}^{\circ}\)[37]. Extraction of Texture Features  
The features that were extracted with the help of the GLCM matrix were homogeneity, correlation and energy of the mass. The application of the GLCM matrix was performed on the mass mask of every image. For the contrast between the mass and the background, the GLCM matrix was not used [40]. The MATLAB command \"graycoprops\" may be applied for the extraction of homogeneity, correlation and energy [37]. Alternatively, the following functions may be used [41]. For homogeneity, the function is:  
\[homogeneity=\sum_{i,j=1}^{n}\frac{p_{ij}}{1+(i-j)^{2}} \tag{4}\]  
where \(p_{ij}\) is the element of the GLCM matrix at row \(I\) and column \(j\), and \(n\) is the maximum value of the gray levels. For correlation:  
\[correlation=\sum_{i,j=1}^{n}p_{ij}\frac{(i-\mu_{i})\big{(}j-\mu_{j}\big{)}}{ \sigma_{t}^{2}} \tag{5}\]  
where \(\mu_{k}=\sum_{ij}k\cdot p_{ij}\) and \(\sigma_{k}^{2}=\sum_{ij}p_{ij}(i-\mu_{k})^{2}\). For energy:  
\[energy=\sum_{i=1}^{n}\sum_{j=1}^{n}{p_{ij}}^{2} \tag{6}\]  
The extraction of the contrast between the mass and the background is performed with the help of the masks and without using the GLCM matrix. It was based on [PERSON]'s law, where the ratio of the background and interest point difference intensity to the background intensity is constant [42]. The function is as follows [43]:  
\[contrast=\frac{I_{b}-I_{f}}{I_{b}} \tag{7}\]  
where \(I_{b}\) is the intensity of the background, and \(I_{f}\) is the intensity of the interest point. For the intensity of the background and the interest point to be found, the background and interest point mask were used, respectively.