An efficient multi-level pre-processing algorithm for the enhancement of dermoscopy images in melanoma detection

In this paper, a multi-level algorithm for pre-processing of dermoscopy images is proposed, which helps in improving the quality of the raw images, making it suitable for skin lesion detection. This multi-level pre-processing method has a positive impact on automated skin lesion segmentation using Regularized Extreme Learning Machine. Raw images are subjected to de-noising, illumination correction, contrast enhancement, sharpening, reflection removal, and virtual shaving before the skin lesion segmentation. The Non-Local Means (NLM) filter with lowest Blind Reference less Image Spatial Quality Evaluator (BRISQUE) score exhibits better de-noising of dermoscopy images. To suppress uneven illumination, gamma correction is subjected to the denoised image. The Robust Image Contrast Enhancement (RICE) algorithm is used for contrast enhancement, and produces enhanced images with better structural preservation and negligible loss of information. Unsharp masking for sharpening exhibits low BRISQUE scores for better sharpening of fine details in an image. Output images produced by the phase congruency–based method in virtual shaving show high similarity with ground truth images as the hair is removed completely from the input images. Obtained scores at each stage of pre-processing framework show that the performance is superior compared to all the existing methods, both qualitatively and quantitatively, in terms of uniform contrast, preservation of information content, removal of undesired information, and elimination of artifacts in melanoma images. The output of the proposed system is assessed qualitatively and quantitatively with and without pre-processing of dermoscopy images. From the overall evaluation results, it is found that the segmentation of skin lesion is more efficient using Regularized Extreme Learning Machine if the multi-level pre-processing steps are used in proper sequence.


Introduction
Melanoma is the most common deadliest skin cancer, with 91,000 new cases annually in the USA, and causes more than 9000 deaths [1]. Globally, skin cancer is one of the lifethreatening diseases in western countries. In Europe, more than 100,000 new melanoma cases, with 22,000 deaths, are reported yearly [2]. The statistics are all more alarming that, unlike other types of cancer melanoma, have been steadily increasing over the past decades. Consequently, early detection of melanoma is a significant challenge in the diagnosis and treatment of skin cancer. Over recent years, a high-resolution dermoscopy skin imaging technique is used to visualize the deep skin structures. Although dermoscopy images are of high-resolution, the visualization of images is still subjective due to poor contrast, skin tone variations, nonuniform illumination, and artifacts [3]. A small amount of noise present in the dermoscopy images may get amplified during sharpening and contrast enhancement. The amplified noise may adversely affect the performance of edge-based segmentation algorithms used to extract the borders of the skin lesions. Hence, de-noising is a vital step in the automated analysis of dermoscopy images.
Mostly, skin lesions are darker than the background. However, due to uneven illumination, some portions of the image may appear darker than the background. Those darker regions may get falsely segmented along with the lesions. Therefore, contrast enhancement and sharpening are indispensable in the automated analysis of dermoscopy images. Specular reflection is another concern that may deteriorate the visual quality of melanoma images. Hence, reflection removal is needed to eliminate the background reflections in input images. Hairs are present in dermoscopy images. The hairs, being dark, may get falsely segmented along with the lesion, if intensity-based segmentation methods are adopted. Hairs need to be removed prior to the segmentation of lesions. The process of removing hairs from dermoscopy images is usually termed as virtual shaving.
In this paper, a new six-stage pre-processing algorithm is introduced to improve the segmentation accuracy of skin lesion in dermoscopy images. For de-noising the input image, the Non-Local Means (NLM) filter is employed. It ensures the preservation of detailed information of an image. Likewise, gamma correction is applied at the second stage so that a uniform illumination is achieved. An algorithm termed as Robust Image Contrast Enhancement (RICE) is employed for contrast enhancement. This method helps in avoiding the image from over contrast enhancement. For sharpening, the unsharp masking technique is implied to sharpen the edge pixels. For reflection removal, a transmittance estimationbased strategy is adopted. As a result, the undesired information is removed, thereby improving the visual quality. Under virtual shaving, a phase congruency-based method is adopted for removing the hairs without losing the image content. The implemented technique in each stage performs efficiently such that a quality image is achieved at the preprocessed output for melanoma segmentation. The output of the proposed system is evaluated subjectively with ground truth images and objectively using quality metrics like the Disk Similarity Index (DSI), Jacquard Index (JI), Total Segmentation Coefficient (TSC), and Intersection over Union (IoU). The output results reveal the multi-level pre-processing algorithm outperforms in the segmentation of skin lesion using Regularized Extreme Learning Machine (RELM).

