## 3 Feature Extraction from Dermoscopic Images
### Extraction of Edge Feature Information via Line-Segment-Type Analysis  
To perform high-precision analysis of visual characteristics in skin lesions, we used edge detection methods that can extract features from small internal areas, rather than the typical contour processing methods. Figure 2 shows the borders of a skin lesion. The outer-border (OB) represents the border between the normal skin region and the lesion, and the inner-border (IB) inside the lesion represents the border information in the center of the lesion. Since conventional edge detectors identify edge features for strong line segments regardless of the location of the skin lesion in the outer or inner borders, small areas in the IB tend to be removed, which results in reduced accuracy in feature analysis. Therefore, in this study, when detecting the edge information of a skin lesion, the brightness was removed to differentiate the OB and IB of the lesion. In general, lesions show a weaker intensity (darker) than normal skin regions, and a threshold value for removing areas other than the lesion can be calculated using Equation (1). \[ \begin{split} q1&=\text{MIN}(I)+\left(\sqrt{\frac{ \sum I(x,y)^{2}}{N\times M}-\left(\frac{\sum I(x,y)}{N\times M}\right)^{2}} \right)\\ q2&=\text{MAX}(I)-\left(\sqrt{\frac{\sum I(x,y)^{2 }}{N\times M}-\left(\frac{\sum I(x,y)}{N\times M}\right)^{2}}\right)\end{split}  \tag{1}\]  
\(I(x,y)\) in Equation (1) denotes the intensity of the image at position \((x,y)\) of the dermoscopic image, and \(N\times M\) indicates total number of pixels, which represents the size of the image. After calculating the minimum and maximum values of the \(I(x,y)\) pixel of the input dermoscopic image, the lower and upper threshold values (\(q1\)_and_\(q2\), respectively) are generated using the standard deviation of \(I(x,y)\). The values of \(q1\)_and_\(q2\) are set to be similar to the mean pixel value by adding the standard deviation to the minimum value and subtracting the standard deviation from the maximum value. Figure 3a presents the skin lesion image and Figure 3b presents the histogram of Figure 3a. In Figure 3a, the normal skin appears brighter than the lesion and belongs to the uppermost section of the histogram, whereas the darker region in the lesion belongs to the lowest section of the histogram. Using the threshold range \([q1,q2]\), the uppermost and lowermost regions of the input image can be removed using Equation (2). Figure 2: Examples of border features; (**a**) original image, (**b**) border feature. Based on Equation (2), if the pixel value of \(I(x,y)\) is within the threshold range \([q1,q2]\), then the original brightness value at the corresponding position is assigned; if the pixel value is out of the range, then it is set to 0, and the threshold image \(I_{T}(\cdot)\) is generated. Consequently, the OB and IB of the lesion are clearly revealed as the normal skin region, and the regions showing low brightness inside the lesion are removed, as shown in Figure 3c. Figure 3d presents the histogram of \(I_{T}(\cdot)\), which is an image with the threshold range values applied. As shown, the uppermost and lowermost regions have been removed in the histogram. \[\mathrm{I}_{T}(x,y)=\left\{ \begin{array}{cc}I(x,y)&\text{if }I[x,y]\;\text{ \emph{exists in }}[q1,q2]\\ 0&\text{otherwise}\end{array} \right.. \tag{2}\]  
[PERSON]'s algorithm [30] was applied to \(I_{T}(\cdot)\) in Figure 3c, where some regions of brightness were removed via thresholding, and the IB and OB were extracted. [PERSON]'s algorithm is a method for dividing an object region in an image. Using a histogram, the algorithm allows the intensity to be calculated to achieve the most optimal classification of the image into two classes. Algorithm 1 is a method of detecting IB and OB regions based on [PERSON]'s algorithm. The optimal intensity \(k\) is calculated using [PERSON]'s algorithm.