# A Dermoscopic Inspired System for Localization and Malignancy Classification of Melanocytic Lesions
## 2 Methods
### Extraction and Classification of Features  
#### 2.2.1 Color Features  
The role of color in dermoscopy is inevitable. The most important chromophore of the skin is melanin. Lesions which are benign exhibit one or two colors. Since the malignant lesions are localized within the deeper structures of the skin, they tend to exhibit three or more colors. To study the color properties of the lesions, six groups of features were computed namely, color asymmetry, color similarity index, color entropy and statistical color features (i.e., color co-relation coefficient, principal component analysis and color entropy). The statistical color features are derived specifically for two categories: (i) region of interest (ROI) (ii) between ROI and non-ROI (NROI). The color features are delineated as follows:  
The color asymmetry and color similarity index draw their inspiration from the ABCD rule of dermoscopy. The color asymmetry is quantified by the difference between the opposite halves of the lesion along \(x\)-axis (\(Cx_{1},Cx_{2}\)) and \(y\)-axis (\(Cy_{1},Cy_{2}\)). The perceived color difference \(\Delta E\) is calculated in the CIE \(L^{*}a^{*}b\) color space as given in (9). The four halves are divided as indicated in Figure 5. Correspondingly, four asymmetry indices are computed as given in (2).  
\[\begin{split} Cx_{1}&=\Delta E_{1}-\Delta E_{3}\\ Cx_{2}&=\Delta E_{2}-\Delta E_{4}\\ Cy_{1}&=\Delta E_{1}-\Delta E_{2}\\ Cy_{2}&=\Delta E_{3}-\Delta E_{4}\\ \end{split} \tag{2}\]  
A set of four color asymmetry indices were computed.  
Color similarity index indicates the presence of six suspicious colors in a lesion (light-brown (LB), dark-brown (DB), black (K), white (W), red (R) and blue-gray (BG)). The color similarity index is computed by computation of the Euclidean distance between the lesion RGB values and corresponding six suspicious colors. The color of the lesion pixels is used to determine the color similarity index and hence the lesion masks are used for computing the color similarity index. The color similarity index and Euclidean distance are inversely related as given in (3).  
\[\begin{split} Euclidean\ Distance\ \propto\ \frac{1}{Color\ Similarity} \end{split} \tag{3}\]  
The Algorithm 1 summarizes the steps used for calculating the color similarity score. The threshold \(Th\) is determined from the RGB values of two opposite colors [9]. The two opposite colors are black and white. Further, a score of 1 is assigned if more than two percent of the lesion area has suspicious color.  
Figure 5: Color asymmetry calculation: (**A**) dermoscopic image; (**B**) the four halves of ROI.  
The color variance is computed considering the red, green, blue and gray-scale values for the lesion along with the entire image, thus resulting in computation of eight features (VR, VG, VB, and VK). The degree of randomness quantified by color entropy (E) is computed similarly for the red and blue values of the lesion and entire image, leading to computation of four features (ER and EB). The correlation co-efficient signifying the direction and degree of closeness of intra and inter linear relations between the RGB channels and grayscale images resulted in computation of twelve features (CRG, CGB, CBR, CRK, CGK, and CBK). Along with these, the lesion RGB values are projected on the three principal components (PC). Therefore, a total of 37 color features were computed.