Literature survey
To enhance the dermoscopy image, Madhan Kumar et al. [4] presented a pre-processing technique in two steps to remove the noise, fine hairs, and air bubbles. Accordingly, the contrast of an input image is enhanced by histogram equalization and the reduction of impulsive noise, hair structures, and air bubbles is achieved by applying the median filter. Although it preserves the edges, the fine image details are lost when the window size of the filter is increased above 3 × 3. Furthermore, Jaworek et al. [5] proposed a novel method to reduce the border irregularity in dermoscopy images. The authors highlighted a two-step pre-processing algorithm which includes black frame removal, hair detection, and in painting. Initially, each row of an image is scanned in four directions and the rows with 50% of black pixel are removed in the input image. Next, the black top-hat transform is applied to remove the dark thick hairs from the black frame removal image. Here, the black top-hat transform has failed to detect the local structures such as dots or globules in melanoma images. Moreover, Restrepo et al. [6] introduced a contrast enhancement technique based on the most discriminant projection of the color map in skin lesion images. This method overcomes the non-uniform illumination and color correction problems while detecting the melanoma. Since the color projection is calculated for all directions, it increases the complexity of the algorithm. In addition, a five-step pre-processing framework is proposed by Mishraet et al. [7] which includes elimination of lighting effects, color correction, contrast enhancement, image smoothing, and hair removal to improve the visual quality of the image. Here, the authors highlighted the problems in skin lesion detection like poor contrast, skin tone variation, artifacts, and non-uniform illumination on dermoscopy images.
Furthermore, Cherepkova et al. [8] proposed an enhancement and color correction for original dermoscopy images. Accordingly, the enhancement is achieved in six steps, namely retinex, spatiotemporal retinex-inspired envelope with stochastic sampling, automatic white balance (AWB), contrast enhancement, automatic enhancement, and histogram equalization. The authors reported an improved sensitivity and accuracy with an average of 4 to 8% and 3 to 5% respectively. Due to over exposure in visual adjustment, fine image details are lost with partly corrected color. Although AWB provides a good color correction, some deviations in visual quality occur due to the errors in temperature estimation. Also, a two-phase pre-processing algorithm for dermoscopy image enhancement is proposed by Jayalakshmi et al. [9]. Accordingly, a median filter is applied to remove the artifact and K-means clustering is used to eliminate the outlier pixels. The presented result shows an accuracy of 92.8% with sensitivity of 93% and specificity of 90% on the Danderm database.
Furthermore, a three-step framework was proposed to improve the contrast of the dermoscopy images in [10]. Initially, a median filter is employed to reduce noise in the raw input images. Next, the morphological operators such as erosion and dilation are implemented to remove the artifacts like hairs in the filtered image. Finally, intensity value mapping is applied to enhance the contrast. Through median filtering, a 5 × 5 window is used to remove the image details of 2 pixel wide. Pankaj et al. [11] introduced a reformed contrast enhancement technique using Krill Herd (KH) optimization. Here, a new reformed histogram is obtained with a peak cut off. The global histogram equalization helps in the enhancement of medical images like X-ray, MRI, and CT scan. In this approach, the efficiency is tested through the metrices like Structural Similarity Index Matrix (SSIM), End-Point Intersection over union (EPI), Delta E (DE), and Region Error Change (REC). Jeevakala et al. [12] discussed a sharpening enhancement technique for MR images. A Laplacian Pyramid and singular value decomposition are implemented to decompose the multiscale images into coarse and difference sub-bands. Here, the weighted sum of singular matrix and its global histogram equalization increases the contrast in multi-scale images.
Though a lot of literatures are enumerated in pre-processing of dermoscopy images, some limitations are identified as follows: Normally, median filters are used for de-noising in dermoscopy images. In such methods, when the filter size is increased above 3 × 3, fine details of the image are lost. The black-hat transform implemented for hair removal is unable to remove local structures like dots and globules. Automatic White Balance (AWB) causes over exposure in visual adjustment, leading to loss of fine image content. The over-enhancement and multiple illumination artifacts are found in Contrast Limited Adaptive Histogram Equalization (CLAHE), Contextual and Variational Contrast (CVC) enhancement algorithm, and Layered Difference Representation (LDR) algorithms. Moreover, in existing methods, the hairs are removed using median filters which leads to loss of image information.
In order to overcome the above issues and enhance the spatial quality for skin lesion segmentation in dermoscopy images, a pre-processing module comprising of de-noising, illumination correction, contrast enhancement, sharpening, reflection removal, and hair removal is introduced in this work. Under the de-noising phase, the NLM filter with a suitable DoS value is chosen to preserve the fine details of dermoscopic images. Also, in the contrast enhancement phase, the RICE algorithm is introduced to avoid the non-uniform enhancement by maintaining a mean brightness. In addition, the reflection removal is proposed to remove undesired information by separating the background image layer from the reflection layer of the dermoscopy image to be analyzed. Thus, by optimizing the smoothing parameter (SP) and rate control parameter (RCP) values in the reflection removal process, the visual quality of the image is also preserved. Moreover, a phase congruency method with ideal threshold value preserves the image content in virtual shaving of hairs. The rest of the paper is organized as follows: Section 3 explains the pipeline of dermoscopy pre-processing method in detail. Section 4 describes the results and discussion. Finally, Section 5 draws the conclusion.

