Segmentation of Skin Cancer Images

L. Xu, M. Jackowski, A. Goshtasby, C. Yu, D. Roseman, S. Bines, A. Dhawan, A. Huntley

This work has appeared in Image and Vision Computing, vol. 17, no. 1, 1999, 65-74.

This work is supported by NSF.


An automatic method for segmention of images of skin cancer and other pigmented lesions is presented. This method first reduces a color image into an intensity image and approximately segments the image by intensity thresholding. Then, it refines the segmentation using image edges. Double thresholding is used to focus on an image area where a lesion boundary potentially exists. Image edges are then used to localize the boundary in that area. A closed elastic curve is fitted to the initial boundary and is locally shrunk or expanded to approximate edges in its neighborhood in the area of focus. Segmentation results from twenty randomly selected images show an average error that is about the same as that obtained by four experts manually segmenting the images.


Fig. 1: (a) A color image showing an atypical lesion. (b) Image obtained after mapping colors into intensities in such a way that the intensity at a pixel is proportional to the CIELAB color distance (14) of the pixel to the average color of the background. (c) Gradient magnitudes of (b) obtained by the Soble operator. Larger gradients are shown brighter.

Fig. 2: (a) A desirable function for mapping color distances to image intensities. (b) Approximation of function (a) by (1/sqrt(2pi) x sigma)(1-exp(i^2 / 2sigma^2)).

Fig. 3. (a) Transforming intensities of Fig. 1b according to the function of Fig. 2b. (b) Smoothing of (a) with a 2-D Gaussian kernel of standard deviation 2 pixels.

Fig. 4. Intensities along an image scanline and the relation between the initial threshold value T and the double threshold values T1 and T2.

Fig. 5. (a)--(d) Thresholding the image of Fig. 3b at intensities equal to the average intensities of 3%, 6%, 10%, and 15% highest gradient pixels, respectively.

Fig. 6. (a), (b) Thresholding image of Fig. 3b with threshold values T1=131 and T2=195, respectively. T1 and T2 were obtained by setting parameter d=10. (c) Mask obtained by Exclusive-Oring images (a) and (b). (d), (e) Same as (c), except that d was set to 5 and 15, respectively.

Fig. 7. (a) Authentic edges (17) of image 3b. (b) Edges of (a) corresponding to the top 10% highest gradients in the image. (c) Edges of (a) falling in the mask of Fig. 6c. (d) Initial boundary shown in Fig. 5c when overlaid with (c). (e) Edges in (d) obtained by expanding or shrinking the initial contour. (f) A rational Gaussian curve fitting the points in (e). (g) Overlaying the curve obtained in (f) with the original image shown in Fig. 1a. This is the final segmentation result when using p=8%, d=10 pixels, and sigma=2 pixels. Increasing sigma to 3 pixels, we obtain the segmentation result shown in (h).

Fig. 8. Twenty images of skin lesions. Images 1--6, 7--13, and 14--20 show atypical, benign, and malignant lesions, respectively.

Fig. 9. Lesion boundaries of the images shown in Fig. 8 when manually traced by (a), (b) two surgeons, (c) a dermatologist, and (d) a bioengineer.

Fig. 10. (a) Best automatic segmentation result. (b) Worst automatic segmentation result.

Table 1. Segmentation errors obtained when varying input parameters sigma, p, and d. A table entry under a particular expert was obtained by overlaying an automatically segmented lesion with the lesion manually segmented by that expert and computing the ratio of the sum of the areas that did not overlap and the sum of the lesion areas, and then finding the average of such ratios for the twenty images. Experts 1 and 2 were surgeons, Expert 3 was a dermatologist, and Expert 4 was a bioengineer.

Table 2. Variations amongst experts when segmenting the images of Fig. 8. The entry corresponding to experts j and k is obtained by computing the sum of areas nonoverlapping over the sum of areas manually traced by experts j and k for each lesion and finding the average of such ratios over the twenty images. Experts 1 and 2 were surgeons, Expert 3 was a dermatologist, and Expert 4 was a bioengineer.

[WSU Home Page] [CSE Department Home Page] [Intelligent Systems Lab Page]

For more information contact A. Goshtasby (

Last modified: 12/8/97