Reshma M, Shan P. B. ORetinex-DI: Pre-processing Algorithms for Melanoma Image Enhancement. Biomed Pharmacol J 2018;11(3).
Manuscript received on :6-Jun-2018
Manuscript accepted on :19-July-2018
Published online on: 30-07-2018
Plagiarism Check: Yes
Reviewed by: Ankur Singh Bist
Second Review by: Kiran Bala
Final Approval by: Dr Ayush Dogra

How to Cite    |   Publication History
Views Views: (Visited 150 times, 1 visits today)   Downloads PDF Downloads: 189
ORetinex-DI: Pre-processing Algorithms for Melanoma Image Enhancement

Reshma M1 and Priestly B. Shan2

1UBDTCE, Davangere and Research Scholar, ECE Dept,Sathyabama University, Chennai, India.

2Eranad Knowledge City-Technical Campus,Manjeri, Kerala, India.

Corresponding Author E-mail:



In Medical imaging, the dermoscopic images analysis is quite useful for the skin cancer detection. The automatic computer assisted diagnostic systems (CADS) require dermoscopic image enhancement for human perception and analysis. The traditional image enhancements methods lack the synchronization among contrast perception between human and the digital images. This paper proposes an optimized-Retinex (ORetinex) image enhancement algorithm to remove light effects, which is quite suitable for the dermoscopic image for clinical analysis for Melanoma. The value of global contrast factor (GCF) and contrast per pixel (CPP) is computed and compared with the traditional methods of image enhancements including contrast enhancement, CLAHE,Adaptive histogram equalization, Bilinear filtering and the proportion of GCF and CPP is found quite optimal as compare to these traditional methods.


Dermoscopic Images; Image Enhancement; Medical Imaging;  Melanoma

Download this article as: 
Copy the following to cite this article:

Reshma M, Shan P. B. ORetinex-DI: Pre-processing Algorithms for Melanoma Image Enhancement. Biomed Pharmacol J 2018;11(3).

Copy the following to cite this URL:

Reshma M, Shan P. B. ORetinex-DI: Pre-processing Algorithms for Melanoma Image Enhancement. Biomed Pharmacol J 2018;11(3). Available from:


Reaching the health care outside clinic is the vision of the innovations in healthcare technologies research. Cancer is one of the life-threatening diseases which require an early stage treatment. Melanoma is an antagonistic cutaneous neoplasm which spread to distant bones or distant organs. Digital skin Imaging is a useful technology which supports for the proper examination and analysis of the staging of the disease. Clinical observations sometimes are ambiguous so a proper enhancement method is needed. The varying lightning conditions makes dermoscopic images (DI) of low contrast, which affects the accuracy of the border detection of the lesion.1 The one aspect of the Melanoma is that it is visible on the skin so there is a higher probability of clinical diagnostic at the early stage when it is highly curable. An efficient technique is needed for image enhancement as one of the pre-processing requirement in the segmentation and classification as Melanoma or non-melanoma of dermoscopic images because there exists a very low contrast between normal and the lesioned skin in some context. If the challenges of handling artefact like hairs, ruler marks etc., along with skin tone and skin aberrations is handled effectively, the lesion will become visible on the skin, and it is potentially detectable at a very early stage when it is curable.2 The critical points may also include discrepancy in the lesion with varying colour, location, size, shape, texture in the image frames along with non-uniform and lightening and non-uniform exterior block circles. This paper introduces an optimized and modified method of traditional Retinex algorithm.3 The section 2 describes the review of literature; entire system model is described in section 3; Section 4 describes the specific performance metrics to evaluate the effectiveness of the model; Section 5 describes each method adopted for benchmarking; Section 6 illustrates the performance result and analysis followed by conclusion & future research directions in section.7

Review of Literature

This section highlights some related work used for the enhancement of dermoscopic images. This research has got its own significance as human interpretation becomes uncertain to analyse it, due to its complexity. If the quality of image is poor, it is hard to analyse the border, which is an essential requirement for finding the probability of the diseases. The Celebi et al. (2009) proposed a method of enhancement of the contrast. Their methodology finds the optimal way to perform grey scale conversion of RGB input using histogram. The contrast between the lesion and the background skin is differentiated, which is useful while performing the segmentation.4 The various conditions of the images during the dermoscopic process results in the global manipulation which in turn results in image quality degradation due to distortions and noises.