Methodology
In this paper, a pre-processing methodology is introduced for dermoscopy images which can improve the visual quality of digital images to achieve an accurate segmentation. The schematic representation of the flow of work is depicted in Fig. 1.

De-noising
In the proposed method, NLM filter is used to perform the objective of de-noising [13]. Therefore, for estimating the denoised pixel value Y(m,n) of an input image pixel X(m,n), a windowing technique is applied on each 3 × 3 block of input dermoscopy images. Hence, Y(m,n) is computed as the weighted sum of the pixel values inside a block with radius R 1 as: where M and N indicate the number of rows and columns in the input image. The weights W(m,n) are based on the similarity of neighborhood pixels m and n. The similarity is then estimated as: The variable h g is a normalizing constant. It penalizes the gray level difference of the pixels within the similarity block, which are away from its center. Now, Eq. (2) is subjected to a normalization process, After normalization of the weights, the weight corresponding to the pixels, which are closely similar to the pixel to be denoised, will get penalized more. Towards rectifying this inadvertent problem, the weight corresponding to the self-similarity is replaced by the highest value of weight just below it. Therefore, the weight W[X(m,n),X(m + i,n + j)] at i = 0 and j = 0 is expressed as: The variable ξ is an arbitrarily defined operational parameter of the NLM filter, called as "decay control parameter." It is otherwise called as "Degree of Smoothing (DoS)." To adaptively fix the value of DoS (ξ) of NLM filter, the strength of noise is estimated in the input image. In this paper, the value of DoS is linearly proportional to the standard deviation (SD) of noise in the input image. This can be done as: where ̂ n indicates the SD of zero mean additive Gaussian noise.

Illumination correction
To suppress the uneven illumination in the denoised image Y , illumination correction is implemented in the dermoscopy images. Hence, to suppress the uneven illumination, gamma correction is subjected to the illumination component of HSV color space. Initially, the denoised input image in RGB color space is converted to the HSV color space. Here, the hue component and saturation component are kept intact and the value component alone is decomposed using retinex decomposition. Later, the estimated illumination component is subjected to the Gamma correction to suppress the unevenness. Since, the arbitrary parameter γ controls the effectiveness of the devignetting called as Devignetting Quality Parameter (DQP). In this work, the DQP value is varied between 0.25 and 2.5 and the best value is selected as 2.0. Then, the new value component is reconstructed from the decomposed reflectance component and gamma-corrected illumination component. Finally, combining the hue, saturation, and new value components together, an illumination-corrected image Y i, is obtained by converting the resultant image in HSV color space to RGB color space.

Contrast enhancement
To increase the gray level difference between the lesion and background of an illumination-corrected image Y i , the RICE algorithm is implemented in dermoscopy images.
Initially, the histogram h i and equalized histogram h eq are obtained for the input image. Later, by applying sigmoid transfer mapping function T sig (.) , the corresponding histogram h sig is obtained which improves the visual quality of the image. Now, the target histogram h is estimated as: where Φ and ψ are the control parameters, selected based on the saliency preservation. It is measured by a Quality assessment Metric of Contrast (QMC) [14] in an image. Finally, the contrast enhanced image Y c can be reconstructed using histogram matching function T hm (.) [15].

