Abstract
Background:
With advances in medical imaging systems, digital dermoscopy has become one of the major imaging modalities in the analysis of skin lesions. Thus, automated segmentation or border detection has a great impact on the subsequent steps of skin cancer computer-aided diagnosis using demoscopy images. Since dermoscopy images suffer from artifacts such as shading and hair, there is a need for automated and robust artifact attenuation removal and lesion border detection.
Methods:
method for segmentation of dermoscopy images is proposed based on active contour. To this end, at first, a simple method for hair pixels is restored and a new scheme for shading detection is proposed. Then, particle swarm optimization (PSO) algorithm is applied to select the best coefficients for converting RGB to gray level. The obtained gray level image is then used as input for multi Otsu method which provides initial contour for border detection using active contour. Finally, Chan and Vese active contour is used for final lesion border detection.
Results:
The method is tested on a total of 145 dermoscopic images: 79 cases with benign lesion and 75 cases with melanoma lesion. Mean accuracy, sensitivity and specificity were obtained 94%, 78.5% and 99%, respectively.
Conclusion:
Results reveal that the proposed method segments the lesion from dermoscopy images accurately.
Keywords: Dermoscopy , Melanoma , Segmentation , Active Contour
Introduction
Melanoma is an aggressive kind of skin cancer. According to the American Cancer Society in 2006, 62,190 melanoma cases were reported, 7,700 of whom died [1]. In 2013, this number increased to 76,690 cases where 45,060 cases were men and 31,630 women [2]. These numbers necessitate designing a fully automatic Computer Aided Diagnostic system for a premature diagnosis. A cancer diagnosis system is composed of segmentation, feature extraction and classification. Segmentation has a great degree of importance because of its significant effects on the next stages [3]. Segmentation of dermoscopy images is a difficult task due to several problems. Artifacts such as hair or bubble, low contrast between the border of lesion and healthy skin, irregular border lesions in some cases, variety of skin tissues and the variegated color inside lesion [3] are concerns for designing a good border detection method.
Numerous algorithms have been developed for segmentation of dermoscopy images. Segmentation may be based on thresholding techniques, active contour and unsupervised algorithms. In [4], via combining some thresholdings and minimization techniques for the energy function, the optimum threshold was obtained. Thresholding methods can achieve good results only when there is a good contrast between border of lesion and healthy skin. In [5], an improved snake model is used to detect border of lesion. Edge-based active contours such as snake approaches perform poorly when the boundaries of lesion are not well defined. Region-based approaches have also been used for segmentation of dermoscopy images, for instance statistical region merging (SRM) [3]. Region-based approaches can lead to over-segmentation when the lesion or the skin region is texture, or when different colors exist in the lesion. In [6], an unsupervised algorithm is constructed as a combination of Self-Generated Neural Network with genetic algorithm. The algorithms are sensitive to variegated color inside the lesion.
In this paper, a method is proposed for skin lesion border detection that overcomes the above shortcomings and gives an improved segmentation. These shortcomings include artifacts such as hair and shadow, low contrast between the border of lesion and healthy skin, proper initial contour selection and stop condition for active contour algorithm. This method is based on active contour and suitable preprocessing that performs appropriate segmentation.
Dermoscopy dataset and an overview of Chan-Vese segmentation algorithm are presented in Section 2. The pre-processing applied on the image along with the segmentation method is introduced in Section 3. Experiments and results are presented in Section 4. A conclusion section finalizes the paper in Section 5.
Material and Methods
Dermoscopy Dataset
The proposed method was applied to 145 dermoscopic images (including 79 cases of benign lesion and 75 cases of melanoma lesion) obtained from the dermoscopy Atlas [7]. RGB images were 980×720 pixels. The tumor boundary was manually traced by an expert dermatologist and used as a gold standard to evaluate the performance of the proposed method.
Active Contour Method
Active contours which are based on the theory of surface evolution are able to provide smooth and closed contours to extract the boundaries of objects in an image. According to the method applied for surface evolution, they are divided into two main groups: parametric and geometric. Parametric active contours are represented explicitly as parameterized contour. However, handling topological changes such as splitting and merging are the main drawbacks of these active contours.
Geometric active contours are based on level set method originally proposed by Osher and Sethian [8] in which the evolving curve C is defined implicitly as zero level of an embedding Lipschitz-continuous function defined in a higher dimension. They can be classified into two main groups: edge-based and region-based methods. The edge-based methods apply the image gradient as a constraint to stop the evolving curve on the boundaries of desired object.
The region-based active contours are based on region statistics rather than image gradient. The function proposed by Mumford and Shah Model [9] is a basis for region-based active contours. Based on this model, Chan and Vese [10] proposed a variational framework to segment an input image into two separated homogeneous regions, defined by the evolving contour C which minimizes the following function:
(1)
in which, is an image defined on Ω, and the constants c1 and c2 approximate the image intensity inside and outside the contour C. λ1, λ2, and v are positive weighting constants. They proposed level set framework to minimize this function. According to the level set method, the contour C is implicitly defined in the image plane (Ω∈Rn) as zero level of an embedding Lipschitz-continuous function defined in a higher dimension.
(2)
where the curve/surface C(t) is represented implicitly via function φ by C(t)={(x,y,z)|φ(x,y,z,t)=0}. is the minimum Euclidean distance between voxel of image I and curve/surface C(t) at time t. Thus, the level set formulation of the above function is as follows:
(3)
where the Heaviside function and the Delta function (δ(φ)=H(φ)) can be approximated as follows:
(4)
The constant ε is set to 1.0 as in [10].
By minimizing the function for constant φ, the following Euler-Lagrange equations are obtained:
(5)
The evolution of the level set function φ according to obtained c1, c2 is as follows:
(6)
Procedure
Figure 1 illustrates the block diagram of the proposed method which includes preprocessing, rough segmentation using thresholding and tumor outline delineation based on active contour followed by post-processing step. Post processing step is based on morphological operation performed to achieve two regions. As the aim of the paper is segmentation of the lesion in the dermoscopy image, the region-based active contour method proposed by Chan and Vese [10] is used as segmentation method. The first step of segmentation is to convert RGB image into gray level image. Then, in the second step of segmentation, a method for initial contour selection is proposed for active contour algorithm. Finally, in the third step, a criterion for stopping the active contour is proposed.
Preprocessing
Dermosopic images often suffer from artifacts such as hair and shading. To accurately extract the tumor borders, effective algorithms for preprocessing are used which are divided into two steps: 1) hair attenuation and 2) shading effect attenuation.
Hair attenuation
Hair occlusion is one of the challenges facing automatic analysis of dermoscopy images. In order to remove hair from input image, the method proposed by Tossie et al. [11] is applied to detect hair. After detection of hair pixels by [11], a simple method for restoration of hair pixels is proposed. To restore the background in regions detected as hair, the gray level of pixels detected as hair is changed with the average intensity of neighboring pixels within m × m window (m=9) which are not marked as hair.
Shading attenuation
Skin surface is not flat during imaging. Thus, according to the angle between the dermoscope and the skin, the illumination between center of the image and the edges may differ. This results in shading effect that causes the image to be brighter near the center and darker near the edges. Uneven illuminations create a structure resembling lesion in healthy skin that is confused as a lesion during segmentation process. It is usual that the lesion is not located in corners of the image. In this study, the shading effect is detected using Otsu algorithm [12], assuming the fact that the lesion is located in the center of the image. Figure 2 illustrates the proposed method for shading detection. In this method, after converting RGB image to gray level, Otsu algorithm is used to divide the input image into two regions. Then, four m × m (m=20) windows are placed at four corners of the obtained binary image. If at least in two windows black pixels are dominated, then shading effects are present in the image. To remove the shading effects, the algorithm presented in [13] is utilized.
Converting RGB to Gray Level
In order to perform border segmentation by active contour, the preprocessed dermoscopy image is converted from RGB into a gray level image. Converting RGB image to gray level requires a weight vector [wr,wg,wr] representing weights of R, G, and B channels, respectively. The gray level image is obtained as newimage=wr.r+wg.g+wb.b. Note that gray scale image has intensity of 0-255; it is required to consider the following limitation:
(7)
According to the Otsu thresholding method, the image with maximum between-class variance is the optimal image for segmentation. If the regions are represented as c1, c2, the between-class variance is as follows:
var(c1,c2 )=p1.p2.(m-m)2 (8)
In which m1 and m2 are the mean of c1 and c2 classes, and p1 and p2 are probability of c1 and c2 classes, respectively. Thus, the weights [wr,wg,wr] have to be determined in a way that the gray level image has the maximum value between class variances.
Figure 3 shows the proposed method for optimal weights selection. To obtain gray level image with the maximum between-class variance, the particle swarm optimization (PSO) algorithm [14] is used to find optimal weights [wr,wg,wr]. The PSO algorithm has an appropriate conversion speed.
Initial Contour
Active contours require an initial contour. If the initial contour is near object boundaries, the required time to obtain the border decreases substantially. Additionally, unsuitable selection of the initial contour may lead to a wrong segmentation. Thus, a method that finds relatively accurate initial contour is proposed (Figure 4).
Otsu algorithm [12] has good accuracy in extracting the lesion. However, since it is based on single threshold, it is not suitable for images with low contrast. Therefore, multi-Otsu method [15] was used. The following steps are used to find the initial contour (Figure 4):
1) Multi Otsu method divides the image into some regions.
2) Using morphologic operator [16], regions connected to borders of the image are removed.
3) Removing small regions is carried out to produce a binary image.
4) The border of binary image is extracted.
Experimentally, it has been found that when initial contour is inside the lesion, the active contour may move more accurately to the image border. Thus, to assure that the initial contour starts from inside of the lesion, the erosion morphology filter with disk structuring element of 15 pixels radius on the extracted border is applied.
Dermoscopy Image Segmentation
Our proposed method for lesion border detection contains the following steps:
Anisotropic diffusion filter
Before applying the algorithm, it is required to apply anisotropic diffusion filter for smoothing the obtained gray level image and removing the remaining noises from the pre-processing stage. Anisotropic diffusion filter leaves the edges and main features of the image unchanged [17].
Segmentation using Chan-Vese active contour method
Chan-Vese region-based active contour is used to segment the lesion from smoothed gray level image. The initial contour for this step is obtained according to the method described in subsection 3.3. After initialization, the curve evolves iteratively (subsection 2.2). If the number of iterations is too small, there is the possibility that the contour stops before reaching real image boundaries. The curve evolution is stopped when the curve does not change significantly in two consecutive iterations.
Post-processing
Of course, some post processing is required so that small unwanted regions are removed.
Results and Discussions
Shading Effect Attenuation
Since shading affects the segmentation results, it is attenuated using the method proposed in subsection 3.1. Figure 5 illustrates the results of shading effect attenuation and lesion boundary detection with and without shading effect removal. Shading effect makes a structure like a lesion in non-lesion regions of image. This is because the intensity of lesion pixels and the healthy skin may reveal a similar condition. As a result, the algorithm classifies shadow pixels and a lesion pixel in the same class.
gk
The impact of the optimum coefficients selection for converting RGB to gray level
Selecting the optimum coefficients for each channel of RGB image leads to gray level image with suitable contrast. Accordingly, high contrast image also results in more accurate segmentation. Implementation results show that the coefficient of red color channel is zero because of low contrast between lesion and background. Green and blue channels are the dominant color channels as information content. For instance, in Figure 6, coefficients of red, blue and green bounds are 0, 0.1, and 0.9, respectively. The figure shows that an image with optimal coefficients has a more accurate segmentation rather than luminance color space. However, these coefficients are obtained from PSO optimization algorithm.
hgl
Segmentation Results
The results of segmentation using the proposed method were compared with the method proposed by Sáez et al. [18]. In [18], instead of using a grayscale image, all three channels were utilized. Figure 7 shows the results of implementation of these two algorithms. The proposed algorithm shows better performance than [18]. Thus, instead of using all three channels, through selecting optimum weights for each channel and using appropriate stop condition, a good segmentation is achieved. The method in [18] is based on edge, so, if image does not have good contrast between lesion and skin, it leads to over-segmentation. However, applying optimal weight selection for converting RGB to gray level, the proposed method reveals better results in contrast between the lesion and the skin. Moreover, providing a method for stopping active contour algorithm, real boundaries of object are obtained.
In order to quantitatively evaluate the performance of the proposed method, three evaluation metrics, accuracy, sensitivity (SE) and specificity (SP), were used.
(9)
(10)
(11)
✓ The number of True Positives pixels (TP): the number of pixels that are classified both by the algorithm and the dermatologist as lesion pixels.
✓ The number of True Negatives pixels (TN): the number of pixels that are classified both by the algorithm and the dermatologist as non-lesion pixels.
✓ The number of False Positives pixels (FP): the number of instances where a non-lesion pixel is falsely classified as part of a lesion by an algorithm.
✓ The number of False Negatives pixels (FN): the number of instances where lesion pixels are falsely classified as non-lesion by an algorithm.
Table 1 shows the results of sensitivity, specificity and accuracy using the proposed method and results of the method proposed by Sáez et al. [18]. It is observed that the proposed approach achieves 94% accuracy while another algorithm achieves 84.6%. Also, it can be seen that the proposed algorithm performs better with mean sensitivity of 78.5%, while other algorithms achieve only a sensitivity of 58%.
Table 1.
Method | Accuracy | Sensitivity | Specificity |
---|---|---|---|
[18] | 84.6 | 58 | 99 |
Proposed | 94 | 78.5 | 99 |
The results indicate that the proposed algorithm presents better skin lesion border detection results. Note that specificity deals with the background region which provides good results for most algorithms due to comparatively large respected area. However, the main problem is lesion segmentation.
Conclusion
A method for segmentation of dermoscopy images based on Chan-Vese active contour was proposed. Challenges of the method were studied, and appropriate methods were proposed. The challenges include artifacts such as hair and shadow, low contrast between the border of lesion and healthy skin, proper initial contour selection and stop condition for active contour algorithm. Implementation results show that the proposed method leads to better segmentation results compared to the method proposed in the litrature. On the other hand, using grayscale images in this method, it has less computational complexity than the competing method.
Footnotes
Conflict of interests: None.
References
- 1.Jemal A, Siegel R, Ward E, Murray T, Xu J, Smigal C, et al. Cancer statistics, 2006. CA Cancer J Clin. 2006;56:106–30. doi: 10.3322/canjclin.56.2.106. [DOI] [PubMed] [Google Scholar]
- 2.In: American Cancer Society. What are the key statistics about melanoma skin cancer? Available from: http://www.cancer.org/cancer/skincancer-melanoma/detailedguide/melanoma-skin-cancer-key-statistics .
- 3.Celebi ME, Kingravi HA, Iyatomi H, Aslandogan YA, Stoecker WV, Moss RH, et al. Border detection in dermoscopy images using statistical region merging. Skin Res Technol. 2008;14:347–53. doi: 10.1111/j.1600-0846.2008.00301.x. [ PMC Free Article] [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Emre Celebi M, Wen Q, Hwang S, Iyatomi H, Schaefer G. Lesion border detection in dermoscopy images using ensembles of thresholding methods. Skin Res Technol. 2013;19:e252–8. doi: 10.1111/j.1600-0846.2012.00636.x. [DOI] [PubMed] [Google Scholar]
- 5.Zhou H, Schaefer G, Celebi ME, Lin F, Liu T. Gradient vector flow with mean shift for skin lesion segmentation. Comput Med Imaging Graph. 2011;35:121–7. doi: 10.1016/j.compmedimag.2010.08.002. [DOI] [PubMed] [Google Scholar]
- 6.Xie F, Bovik AC. Automatic segmentation of dermoscopy images using self-generating neural networks seeded by genetic algorithm. Pattern Recognition. 2013;46:1012–9. doi: 10.1016/j.patcog.2012.08.012. [DOI] [Google Scholar]
- 7.Eysenbach G, Paessler J, Diepgen T. COM6 /485: Dermis. net - from a Dermatology Internet Atlas to a Dermatology Internet Portal Site. Journal of Medical Internet Research 1999;1(Suppl 1):e19. doi: 10.2196/jmir.1.suppl1.e19. [DOI] [Google Scholar]
- 8.Osher S, Sethian JA. Fronts propagating with curvature-dependent speed: algorithms based on Hamilton-Jacobi formulations. Journal of computational physics. 1988;79:12–49. doi: 10.1016/0021-9991(88)90002-2. [DOI] [Google Scholar]
- 9.Mumford D, Shah Optimal approximations by piecewise smooth functions and associated variational problems. Communications on pure and applied mathematics. 1989;42:577–685. doi: 10.1002/cpa.3160420503. [DOI] [Google Scholar]
- 10.Chan TF, Vese LA. Active contours without edges. IEEE Trans Image Process. 2001;10:266–77. doi: 10.1109/83.902291. [DOI] [PubMed] [Google Scholar]
- 11.Toossi MT, Pourreza HR, Zare H, Sigari MH, Layegh P, Azimi A. An effective hair removal algorithm for dermoscopy images. Skin Res Technol. 2013;19:230–5. doi: 10.1111/srt.12015. [DOI] [PubMed] [Google Scholar]
- 12.Otsu N. A threshold selection method from gray-level histograms. Automatica. 1975;11:23–7. [Google Scholar]
- 13.Cavalcanti PG, Scharcanski J, Lopes CB. Shading attenuation in human skin color images. Advances in Visual Computing: Springer; 2010. [Google Scholar]
- 14.Kennedy J, editor . The particle swarm: social adaptation of knowledge. 13-16 April 1997. Indianapolis: Evolutionary Computation, 1997, IEEE International Conference on; 1997. [Google Scholar]
- 15.Lei W, Huichuan D. Application of Otsu’method in multi-threshold image segmentation. Computer Engineering and Design. 2008;29:2844–5. [Google Scholar]
- 16.Soille P. Morphological image analysis: principles and applications. Berlin: Springer Science & Business Media; 2013. [Google Scholar]
- 17.Weickert J. Anisotropic diffusion in image processing. Stuttgart: Teubner Stuttgart; 1998. [Google Scholar]
- 18.Saez A, Serrano C, Acha B. Model-based classification methods of global patterns in dermoscopic images. IEEE Trans Med Imaging. 2014;33:1137–47. doi: 10.1109/TMI.2014.2305769. [DOI] [PubMed] [Google Scholar]