# Dermoscopy Images Enhancement via Multi-Scale Morphological Operations
## 4 Results and Discussions  
This section describes the experiments conducted to quantify the relative performance of the proposed algorithm. The database used in these experiments contains 236 color images of benign and malignant melanocytic lesions and used in [33]. For the tests on the RGB images, first the RGB images were converted to HSV images. Then, the algorithms and evaluations were applied to the V-channel of the images. Finally, the HSV images were converted to RGB images.  
All algorithms were implemented using the Image] [34] library, for algorithms based on MM an extra library called MorphoLib] [35] was used.  
The results were evaluated with the metrics:  
* Entropy (E) [13; 21; 36]: E is used to measure the details in the image. E is defined as, \[E(I)=-\sum_{k=0}^{L-1}P(k)log_{2}(P(k)),\] (17) where \(I\) is melanoma image, \(k\) is intensity of the pixel in the image, \(P(k)\) is probability of occurrence of the k-value in the image. If \(b\) is number of bits of the image then \(L\) is equal to \(2^{b}\) (\(b=8\) for grayscale images). An image is considered to have good detail when its entropy value is high;
* Peak Signal-to-Noise Ratio (PSNR) [10; 21; 37]: PSNR measures how much distortion is added to the image in the contrast enhancement process. PSNR is defined as, \[PSNR(I,I_{E})=10\times log_{10}\frac{(L-1)^{2}}{MSE(I,I_{E})},\] (18) where Mean Squared Error (MSE) is defined as, \[MSE(I,I_{E})=\frac{1}{M\times N}\sum_{x=1}^{M}\sum_{y=1}^{N}(I(x,y)-I_{E}(x,y) )^{2}.\] (19)  
Figure 1: Dermoscopy images. Visual results obtained by MGRTH with \(n=3\) and \(\omega=0.25\).  
After the enhancement process, an image is considered to have low distortion if it has a high PSNR value;
* Relative Enhancement in Contrast (REC) [36; 38]: REC measures the contrast of the enhanced melanoma image. REC is defined as, \[REC=\frac{C(I_{E})}{C(I)},\] (20) where \(I\) is the melanoma image, \(I_{E}\) is the melanoma image with contrast enhancement, \(C\) is the image contrast and \(C\) is calculated as follows, \[C(I)=20\times\log\Biggl{[}\frac{1}{MN}\sum_{x=1}^{M}\sum_{y=1}^{N}\Bigl{(}(I(x,y))^{2}-\mu^{2}\Bigr{)}\Biggr{]},\] (21) where \(M\times N\) are the dimensions of the melanoma image and \((x,y)\) are the spatial coordinates and \(\mu\) is calculated as follows, \[\mu=\frac{1}{MN}\sum_{x=1}^{M}\sum_{y=1}^{N}I(x,y).\] After image processing, if the REC value is higher than 1, the enhanced image is considered to have enhanced contrast.  
To test the performance of the proposed method, we have considered two different experiments:  
* In the first part (Section 4.1), we performed parameter tuning to find good parameter values \(\omega\) and \(n\) of the proposed algorithm. For this purpose, a comparison of the results obtained with respect to the number of iterations and the contrast adjustment weight was performed. The objective of this experiment was to observe the performance of the proposal with respect to the E, PSNR, and REC metrics;
* Then, in the second part (Section 4.2) the proposed algorithm was compared with algorithms based on the multiscale top-hat transform and algorithms based on histogram equalization.  
In both experiments, apart from the numerical results, a visual assessment of the dermatologist is presented.