Sharpening
The principle of unsharp masking is exclusively based on the concept of estimating difference between the input image and the Gaussian-filtered image [16]. A fraction of the high-frequency content is computed by subtracting the Gaussian-filtered image from the input image. Again, it is added back to the input image to get the unsharp masking.
To perform the unsharp masking, the Gaussian filter kernel is used to compute Gaussian filter mask H G as given by, Selecting the dimension of Gaussian mask and its SD is important to make the strength of smoothing more sensitive. Therefore, SD is computed from the value of the radius of the mask. The SD of Gaussian mask from its radius is computed using the relation σ = (w − 1) / 4. According to this relation, when the radius of the Gaussian masks increases, the SD also increases proportionally. Therefore, when both SD and dimension of the mask increase together, the degree of smoothing also increases significantly. The identity convolution mask H 0 can be calculated as: Finally, the sharpened image Y s is obtained by computing the difference between the input image Y c and its Gaussianfiltered output.
The fraction of difference between the input and the Gaussian-filtered image merged to the input image is a manually selected parameter λ. This parameter is usually called as scale and if the value of λ is more, the sharper will be the output image.

Reflection removal
It is important to remove the undesired reflections; the reflection removal is implemented in the sharpened image. The process of reflection suppression is based on enhancing the image quality by separating the reflectance layer from the transmittance layer [17]. Based on this observation, an RGB image can be represented as the weighted sum of its transmittance layer and reflectance layer as explained in (11).
where Y s is the input RGB image. The variable T indicates the transmittance layer and the variable R indicates the reflectance layer of the input image. The notion Γ indicates element-wise multiplication. The notion " * * " denotes the 2D-convolution operation. W indicates the matrix that weighs the contribution of the transmittance layer at each pixel. k is the blurring kernel. The weighing matrix W is expressed as: To avoid losing the high-frequency component during reflectance removal, the Laplacian-based data fidelity is taken in the sharpened image. The optimization problem developed for reflection removal image Y r is described as: where is the regularization parameter, and if value increases, more gradients will be removed. The term C(T) invigorates the smoothening of image without disturbing the continuity of large structures.

Virtual shaving
The process of removing hairs from dermoscopy images is usually termed as virtual shaving. The hairs, being dark, may get falsely segmented along with the lesion. A phase congruency-based virtual shaving method is adopted for the removal of hairs. In the first step of hair removal, the color image is converted to grayscale. Figure 2 depicts the output of each pre-processing stage in the segmentation of skin lesion.
Hairs are detected from the grayscale image based on its phase congruency. A 2D-Log Gabor Filter (LGF) is used for computing phase congruency of the image [18]. The final phase congruency model of the image is given by: where T is the noise-compensation term, w o represents a weighting function, the Δ so term represents a phase deviation function, and the variable s is a minute value used to avoid computational indeterminacy. By applying threshold on the phase congruency model of an image, the phase angle Φ P is estimated as: The modified phase angle Φ N1 is the result of negative phase angles modified in the range 0 to π which is expressed as: Again, the phase angles in Φ N1 are modified such that the angles greater than 2 are brought to 0 to 2 as given by: The term Φ P2 indicates the locations where Φ N1 is greater than 2 and variable Φ P2 � is the complement of Φ P2 . The modified phase angles are then normalized as: Later, the phase values Φ R are converted to binary with a threshold t. Now the binary phase image Φ b is then dilated with disk-shaped structural element SE. The dilation in the binary image makes the objects visible by filling the small holes in it. Hence, the dilated phase image Φ D is given by: where SE is the structural element described as: Then, the connected components P are found on the dilated binary phase image Φ D . Eccentricity is calculated for each of the connected regions. Hair-like structures are elliptical structures with eccentricity close to 1.
The region without hairs is indicated as H i and the threshold t b is arbitrarily selected as 0.6. The resulted virtual shaving image Y v for RGB channel without hairs after region filling is given by: where Ψ indicates the region filling operator and Y r is the reflection removed image.

Segmentation
Lesion segmentation means separating the lesion region from the normal skin region.  It is a crucial step in the analysis of dermoscopy images to identify various global morphological features of the lesion. RELM with ridge regression is employed for segmentation of skin lesion in the proposed system. Based on the ridge regression model, the stable and better regularization can be achieved by adding 1/C to the diagonal elements P T P while estimating the output weight β.
Thus, the RELM regression becomes: where I is an identity matrix. Based on the matrix inversion property, (24) can be written as: In order to reduce the computation power, (24) and (25) can be selected based on P T P or PP T with smaller dimensions. Therefore, the computation complexity of RELM can be estimated as follows: where T stands for target estimation and P is the hidden neuron matrix.
Step 1: Randomly estimate the hidden neuron parameters, weight w and bias b.
Step 2: Estimate the hidden layer matrix P using: Step 3: Calculate the output weight β using: where H + is derived from (24) and (25).
Since hidden neuron parameters are randomly chosen, fast learn speed is achieved in RELM. Due to randomness nature, Extreme Learning Machine (ELM) and other Artificial Neural Network (ANN) algorithms have high variance and prediction (24) error. In this case, ridge regression is quite beneficial in the reduction of variance and prediction error due to smaller value of output weight β. Also, the over fitting problem is addressed with regularization parameter C in RELM which produces better and consistent performance than other segmentation algorithms. Figure 3 shows the segmented skin lesion from gray scale pre-processed image.