Kwoket (2013) emphasis intensity equalization at local level. The process of random sub-dividing is used to equalize and a Gaussian weight factor is used to remove any discontinuities in boundaries. Optimization in their method is achieved by using particle-swarm optimization (PSO).5

In skin cancer classes, squamous cell carcinoma(SCC) and basal cell carcinoma(BCC) are curable even in the advanced stages, whereas the melanoma progression affects very fast lungs, brain etc.6 Clinical clarity brings efficiency to the whole eco-system of advance health care belief with higher probability of survivability. Advanced imaging mechanisms like multiphoton microscopy (MM) provisions provide useful information of skin. The hybridization of polarimetry and MM claims higher enhancement at local stage in the work of Ávila et al. (2017).6

The adaptive bi-lateral filter (A-BLF) was proposed by Zhang et al. (2008) to enhance the sharpness as well for noise removal by increasing the slope of the edges.7 In order to handle effect of illumination Retinex theories suggest de-composing image into two different layers say reflectance and illumination layer.

Xu et al. (2017) used Gaussian filter in order to remove artefacts to get illumination layer and then using multi scale process, the contrast enhanced image is obtained without using textures of important regions.8

ORetinex-DI: System Model

The proposed evaluation framework ORetinex-DI used to evaluate the conventional image enhancement parameters mentioned above.

PH2 – Dataset

The effective evolution of the algorithm for melanoma detection is possible only when we have strong development of the computer assisted diagnostic systems (CAD-S) to classify the dermoscopic images (DI). Till 2013 there were no standard dataset available in a public domain to evaluate and compare the effectiveness of the algorithms or methods for the DI for melanoma. This paper results are evaluated and validated on one of the open dataset namely PH2-Dataset, which consists of 200 Data’s with ground truth for made by expert dermatologist.

ORetinex-DI: Evaluation Framework

Figure 1: Evaluation framework for ORetinex-DI.

Figure 1: Evaluation framework for ORetinex-DI.

Click here to View figure


Performance Metrics for ORetinex-DI

The typical conventional method of the image quality enhancement for the better visual perception includes, manipulating the histogram, brightness and contrast, among which the contrast plays an important role. The ORetinex-DI uses two performance metric for evaluating the effectiveness namely Global Contrast Factor (GCF) and Contrast per Pixel(CPP). Section 4.1 and 4.2 explains about GCF and CPP respectively.

Global Contrast Factor (GCF)

A modified concept of contrast was introduced by Matkovic, Kresimir et al. (2005) and evaluated a new metric called Global Contrast factor (GCF) which measures the contrast closer to the human perception as it computes the contrast at varied resolution levels and then aggregates the final contrast value.9

For the image pixel width (w), pixel height (h) and average local contrast lci, the value of current resolution (Ci) is computed using eq(1) and the GCF by eq(2).

Equation 1,2

Where, i ∈ {1, 2…,8,9} and wi is computed by eq (3)

Equation 3

Contrast per Pixel(CPP)

In conventional practice Krishnamurthy and Banu (2013), the quality of the image is judged by the vale of contrast per pixel (CPP). The CPP is calculated by the average intensity difference among a particular pixel and its adjacent pixel.

In the framework of ORetinex-DI, kernel (K) ∈ {-1,-1,-1,-1,8,-1,-1,-1} is defined where each value is divided by 8. The 2-D convolution is performed between the grayscale of input image with image difference as the central part of the convolution as of the size of the gray image input. Finally, the CPP is computed by mean of the difference image.

In the section 5 different performance observations of the methods used in the evaluation framework is discussed. Conventional image enhancement methods are discussed in section 5.1 and its subsections discusses the conventional approaches whereas the detailed description of the modified Retinex as ORetinex-DI is explained in the section 5.2

Image Enhancement Methods: Conventional & ORetinex-DI

Conventional Approaches

The typical conventional methods used in the evaluation framework for the dermoscopic images enhancements uses four different parameters: Contrast Adjustment, CLAHE, Adaptive histogram equalization and Bilateral Filtering.

Contrast Adjustment

In this method the input RGB color map is converted into HSV colour map and the value of luminosity(lum) is computed from the HSV color map. Then the intensity of the lum is mapped to a new value in such a way that 1% of the data is saturated at high as well as low intensity of the lum, which increase the contrast of the image and finally it is restored to convert back to RGB format.

Contrast Limited Adaptive histogram equalization (CLAHE): CLAHE is having different characteristics as compared to the normal adaptive equalization of the histogram. Here independently the histogram equalization is performed on each R, G and B components and then finally the image is reconstructed.

