## 2 Materials and Methods
### Contrast  
The contrast reflects the image clarity and depth of the grooves in the texture. The greater the contrast, the deeper the grooves. Conversely, if the contrast is small, the grooves are shallow. The contrast is obtained using the following equation:  
\[\text{Contrast}\ =\ \sum_{\text{i,j}=0}^{\text{N}-1}(\text{i}-\text{j})\times \text{P}(\text{i,j}) \tag{1}\]  
Figure 3: The network architecture of GLCM-based BLS. Figure 2: Part of results of normalization. where N \(-\) 1 is the number of gray levels; P(i,j) is the gray-level co-occurrence matrix; i and j are the spatial coordinates of the function. Angular Second Moment (Energy)  
The ASM describes the uniformity of an image's gray distribution. If all the element values of the GLCM are very close, the ASM value will be small. However, if the values differ greatly, the ASM will be large. The ASM is obtained using the following equation:  
\[\text{Energy}\;=\;\sum_{(\text{i},\text{j}=0)}^{\text{N}-1}\text{P}(\text{i}, \text{j})^{2} \tag{2}\]  
Inverse Different Moment  
The IDM reflects the change in an image's local texture. If the textures of different regions of the image are uniform and change slowly, the inverse variance will be large; otherwise, it will be small. The IDM is obtained using the following equation:  
\[\text{IDM}\;=\;\sum_{\text{i},\text{j}=0}^{\text{N}-1}\left(1/\left(1+(\text{i }-\text{j})^{2}\right)\times\text{P}(\text{i},\text{j})\right) \tag{3}\]  
Correlation  
The correlation reflects the consistency of the image texture, and it measures the degree of similarity of the spatial gray-level co-occurrence matrix elements in the direction of a row or column. When the matrix element values are uniform and tend to be equal, the correlation value will be large. Conversely, if the matrix element values differ greatly, the correlation value will be small. The correlation is obtained using the following equation:  
\[\text{Correlation}\;=\;\sum_{\text{i},\text{j}=0}^{\text{N}-1}\frac{(\text{i} -\text{\mu})(\text{j}-\text{\mu})\times\text{P}(\text{i},\text{j})}{\sigma^{ 2}} \tag{4}\]  
where  
\[\text{\mu}=\sum_{\text{i},\text{j}=0}^{\text{N}-1}\text{i}\times\text{P}( \text{i},\text{j}) \tag{5}\]  
\[\sigma^{2}=\sum_{\text{i},\text{j}=0}^{\text{N}01}(\text{i}-\text{\mu})^{2} \times\text{P}(\text{i},\text{j}) \tag{6}\]  
The selected features can distinguish osteoporosis from non-osteoporosis (Tables 1 and 2). The details of using the GLCM method to obtain these features are as follows: \begin{table}
\begin{tabular}{l c c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**d = 1**} & \multicolumn{4}{c}{**Non-Osteoporosis**} & \multicolumn{4}{c}{**Osteoporosis**} \\ \hline
**Angle** & **0°** & **45°** & **90°** & **135°** & **Avg.** & **0°** & **45°** & **90°** & **135°** & **Avg.** \\ \hline Contrast & 4.701 & 3.666 & 2.635 & 3.748 & 3.120 & 3.180 & 5.412 & 4.270 & 5.340 & 4.551 \\ ASM & 0.0180 & 0.0150 & 0.0131 & 0.0148 & 0.0163 & 0.0155 & 0.0125 & 0.0138 & 0.0125 & 0.0136 \\ IDM & 0.5378 & 0.4719 & 0.5220 & 0.4647 & 0.4991 & 0.4831 & 0.3981 & 0.4367 & 0.4007 & 0.4297 \\ Correlation 0.8607 & 0.7892 & 0.8499 & 0.7848 & 0.8212 & 0.8106 & 0.6770 & 0.7451 & 0.6815 & 0.7286 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of the features at displacement distance d = 1 calculated from GLCMs. \begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline \multicolumn{1}{c}{**d = 2**} & \multicolumn{4}{c}{**Non-Osteoporosis**} & \multicolumn{4}{c}{**Osteoporosis**} \\ \hline
**Angle** & **0°** & **45°** & **90°** & **135°** & **Avg.** & **0°** & **45°** & **90°** & **135°** & **Avg.** \\ \hline Contrast & 4.701 & 3.666 & 5.156 & 3.748 & 4.318 & 5.615 & 5.412 & 7.963 & 5.340 & 6.082 \\ ASM & 0.0138 & 0.0150 & 0.0131 & 0.0148 & 0.0142 & 0.0122 & 0.0125 & 0.0109 & 0.0125 & 0.0120 \\ IDM & 0.4416 & 0.4719 & 0.4286 & 0.4647 & 0.4517 & 0.3982 & 0.3981 & 0.3468 & 0.4007 & 0.0386 \\ Correlation 0.7290 & 0.7892 & 0.7060 & 0.7848 & 0.7523 & 0.6672 & 0.6770 & 0.5248 & 0.6815 & 0.6377 \\ \hline \hline \end{tabular}
\end{table}