Results and discussion
The quality of the proposed system is analyzed subjectively and objectively in this section. Twelve objective quality metrics are used in this section. They are (1)

Image dataset
The dermoscopy images are collected from the data archive of the International Skin Imaging Collaboration (ISIC) [18]. The archive comprises a total of 900 dermoscopy images. The test data of the ISIC Melanoma Challenge 2016 is used in our experiment. The data comprises of 379 images. Out of 379 images, 273 images comprise melanoma. A total of 106 images are of normal lesions. Images with malignant lesions are labeled after performing the biopsy. All images comprising benign lesions are labeled after a histopathological examination and prolonged longitudinal follow-up. Associated ground truth segmentations contoured by the expert dermatologists are also provided in the archive.

Validation of NLM filter
The influence of DoS on the de-noising quality of the NLM filter is analyzed subjectively and objectively in this section. Under objective evaluation, the BRISQUE score is evaluated. The test images are filtered by the NLM filter, by varying DoS values from 1 to 15, and the results of some DoS values are shown in Fig. 4. As the value of the DoS varies from 1 to 15, the smoothing effect on the images also increases. It is evident from Fig. 4b-f that, when the value of DoS increases beyond ten, the images become excessively smoothed. This weakens the lesions present in the images. On the other hand, when DoS ranges 1 to 5, the noise is not removed sufficiently, and the required smoothing is not achieved in the output image. Hence, based on the perceived quality of processed images, the range of DoS between 6 and 9 is observed to be suitable for dermoscopy images. Among the 100 test images, three images are selected randomly to plot the variations of BRISQUE score for different values of DoS which is depicted in Fig. 5. In this graph, it shows a low BRISQUE score when DoS is varied between 8 and 10. As the DoS increases beyond 10, the BRISQUE score also increases for all the three images.
The NLM filter is compared qualitatively and quantitatively against two different alternatives of de-noising, namely Anisotropic Diffusion Filter (ADF) [19] and Bilateral Filter (BF) [20]. In Fig. 6c, BF excessively smoothens the image that greatly reduces the sharpness of the denoised image and thereby fades the boundary of the lesions. Likewise, in Fig. 6b, the image denoised by ADF shows the boundary of lesions is not preserved properly with textural artifact. But in Fig. 6d, the image is properly denoised by the NLM filter by maintaining the boundary of the lesions than the ADF. The information loss is also minimal when compared to the bilateral filter.
The summary of BRISQUE scores obtained for ADF, BF, and NLM for 100 images is tabulated in Table 1. It is evident that the NLM filter obtains the least value of BRISQUE score compared to the other schemes.