Adaptive Histogram equalization: It enhances the contrast of the greyscale image I by transforming the values using contrast-limited adaptive histogram equalization.

Bilateral Filtering (Bi-F): The Bilateral filter takes two independent variables as an input; one is filter half width (w) and another is filter standard deviations (Sigma). Initially, the Bi-F window size and standard deviation is verified then Bi-F is applied. The algorithm for the gray scale image is given below.

Bi-F: Algorithm for gray scale

Input: I




G ← Gaussian distance weights.

For each dimension.

Extract local region.

H ← Compute Gaussian intensity weight.

F ← Compute bi-lateral filter response.


where B is bilateral Fitter of gray scale image


The system is dynamic to optimize the value of GCF and CPP by changing value of w and sigma. Fig 2 illustrates that by changing the bilateral half width w, the normalized GCF falls and the normalized CPP is constant.

Figure 2: Optimization of GCF and CPP for changing Bilateral Filter half width in bilateral filtering.

Figure 2: Optimization of GCF and CPP for changing Bilateral Filter half width in bilateral filtering.

Click here to View figure


Fig 3 illustrates that by changing the filter standard deviation (sigma) the normalized GCF falls sharply and the CPP becomes constant. The crossing point of both the variation provides the optimal results.

 Figure 3: Optimization of GCF and CPP for changing the filter standard deviation (sigma).

Figure 3: Optimization of GCF and CPP for changing the filter standard deviation (sigma).

Click here to View figure


Modified Retinex

If there exist high contrast area at edges then the Retinex is the appropriate image enhancement method. The collaboration of Gaussian function bi-lateral filtering can avoid noise and retain the properties of edges. The bilateral filter is computed using equation.4 as proposed by Li and Zang (2015).3

The field constant C1 and C2 is taken randomly along with value of alpha and beta. The original input image passes through 2-D fast Fourier transform and predefine 2-dimesion filter is created with Gaussian low pass filter (G) using C1. Further C2 goes through once again 2-D fast Fourier transformation. This process continues with various C2 to get another corresponding G.

Fig.4, fig. 5, fig.6 & fig.7 illustrates values of normalized GCF, normalized CPP for changed combination of C1, C2, alpha, beta. It is a multi-variable optimization problem, where the optimal crossing of four parameters provides the optimized enhanced image by ORetinex-DI.

 Figure 4: Optimization of GCF and CPP for changing ‘C1’ in ORetinex-DI.

Figure 4: Optimization of GCF and CPP for changing ‘C1’ in ORetinex-DI.

Click here to View figure


 Figure 5: Optimization of GCF and CPP for changing ‘C2’ in ORetinex-DI.

Figure 5: Optimization of GCF and CPP for changing ‘C2’ in ORetinex-DI.

Click here to View figure


 Figure 6: Optimization of GCF and CPP for changing ‘Alpha’ in ORetinex-DI.

Figure 6: Optimization of GCF and CPP for changing ‘Alpha’ in ORetinex-DI.

Click here to View figure


 Figure 7: Optimization of GCF and CPP for changing ‘Beta’ in ORetinex-DI.

Figure 7: Optimization of GCF and CPP for changing ‘Beta’ in ORetinex-DI.

Click here to View figure


Performance Results and Analysis

The methods of enhancements are evaluated with the two-performance metrics namely GCF and CPP as discussed into section 4.1 and 4.2. Table 1 shows one instance of values obtained from different methods.

Table 1: Values of GCF and CPP for Original Image and Images after different enhancement techniques.

Method GCF CPP
Original Image (IDM-437:PH2) 1.4716 20.0828
Contrast adjustment 3.0298 8.7373
CLAHE 4.4158 16.4885
Adaptive Histogram Equalization 2.0947 19.6058
Bilateral filtering 2.0472 21.0921
Proposed-ORetinex-DI 2.5402 16.2357


