## 2 Materials and Methods
### Learning Phase
#### 2.3.1 Feature Evaluation for Class Representatives  
In order to calibrate the system for different features and color channels (corresponding to RoIs) the following set of texture features are investigated [56; 57]: statistical features of order 1 (_Im_, mean intensity), features extracted from co-occurrence matrices (_Con_, contrast; _En_, energy; _Ent_, entropy; _Hom_, homogeneity; _Cor_, correlation; _Var_, variance), fractal type features (_Dm_, mass fractal dimension; \(L\), lacunarity) and _LBP_ type features (_LBP_, histogram of Local Binary Pattern) (Table 1). The mean intensity _Im_ is a statistical characteristic, calculated as the average of the pixel intensity _I_(_i,j_) on different color channels for each box. \(M\times M\) represents the box dimension. The co-occurrence matrix \(C_{\text{d}}\) is computed as the average of eight co-occurrence matrices of dimension \(K\times K\), where \(K\) represents the number of levels in the monochrome image, with a displacement \(d\) and directions at 0, 45\({}^{\circ}\), 90\({}^{\circ}\), 135\({}^{\circ}\), 180\({}^{\circ}\), 225\({}^{\circ}\), 270\({}^{\circ}\), and 315\({}^{\circ}\). For _Con_, _Ent_, _En_, _Hom_, _Cor_, and _Var_, the parameter \(d\) (distance in pixels) is considered as a subscript. For _DFD_ calculation, a 3D configuration is created in order to be covered with boxes of dimension \(r\times r\times s\), where \(r\) is the division factor and \(s\) is the box height \(s=rI_{\text{max}}/M\)[58]. Here \(I_{\text{max}}\) represents the maximum value of the intensity level and \(M\times M\) is the image dimension. Each pixel (_i,j_) from the square \(S_{r}\)(_u,v_) of dimension \(r\times r\) has an intensity value \(I\)(_i,j_) which belongs to a box from the stick of boxes with height \(s\). The maximum value of \(I\)(_i,j_), for \((i,j)\in S_{r}\)(_u,v_), is noted by \(p\)(_u,v_)and the minimum value is noted by \(q\)(_u,v_) (Table 1). It can be considered that \(n_{r}\)(_u,v_), which is the difference between \(p\)(_u,v_) and \(q\)(_u,v_), covers the 3D relief of the monochrome image created by \(S_{r}\)(_u,v_) and \(I\)(_i,j_), for \((i,j)\in S_{r}\)(_u,v_). Therefore, \(\sum\limits_{u}\sum\limits_{v}n_{r}(u,v)\) covers the entire configuration created on the monochrome image \(l\). Next, the _DFD_ algorithm is similarly with the standard box counting algorithm. The lacunarity, which characterizes the homogeneity and gaps, is a powerful tool in medical image classification and it is also a fractal type feature [59]. The lacunarity can be considered as a complementary feature because it can differentiate between two textures of the same fractal dimension. A high value of lacunarity shows that the texture has many holes and great heterogeneity. Figure 4: Block diagram for the learning phase. Another feature successfully used in texture classification is the _LBP_ histogram. For each pixel, a neighborhood of dimension \((2h+1)\times(2h+1)\) is considered. The contour of the neighborhood is of \(8h=n\) pixels and the texture defined in the neighborhood of the central pixel is described as a vector of elements  
\[V_{\text{T}}=[v_{\text{C}},v_{1},v_{2},\ldots,v_{n}] \tag{3}\]  
where \(v_{\text{C}}\) represents the value of the central pixel \(p_{\text{C}}\) and \(v_{1}\), \(v_{2}\),..., \(v_{n}\) are the values of its neighbors \(p_{1}\), \(p_{2}\),..., \(p_{n}\) (\(p_{1}\) is the pixel from upper left corner of the neighborhood). The neighborhood pixels are tested clockwise. Based on the type of difference obtained (negative or positive) between the central pixel \(v_{\text{C}}\) and each neighbor (3), defined in \(V_{\text{T}}\), the _LBP_ code [59] can be computed as a sequence of binary numbers (by concatenating the result of each difference), as described in Equation (4). \[d(v_{\text{C}},v_{k})=\left\{ \begin{array}{ll}0,&\text{if}\quad v_{\text{C}} -v_{k}\geq 0\\ 2^{k-1},&\text{if}\quad v_{\text{C}}-v_{k}<0\end{array} \right. \tag{4}\]  
After computing the binary format, the _LBP_ code is converted to decimal format (Equation (5)).