Validation of illumination correction
The influence of DQP on the quality of devignetted images is analyzed subjectively and objectively. For objective analysis, the quality metrics like AGIC, LOE, SFF, and VSI are used. Based on this analysis, identifying the suitable range of DQP for illumination correction in dermatological photographs is important. The output images corresponding to the proposed devignetting scheme for different values of DQP are depicted in Fig. 7. It is observed that in Fig. 7b, when the value of the DQP is less than one, the gray levels at the enhanced regions in the input images get compressed or scaled-down. In effect, the dynamic range of the processed images gets compressed and it appears to be relatively darker than the input images. If the value of the DQP is equal to one, the processed image becomes exactly similar to the corresponding input images as shown in Fig. 7c.
When the value of DQP is above one (DQP = 1.5), the darker regions of the input images become enhanced slowly and the background illumination becomes uniform. However, the vignetting error is not fully corrected; it can be seen in Fig. 7d. For the value DQP = 2, the dark corners of the dermatological photographs caused by the vignetting error become equally enhanced as the bright regions in the photographs are depicted in Fig. 7e. In this case, if DQP is greater than 2 (DQP = 2.5), an over-enhancement can be noticed in Fig. 7f.Therefore, DQP = 2 is chosen as the optimized value for illumination correction due to uniform brightness throughout the image.
The variations of AGIC, LOE, SFF, and VSI with respect to DQP are shown in Fig. 8a-d. In Fig. 8a, the AGIC monotonically decreases as the DQP increases. AGIC becomes almost consistent for the values of DQP greater than 2. In Fig. 8b, the LOE continuously decreases when the value of DQP < 1 and reaches minimum at a point where DQP = 1. Afterwards, the LOE increases linearly when the value of   DQP is greater than 1. In Fig. 8 c and d, when DQP changes from 0 to 1, both SFF and VSI increase and reach the maximum point at DQP = 1. When DQP increases above 1, the SFF and VSI start decreasing and above 2.2 the slope of SFF and VSI increases. This analysis of AGIC, LOE, SFF, and VSI with respect to DQP indicates the optimum value of DQP suitable for the dermatological images.
The proposed devignetting algorithm is compared both qualitatively and objectively, against three different algorithms, namely Gamma correction (GC) [21], variationbased fusion (VF) [22], and sigmoid transform (ST) [23]. The obtained images by applying different devignetting algorithms are depicted in Fig. 7. An ideal devignetting technique should make the background illumination uniform throughout the image surface without intolerably scaling down or boosting the mean brightness. Figure 9a depicts the input image for the GC algorithm. In the output images of the GC algorithm (Fig. 9b), the background illumination appears to be almost uniform. However, it blurs the structures present in the dermoscopy images. The VF algorithm introduces processing-induced color artifacts as seen in Fig. 9c. It produces output images that are unnatural in appearance. Output images of the ST in Fig. 9d look significantly darker than the corresponding input images. The  background illumination remains as uneven in the dermatological photographs. But in Fig. 9e, a uniform background illumination is noticed throughout the image surface. Moreover, the mean brightness is not down-scaled or boosted. The structures present in the output images remain sharper, appear natural, and do not cause any processing-introduced color artifacts. With respect to the subjective quality of the devignetted images, the proposed devignetting algorithm is superior to ST, VF, and GC methods. The qualitative evaluation is repeated for hundred test images and it is found that the proposed algorithm is consistently better than its alternatives on all test images. The obtained numerical values of AGIC, LOE, SFF, and VSI and computational time for different schemes ST, VF, GC, and the proposed algorithm are presented in Tables 2, 3, 4, 5, and 6, respectively. As given in Table 2, the minimum value of AGIC indicates that the background illumination in output images of the proposed method is uniform. Furthermore, in Table 3 the low values of LOE justify that the output image of the proposed algorithm is natural in appearance. In addition, Table 4 shows the highest value of SFF in the proposed algorithm indicates that the color as well as structural distortions is negligible in the output image. Moreover, the higher value of VSI shown in Table 5 justifies that visual saliency maps of the output images are identical to the visual saliency maps of the corresponding input images. Therefore, the loss of salient information negligible in the proposed algorithm is guaranteed. Finally, in Table 6 it is evident that the proposed algorithm is computationally faster than the other methods. All these results emphasize the dominance of the proposed scheme in terms of uniformity in background illumination, information preservation, and computational speed.

Validation of the RICE algorithm
Contrast enhancement is done to increase the gray level difference between lesion and background. Objective evaluation is done with the help of quality metrics like SFF, VSI, PCQI, and OCM. The different techniques considered for comparing the performance of contrast enhancement are CLAHE [21], CVC [24], and LDR [25].
While evaluating the performance of the RICE algorithm, a set of low-contrast dermoscopy images are used. Output images produced by different contrast enhancement techniques are depicted in Fig. 10. An ideal enhancement algorithm increases the gray-scale difference without changing the mean brightness of the image. In Fig. 10 b and d, both CLAHE and LDR algorithms made an over-enhancement in the image. Similarly in Fig. 10c, multiple illumination artifacts are visible at the background region after the enhancement by the CVC algorithm. Besides, the proposed RICE algorithm effectively enhances the images without affecting the mean brightness of dermoscopy images as shown in Fig. 10e. Hence, based on the subjective analysis, it is   Tables 7, 8, 9, and 10. A higher value of SFF in the RICE algorithm reflects the lesser structural distortions present in the output. Likewise, the higher value of VSI score in the proposed algorithm indicates that the visual saliency map of the output image is identical to that of the input image. Similarly, the high values of PCQI score in the RICE algorithm indicate the proper enhancement of dermoscopy images. The low value of OCM score in the proposed result indicates negligible noise amplification during enhancement. Considering the factors like enhancement in contrast, visual saliency, feature preservation, and information fidelity together, the RICE algorithm offers better performance compared to other algorithms.