In table.1 it is seen that value of GCF is 1.4716 and the values of CPP is 20.0828.  On application of contrast adjustment, the values of GCF drastically increases to 3.0298 (~98%) and CPP reduced to 8.7373. Though the contrast adjustment provides brighter image but may lose some significant visual perception which might be clinically important. Further CLAHE and adaptive histogram equalization gives (GCF: 4.4158, CPP: 16.4885), (GCF: 2.0947, CPP: 19.6058) respectively. These values show that adaptive histogram equalization performs better performance as compared to CLAHE and CLAHE is better than contrast adjustment. The above three methods perform well if only the contrast enhancement is objective but if sharp edges to be retained. The bi-lateral filtering provides GCF 2.0472 and CPP: 21.0921 which are very closer to the CPP of original image, which ensures retaining the sharp edges visibility. The bi-lateral filter can be further optimized with two independent variables namely 1) Filter half width (FHW: 1-10) and 2) Filter standard deviation (FSD: 0.001-0.1). The value of GCF and CPP found for proposed-ORetinex-DI is 2.5402, 16.2357 respectively which ensures handling light illumination conditions. The Fig 8 shows the comparative result.

 Figure 8: Comparative values of GCF & CPP for Original, Image Adjustment, CLAHE, Adaptive histogram equalization, Bilinear Filtering and Proposed ORelinex-DI.

Figure 8: Comparative values of GCF & CPP for Original, Image Adjustment, CLAHE, Adaptive histogram equalization, Bilinear Filtering and Proposed ORelinex-DI.

Click here to View figure



This paper provides a complete insight for the evaluations of different image enhancement techniques by developing an evaluation framework CAD tool. The effectiveness of different methods is evaluated with two metrics called global contrast factor (GCF) and Contrast per pixel (CPP).The paper also proposes an optimized Retinex based enhancement method for the novel method suitable for dermoscopic images as ORetinex-DI and the value of GCF and CPP is found optimally suitable for the dermoscopic images. In future it is aimed to develop segmentation method based on the manual ROI selection for suspect Melanoma based on ORetinex-DI output and segment the suspect region and then perform specificity analysis with the ground thrust of PH2 Data set.


We acknowledge our sincere thanks to the Universidade do Porto, Instituto Superior Técnico Lisboa, and the Dermatology Service of Hospital Pedro Hispano in Matosinhos, Portugal to provide dataset of PH2.


  1. Qaisar A.F.I, Garcia M, Celebi E, Ahmad W and Mushtaq Q.  A perceptually oriented method for contrast enhancement and segmentation of dermoscopy images. Skin Research and Technology. 2013;19:1.
  2. Mishra N.K and  Emre C.M. An overview of melanoma detection in dermoscopy images using image processing and machine learning. arXiv preprint arXiv. 2016;1601:07843.
  3.  Li D. Y, Zhang P.W and  Bai L. A Retinex Algorithm for Image Enhancement Based on Recursive Bilateral Filtering, 2015 11th International Conference on Computational Intelligence and Security (CIS), Shenzhen. 2015;154-157.
  4. Celebi M. E, Iyatomi H and Schaefer G.  Contrast enhancement in dermoscopy images by maximizing a histogram bimodality measure, 2009 16th IEEE International Conference on Image Processing (ICIP), Cairo. 2009;2601-2604. doi: 10.1109/ICIP.2009.5413990
  5. Kwok N. M,Wang D, Ha Q.P, Fang G and Chen S. Y. Locally-Equalized Image Contrast Enhancement Using PSO-Tuned Sectorized Equalization. In Computational Intelligence in Image Processing.  2013;21-36. Springer Berlin Heidelberg,
  6. Ávila F.J, Stanciu S.G, Costache M andBueno J. M. Local enhancement of multiphoton images of skin cancer tissues using polarimetry, 2017 Conference on Lasers and Electro-Optics Europe & European Quantum Electronics Conference (CLEO/Europe-EQEC), Munich. 2017;1-1.
  7. Zhang B and  Allebach J.P.  Adaptive Bilateral Filter for Sharpness Enhancement and Noise Removal, in .IEEE Transactions on Image Processing. 2008;17(5):664-678.
  8. Xu K and Jung C. Retinex-based perceptual contrast enhancement in images using luminance adaptation.2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, LA. 2017;1363-1367.
  9.  Kresimir M,  Neumann L,  Neumann A, PsikT and  Purgathofer W. Global Contrast Factor-a New Approach to Image Contrast. Computational Aesthetics 2005. 2005;159-168.
  10. Krishnamoorthy S.and Banu W.  Discrimination metric for Bi-Histogram equalization of contrast enhancement. 2013 IEEE Second International Conference on Image Information Processing (ICIIP-2013). Shimla. 2013;267-270. doi: 10.1109/ICIIP.2013.6707596.
Share Button
(Visited 150 times, 1 visits today)

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.