## 5 Methods
### Hadcrafted Feature Extraction  
Manual extraction of skin lesion features takes its cue from the ABCDE rule used by dermatologists in clinical practice. The main operations used for the extraction of skin lesion features are: calculation of area, perimeter, major and minor axis length, eccentricity, wavelet invariant moments, and symmetry maps for shape features; calculation of mean, standard deviation, variance, skewness, maximum, minimum, entropy, 1D or 3D color histograms, and autocorrelogram for color features; and calculation of gray-level co-occurrence matrix (GCLM), gray-level length matrix (GLRLM), local binary patterns (LBP), and wavelet and Fourier transforms for texture features. Typically, features extracted from images--after undergoing a selection procedure--constitute the new dataset to be classified. The most commonly used classifiers in dermatology are SVM, K-Nearest Neighbors (KNN), Linear Discriminant Analysis (LDA), and Multilayer Perceptron (MLP) [49; 50; 51]. The injection of manually extracted features within a neural network, which already extracts features from images, is still a new and untried approach. In the present work, the handcrafted features considered are only texture features since to extract shape features it is necessary to segment the lesion (an operation deliberately not performed in this work) and, from our practical experience, the color features are already largely captured by the developed CNN. This last statement comes from the  
Figure 1: Block diagram of proposed method. results obtained by performing, upstream of neural network training, a color normalization operation on dermoscopic images. The classification performance of melanomas obtained in this situation is poor in general and comparable to that achieved by not performing any preprocessing of the images (see section 6). In the context of automatic skin lesion diagnosis using ML and DL algorithms, the most widely used texture features are GLCM and LBP; these features are briefly described below. **GLCM**: Gray-level co-occurrence matrices are one of the earliest techniques used for image texture analysis and were proposed by [PERSON] et al. in 1973 [52]. A co-occurrence matrix, also known as a co-occurrence distribution or gray-level spatial dependence matrix, is a statistical method of image texture analysis that considers the spatial relationship of pixels. It is defined on an image as the distribution of co-occurring values at a given offset and represents the distance and angular spatial relationship over a subregion of the image of specific dimensions. A GLCM is created from a grayscale image and characterizes the texture of an image by calculating the frequency with which pairs of adjacent pixels occur with specific intensity values \(i\) and \(j\), and in a specified spatial relationship. The spatial directions, i.e., the directions of analysis, are: horizontal (0\({}^{\circ}\)), vertical (90\({}^{\circ}\)), and diagonal (\(-45^{\circ}\) and \(-135^{\circ}\)). Given an image \(I\), a random spatial position (\(h\),\(k\)), and the offset (\(\Delta_{x}\),\(\Delta_{y}\)), the co-occurrence matrix is expressed as:  
\[G_{i,j}=\sum_{h,k} \begin{cases}1,&I(h,k)=i,&I(h+\Delta_{x},k+\Delta_{y})=j\\ 0,&otherwise\end{cases}  \tag{1}\]  
After creating GLCMs, it is possible to derive several statistics from them that provide information about the structure of an image (not the shape, so not the spatial relationships of pixels in an image). These properties [53], shown in Table 2, can be computed over the entire matrix or by considering a window that is moved along the matrix. \begin{table}
\begin{tabular}{c c} \hline
**Statistic** & **Equations** \\ \hline Correlation & \(\sum_{i,j}G_{i,j}\bigg{[}\dfrac{(i-\mu_{i})(j-\mu_{j})}{\sigma_{i}\sigma_{j}} \bigg{]}\) \\ \hline Homogeneity & \(\sum_{i,j}\dfrac{G_{i,j}}{1+(i-j)^{2}}\) \\ \hline Energy & \(\sqrt{\sum_{i,j}|G_{i,j}|^{2}}\) \\ \hline Contrast & \(\sum_{i,j}G_{i,j}(i,j)^{2}\) \\ \hline Dissimilarity & \(\sum_{i,j}G_{i,j}|i,j|\) \\ \hline \end{tabular}
\end{table}