Validation of unsharp masking
The quality of the sharpened image is influenced by the parameter λ in unsharp masking. This process is carried out by varying the value of λ from 0 to 5 with an interval of 0.5. It is analyzed subjectively using BRISQUE and CPBD.
The sharpening effect gets increased when the value of λ increases and it can be clearly observed from the images depicted in Fig. 11b-f. When the value of λ is less than 1, the sharpening effect is less as illustrated in Fig. 11 e and f. In Fig. 11 b and c, it is observed that the value of λ increases beyond 2.5, and the non-edge fine texture gets amplified which may adversely affect the segmentation process. Hence, based on the perceived quality of the processed images, the range of the λ between 1.5 and 2.5 is observed to be ideal for unsharp masking in dermoscopy images.
The variations of BRISQUE and CPBD metrics to different values of λ are shown in Fig. 12. BRISQUE exhibits an inverted bell-shaped curve for three test images. BRISQUE shows low values when the range of the λ is between 1.5 and  2. The value of the CPBD metric increases as the λ increases from 0.5 to 5. The slope of the CPBD starts decreasing when the value of the λ is greater than 2. The variations of BRISQUE and CPBD to λ indicate that the optimum range of λ is between 1.5 and 2.5. The unsharp masking algorithm is compared both qualitatively and quantitatively against the local Laplacian filter [15]. Output images for different sharpening algorithms are shown in Fig. 13. From the output of the local Laplacian filter in Fig. 13b, it is evident that this filter excessively sharpens the images, which results in amplification of non-edge fine texture.
On the other hand in Fig. 13c, an ideal sharpening algorithm is able to strengthen the lesion without amplifying the non-edge fine texture in the image.
The values of BRISQUE scores for the output produced by unsharp masking and local Laplacian filter for 100 images are presented in Table 11. It can be observed that unsharp masking exhibits the lowest values of BRISQUE compared to the local Laplacian filter. Low values of the BRISQUE score provide images with fewer distortions and artifacts, and are closer to the original quality of the image. Usually, the BRISQUE score ranges between 0 and 100, and if the score is near to 0, the quality of the image is good.

Validation of reflection removal
The selection of the SP and RCP of the reflection-removed images is analyzed subjectively in this section. SP controls the degree of smoothening and RCP determines the number of iterations. The small value of RCP needs more iterations and results in sharper output image. For this analysis, a range of suitable dermatological photographs are identified that possess specular reflection. The outputs of the reflection removal  The value of SP is varied between 0.01 and 0.04, and for each value of SP, RCP is varied between 1.1 and 2 with an interval of 0.1. It is apparent from the output images that, as the value of SP increases beyond 0.02, unexpectedly the image gets smoothed heavily with cartoon artifact. Moreover, as the value of SP increases, the data loss occurs which can be inferred from Fig. 16. When the value of SP is less than 0.02, the reflected part of the image is also removed without the smoothing effect as presented in Fig. 15. When SP is 0.01, it is observed that reflection is not properly removed from the image as shown in Fig. 14. Based on the perceived quality of processed images, the ideal value of SP is 0.02 for dermoscopy images. From Fig. 14e, Fig. 15e, and Fig. 16e, it can be observed that as the value of RCP is less than 1.5, the information contained in the image is lost with visible cartoon artifact. When the value of RCP increases above 1.8, reflection from dermoscopy images is not efficiently removed as shown in Fig. 14b, Fig. 15b, and Fig. 16b. Thus, based on the perceived quality of the resulting images, the range of RCP between 1.5 and 1.7 is observed to be ideal for the dermoscopy images.

