## 3 Feature Extraction from Dermoscopic Images
### Extraction of Edge Feature Information via Line-Segment-Type Analysis
5 Calculate the parameters required for the classification into two classes: - The probability that a specific pixel belongs to Class 1 \(P_{1}(k)=\sum_{i=0}^{L}p_{i}\) - The probability that a specific pixel belongs to Class 2 \(P_{2}(k)=1-P_{1}(k)\) - The mean of the brightness of pixels in Class 1, \(m_{1}(k)=\frac{1}{P_{1}(k)}\sum_{i=0}^{L}ip_{i}\) - The mean of the brightness of pixels in Class 2, \(m_{2}(k)=\frac{1}{P_{2}(k)}\sum_{i=k+1}^{L-1}ip_{i}\) - The mean intensity up to the intensity level k, \(m(k)=\sum_{i=0}^{k}ip_{i}\) - The global mean of the image, \(I_{T}(x,y)\)\(m_{G}=\sum_{i=0}^{L-1}ip_{i}\) - The global variance of the image, \(I_{T}(x,y)\)\(\sigma_{G}^{2}(k)=\sum_{i=0}^{L-1}\left(i-m_{G}\right)^{2}p_{i}\) 6 Using the between-class variance \(\sigma_{B}^{2}(k)=\frac{\left[m_{G}P_{1}(k)-m(k)\right]^{2}}{P_{1}(k)\left[1 -P_{1}(k)\right]}\), obtain the value of \(k\) for maximizing the variance. 7 Using the optimal value of k calculated in Step 6, derive \(\bar{k}=\frac{k}{\bar{\alpha}}\) using \(\alpha=\frac{m_{G}}{\sqrt{\sigma_{C}^{2}}}\). 8 \(I_{B}^{O}(x,y)\) is the image of the outer-border division through k in \(I_{T}(x,y)\), \(I_{B}^{l}(x,y)\) is the image of inner-border division through \(\bar{k}\) 9 Create edge image \(I_{E}^{O}(x,y)\) of \(I_{B}^{O}(x,y)\) and edge image \(I_{E}^{l}(x,y)\) of \(I_{B}^{l}(x,y)\) 1 Perform an XOR operation on the two edge images to generate the inner- and outer-border edge image \(I_{E}(x,y)\). ```  
**Algorithm 1**Inner and Outer Border Division Algorithm Using Otsu's Algorithm  
\[LTDF= \begin{bmatrix}1&2&4\\ 8&0&16\\ 32&64&128\end{bmatrix} . \tag{3}\]  
The line-segment-type detector filter (LTDF) expressed in Equation (3) is a detector filter, the coefficients of which are composed of values of \(2^{N}\). Furthermore, a convolution operation with the binary edge image generated for edge information extraction was performed with pixel 1 in the image. As an example, Figure 5a shows a partial region in the input image. Table 1 shows the line-segment types that can be classified using the LTDF, and the numbers in Table 1 indicate the unique numbers (eigen-numbers) based on the line-segment type. For the same line-segment type, different eigen-numbers are assigned depending on the position. Meanwhile, general line-segment types, such as vertical, horizontal, and curved, as well as unusual line types such as checkered, are expressed as Pattern \(N\). A total of 19 different patterns were generated, as shown in Figure 6.  
In this study, the values calculated using the LTDF and filtering were set as the eigen-numbers to reduce the visual edge information in the image. At this time, the input dermoscopic image was segmented into regions of the same area based on Equation (4), and the LTDF was applied to each segmented region. The pixel value in the segmented image, which is the value obtained using the LTDF, corresponds to the eigen-number in Table 1.  
In Equation (4), both \(M\)_and_\(N\) denote the size of the input image \(I_{E}(\cdot)\), \(\alpha\) indicates the number of vertical and horizontal segmented regions of equal area, and \(\lfloor\cdot\rfloor\) denotes the floor() function. In this study, a single image is partitioned into 16 regions, and their \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline
**No.** & **Feature** & **No.** & **Feature** & **No.** & **Feature** & **No.** & **Feature** & **No.** & **Feature** & **No.** & **Feature** & **No.** & **Feature** \\ \hline
27 & C & 59 & C & 91 & C & 123 & P-16 & 155 & C & 187 & C & 219 & P-18 & 251 & C \\
28 & P-2 & 60 & P-13 & 92 & P-9 & 124 & C & 156 & P-12 & 188 & P-14 & 220 & C & 252 & C \\
29 & P-3 & 61 & P-14 & 93 & C & 125 & C & 157 & P-14 & 189 & P-18 & 221 & C & 253 & C \\
30 & C & 62 & C & 94 & C & 126 & P-18 & 158 & C & 190 & C & 222 & P-16 & 254 & C \\
31 & C & 63 & C & 95 & P-16 & 127 & C & 159 & C & 191 & C & 223 & C & 255 & F \\ \hline \hline \end{tabular}
\end{table} 
Table 1: \(Cont.\)