Validation of phase congruency-based virtual shaving
The influence of the threshold on the subjective quality of the virtually shaved images is analyzed subjectively as well as objectively. The quality assessment is done objectively using PSNR and SSIM. The test image and its ground truth image used for virtual shaving are shown in Fig. 17. The value of the threshold is varied from 0.55 to 1. When the value of the threshold is between 0.55 and 0.7, almost no hairs are removed from the dermoscopy image as depicted in Fig. 18a. But hairs are completely removed in Fig. 18b when the threshold value is increased beyond 0.85. However, if the value of the threshold is increased above 0.95, the image information content is also lost along with the removed hair as shown in Fig. 18c. Hence, based on the perceived quality  of the processed images, the range of threshold between 0.85 and 0.9 is observed to be ideal for dermatological photographs.
The variations of PSNR and SSIM to various values of the threshold are shown in Fig. 19. PSNR and SSIM metrics are computed between the virtually shaved image and the ground truth image. Both PSNR and SSIM remain consistent for threshold values less than 0.6. But, when threshold increases beyond 0.6, both the parameters exhibit a bell-shaped curve. PSNR has its maximum value when the threshold is between 0.75 and 0.85 and SSIM reaches its maximum values when the threshold is between 0.75 and 0.9. A higher value of PSNR and SSIM justifies that the output of the virtually shaved image and ground truth image is identical. Hence, it is concluded that from the variations of PSNR and SSIM the optimum range of threshold for virtual shaving of dermoscopy images is between 0.75 and 0.9.

Validation of RELM-based segmentation
In this section, different segmentation algorithms are applied to the pre-processed and without pre-processed dermoscopy images. The performance of different algorithms is compared subjectively as well as objectively. The quality metrics like DSI, JI, TSC, and IoU [26] are used for objective comparison. The different segmentation algorithms used are FCM [27], isolate thresholding method (IT) [28], k-means [29], and RELM.
The output of different segmentation algorithms without preprocessing is shown in Fig. 20a-f and Fig. 22a-f. Here, the skin lesion is not segmented accurately because of the existence of noise, non-uniform illumination, and hairs. The virtually shaved images with a threshold value of 0.85 along with the manually segmented ground truth and output of different segmentation algorithms are depicted in Fig. 21   the algorithms failed to segment the skin lesions properly (Fig. 22). The output of RELM agrees with the manual segmentation and effectively segments the skin lesions in Fig. 21f and Fig. 23f. Thus, based on subjective quality, it can be concluded that the RELM algorithm is able to segment skin lesions efficiently from the dermoscopy images.
The values of JI, DSI, TSC, and IoU calculated for 100 dermoscopy images for different segmentation algorithms with pre-processing and without pre-processing are tabulated in Tables 12, 13, 14, and 15 respectively. The skin lesions segmented manually by experts are used as the ground truth for the calculation of different quality metrics. A high value of JI, DSI, and TSC indicates that the segmented lesions agree with ground truth. Also, the IoU score ranges from 0 to 1 which indicates better segmentation accuracy. The RELM algorithm exhibits the highest value for all four metrics. This indicates that the RELM algorithm has produced more accurate segmentation results compared to other schemes. Objective evaluation results agree with the inferences drawn by the subjective evaluation for the similarity of the skin lesions segmented using different algorithms with ground truth. The RELM algorithm is used to segment the lesions from the pre-processed images. It exhibits a JI, DIS, TSC, and IoU score higher than FCM, IT, and k-means, which shows that automated segmentation of the RELM algorithm is more accurate with the manual segmentation of skin lesions in dermoscopy images.

Conclusion
In this paper, different enhancement techniques are introduced for pre-processing of dermoscopy images. Here, the optimization-based framework is tested with data archive of ISIC (2016). Based on the results obtained with and without pre-processed segmentation, it is concluded that the implementation of pre-processing algorithm improves the success rate in RGB images. The NLM filter has been found to preserve very fine details by removing the noise in skin lesion images. Also, the NLM filter exhibits the lowest BRISQUE score compared to anisotropic diffusion filter and bilateral filter. The proposed RICE algorithm for contrast enhancement method is found to be superior to the existing methods including CLAHE, LDR, and CVC with better SFF, VSI, PCQI, and OCM scores. The enhancement of dermoscopy images is further improved by eliminating the undesired information due to reflection using reflection removal method. Also, in our framework virtual shaving is included to remove the hairs without any loss of image content with appreciably high PSNR and SSIM metrics. The values of quality evaluation metrics like PSNR and SSIM are appreciably high for output images produced by phase congruency-based virtual shaving when the value of the threshold is in the range of 0.85-0.9. However, the proposed system generates better results among all comparable methods in terms of qualitative and quantitative aspects. Therefore, the introduced pre-processing framework is more appropriate for lowquality melanoma images. From the score of quality metrics like Disk Similarity Index, Jacquard Index, and Total Segmentation Coefficient, it has been concluded that when pre-processing steps are used in the proper sequence, segmentation using Regularized Extreme Learning Machine is more efficient than other algorithms.

Conflict of interest
The authors declare no competing interests.