Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/308817316

Hair removal on dermoscopy images

Conference Paper  in  Conference proceedings: ... Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology
Society. Conference · August 2015
DOI: 10.1109/EMBC.2015.7319013

CITATIONS READS

11 212

2 authors:

Ilias Maglogiannis Konstantinos K Delibasis


University of Piraeus University of Thessaly
375 PUBLICATIONS   4,578 CITATIONS    118 PUBLICATIONS   1,205 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

CrowdHEALTH View project

IFIP AIAI conference 2012 View project

All content following this page was uploaded by Ilias Maglogiannis on 09 November 2020.

The user has requested enhancement of the downloaded file.


Hair Removal on Dermoscopy Images
Ilias Maglogiannis, Senior Member IEEE, Kostantinos Delibasis

Abstract— Digital Dermoscopy is a tool commonly used by identified hair pixels with neighboring non-hair pixels and c)
dermatologists for assisting the diagnosis of skin lesions. The the smoothing of the final result. DullRazor can only be
presence of hair in such dermoscopic images frequently applied to dark hairs, but not to light colored hair. Schmid et
occludes significant diagnostic information and reduces their al. [4] developed an algorithm in which the morphological
value. In this work we propose algorithms that successfully closing operator was applied to the three components of the
identify and remove hair from the dermoscopic images. The
L*u*v* uniform color space, with similar results as
proposed algorithms consist of two parts; the first deals with
the identification of hair, while the second part concerns the DullRazor. Xie et al. [5] used the morphologic closing-based
image restoration using interpolation. For the evaluation of the tophat operator to enhance hairs in the melanoma image and
algorithms we used ground truth images with synthetic hair then used a statistic threshold for segmentation. Finally the
and compared the results with the commonly used in the hairs are extracted and a PDE-based image inpainting
literature DullRazor tool. According to the experimental results technique is applied to repair the image. Kiani et al [6] used
the proposed hair removal algorithms can be used successfully the Radon transform to detect the predominant orientation of
in the detection and removal of both dark and light colored hairs in the image, followed by filtering the image by Prewitt
hair. filters using the orientation of existing hairs. Toossi et al [2]
I. INTRODUCTION AND RELATED WORK proposed an algorithm in which an adaptive canny edge
detector is used to identify hairs and they are repaired based
Dermoscopy, also known as dermatoscopy or on multi-resolution coherence transport inpainting. Sultana
epiluminescence microscopy, is the examination of skin et al [7] applied a simple Top Hat morphological technique
lesions using the dermatoscope, which is a medical to identify hairs and used patch-based inpainting to restore
instrument used from dermatologists in the examination of the image.
such skin lesions. Melanoma is one of the most common and In this paper we present and compare five novel algorithms
aggressive form of cancer, therefore accurate and early-stage that identify and remove both dark and light colored hair
melanoma detection is particularly important for the survival from dermoscopic images. In these algorithms we have
of patients [1]. However the use of dermoscopy by combined some of the steps included in the surveyed
inexperienced dermatologists may have the opposite result methods and we have optimized the workflows using trial
and lead to lower rates of accurate melanoma detection. and errors measurement. In this context for the performance
Therefore it is necessary to develop computer based evaluation of the algorithms we used ground truth images
automated diagnostic systems, in order to assist the early with synthetic hair of different color.
diagnosis of melanoma [2]. Hair removal is an important
step in the development of these systems since the presence II. METHODS
of hair in dermoscopic images might conceal important In the following subsections, we describe shortly the
information about the depicted skin lesions. proposed five hair removal methodologies; namely Bothat,
Several methods have been developed over the past few Laplasian LoG, Logsobel and LLS algorithms.
years for the removal of hair in dermoscopic images. The
first approach is from Lee et al [3], who developed a freely A. Bothat based algorithm
available program called DullRazor that consists of three Figure 1 shows the workflow followed in the Bothat based
parts: The identification of hair location using morphological algorithm. In this approach the initial RGB image is
operations, such as image closing, b) the replacement of converted to grayscale. Subsequently a 3x3-averaging filter,
followed by a Laplacian -based sharpening filter [8] is
*Research supported by the 12CHN 204 Bilateral Greece-China applied. The Laplacian image is subtracted from the
Research Program of the Hellenic General Secretariat of Research and previously denoised image to obtain a sharpened result. In
Technology and the Chinese Ministry of Research and Technology entitled
“Personalization of melanoma therapeutic management through the fusion order to detect the hairs, which are basically thin and long
of systems biology and intelligent data mining methodologies-PROMISE”, structures, we used the Bottom-hat transformation [9], which
sponsored by the Program “Competitiveness and Entrepreneurship”, performs a morphological closing of the original image
Priority Health of the Peripheral Entrepreneurial Program of Attiki. using linear structuring elements at different orientations.
I. Maglogiannis and S. Kranitι are with University of Piraeus, Dept. of
Digital Systems, Piraeus, Greece (e-mail:imaglo@unipi.gr ). The original image is then subtracted from the “closed” one,
K. Delibasis is with University of Thessaly, Dept of Computer Science followed by an enhancement in the image contrast. The
and Biomedical Informatics Lamia Greece

978-1-4244-9270-1/15/$31.00 ©2015 IEEE 2960


intensity image adjustment technique maps the intensity
B. Laplacian based algorithm
values in the original image to new values in the output
image such that 1% of data is saturated at low high Figure 1 shows also the workflow followed in the Laplacian
intensities of the original image; thus increasing the contrast based algorithm. The image is converted to grayscale and a
of the output image. In order to convert the intensity image sharpening filter based on the Laplace operator is applied.
into binary we applied a global image threshold using Otsu's Then the filtered image is subtracted from the initial image.
method [10]. This global threshold is a normalized intensity To remove any possible noise we use a 3x3 adaptive noise-
value that lies in the range [0, 1]. The binary image produced removal Wiener filter [11]. Hair strands detection is done
by this process is a mask that contains the outlines of the using the Laplacian of Gaussian edge detection operator
identified hair strands. In order to fill the outlines and obtain [12], which finds edges by looking for zero crossings. The
the final hair mask we utilized the dilation operation using a final binary hair mask is obtained by using morphological
line structuring element of 9 pixels length. Figure 2 operations in order to bridge unconnected pixels, remove
illustrates all the intermediate images produced by the isolated pixels and eliminate 8-connectivity of the
Bothat based algorithm. background. Figure 3 illustrates all the intermediate images
produced by the Laplacian algorithm.
C. LoG based algorithm
Figure 4 groups the workflows of the LoG, Logsobel and Lls
based algorithm. In the LoG based algorithm the RGB image
is separated into the three channels and the Laplacian of
Gaussian edge detection method is applied to the red channel
as the more informative in digital dermoscopy. By trial and
error we found that if we use a higher threshold in the LoG
method we get less false identified hair pixels in the hair
mask. In Figure 5 all the intermediate images produced by
the Log based algorithm in every stage of hair identification
and removal are depicted.
D. Logsobel based algorithm
This algorithm adds the output of the LoG and the Sobel
edge detection method. Finally, a 3x3 wiener noise reduction
filter id applied. Figure 6 illustrates all the intermediate steps
of this algorithm.
E. Lls based algorithm
In this algorithm, the initial RGB image is converted to
grayscale, and fed into the Laplacian operator. The filtered
image is subtracted from the grayscale one. The Log and the
Sobel edge detection method are applied to the resulting
image. The subsequent steps are the same steps as in the
Logsobel-based algorithm. Figure 7 illustrates all the
intermediate steps of this algorithm.
Figure 1. Diagram showing the hair removal process followed by the Bothat
based and the Laplacian based algorithm

             
a b C d e   f g

             
h i j k l m q
Figure 2. Hair identification and removal stages using the Bothat based algorithm a) original RGB image b) image converted to grayscale c) average image
filtering d) Laplacian image filtering e) subtraction of images c,d f) Bottom-hat transform (se0) g) Bottom-hat transform (se45) h) Bottom-hat transform
(se90) i) addition of images f,g j) addition of images h,i k) image adjustment l) global image thresholding m) image dilation q) final image.

2961
 

             
a b c d e   f g

             
h i j   k l m q
Figure 3. Hair identification and removal stages using the Laplacian based algorithm a) original RGB image b) image converted to grayscale c)
Laplacian image filtering d) subtraction of images b,c e) noise reduction filtering f) Log edge detection g) morphological operation (bridge) h)
morphological operation (diag) i) morphological operation (clean) j) image closing (se0) k) image closing (se45) l) image closing (se90) m) image
dilation q) final image

III. RESULTS
In order to evaluate the developed hair removal algorithms
we created images with synthetic hairs, by simulating lines
to match the hair structure with different color: black, dark
brown and light brown. These images were used as the
ground truth hair masks. Tables I, II, III display the
corresponding results.
Sensitivity relates to the ability of the proposed hair removal
methods to identify hair pixels correctly, whereas Specificity
relates to the ability of the hair removal method to exclude
hair pixels correctly. Accuracy is used as a statistical
measure of how well the hair removal method identifies or
excludes hair pixels. we also use the Balanced Accuracy [13]
which can be defined as the average accuracy
(Q=(Sensitivity + Specificity)/2). The Matthews correlation
coefficient (MCC) and the Root Mean Square Error (RMSE)
are also used to measure the difference between the original
ground truth image without hair and the processed image.
An additional evaluation was done using manual marking on
10 existing dermoscopy images that contain hairs that
compared with the binary masks produced by the proposed
algorithms as well as the binary mask produced by
DullRazor. The results of this process are shown in Table
Figure 4. Diagram showing the hair removal process followed by the
IV.
Log based algorithm, the Logsobel based algorithm and the Lls based
Although DullRazor has a very high Specificity and algorithm.
therefore achieves high Accuracy, it has really low
Sensitivity, which means that many hair pixels are TABLE I. RESULTS OF THE FIVE ALGORITHMS FOR THE GROUND TRUTH
misclassified as non-hair pixels resulting in a high RMSE. IMAGE WITH BLACK HAIR

On the other hand the proposed algorithms achieve high Method SENS SPE Q ACC MCC RMSE
Sensitivity as well as Specificity resulting to high Balanced Bothat 100.00 92.65 96.32 92.68 0.22 1.32
Accuracy and low RMSE. In order to receive a qualitative Laplacian 100.00 84.74 92.37 84.80 0.15 2.47
evaluation of the algorithms we asked an experienced Logsobel 100.00 88.32 94.16 88.36 0.17 2.32
Log 100.00 93.76 96.88 93.79 0.24 1.70
dermatologist to express his opinion. His response was that
Lls 100.00 92.31 96.15 92.34 0.21 1.51
the Log algorithm is the most effective for the removal of DullRazor 38.75 99.93 69.34 99.69 0.51 9.86
black and dark brown hair, whereas the Lls algorithm is the
most effective for the removal of light brown hair.

         
a b c d e  
Figure 5. Hair identification and removal stages using the Log based algorithm: a) original RGB image, b) Log edge detection, c) image dilation d) image
erosion, e) final image

2962
             
a b   c d e f g
Figure 6. Hair identification and removal stages using the LogSobel based algorithm a) original RGB image, b) Log, c) Sobel edge detection, d)
addition of images b and c, e) image closing result, f) image dilation, g) final interpolated image.

             
A b c d e   f g

           
H i j k l m
Figure 7. Hair identification and removal stages using the Lls based algorithm a) original RGB image b) conversion to grayscale c) Laplacian image
filtering d) subtraction of images b,c e) Log edge detection f) Sobel edge detection g) addition of images e and f, h) noise reduction filtering, i) conversion
to binary, j) morphological operation (area open) image closing (se0), k) image dilation, l) image erosion, m) final interpolated image

TABLE II. RESULTS OF THE FIVE ALGORITHMS FOR THE GROUND


TRUTH IMAGE WITH LIGHT BROWN HAIR
IV. CONCLUSION
Method SENS SPE Q ACC MCC RMSE In this paper, we presented five algorithms for the identification and
Bothat 68.11 93.87 80.99 93.77 0.16 1.47 removal of hair from dermoscopic images. The proposed algorithms were
Laplacian 100.00 84.61 92.30 84.67 0.15 2.48 developed in Matlab R2013a using a computer with an Intel Core i3-3120 at
2.50 GHz and 4.00 GB RAM. The size of all images is 800x600 pixels.
Logsobel 100.00 79.74 89.87 79.82 0.12 3.06 Processing time for the Bothat based algorithm was 1.3 sec, for the
Log 91.34 94.04 92.72 94.03 0.22 1.72 Laplacian based algorithm 1.6 sec, for the LogSobel based algorithm 1.4
sec, for the Log based algorithm 1.1 sec and for the LLs based algorithm 1.3
Lls 100.00 92.32 96.16 92.35 0.21 1.54 sec. The proposed algorithms proved to be successful in the identification
DullRazor 30.73 100.00 65.36 99.73 0.55 6.81 and removal hairs with the Lls algorithm proven to be the most effective for
the removal of light brown hair
TABLE III. RESULTS OF THE FIVE ALGORITHMS FOR THE GROUND
TRUTH IMAGE WITH MANUALLY MARKED HAIR. REFERENCES
Method SENS SPE Q ACC MCC RMSE [1] S.W. Menzies, "Cutaneous melanoma: making a clinical diagnosis, present and
future," Dermatologic therapy 2006, 19 (1), 32-39.
Bothat 68.11 93.87 80.99 93.77 0.16 1.47
[2] M.T. Toossi, et al., "An effective hair removal algorithm for dermoscopy images,"
Laplacian 100.00 84.61 92.30 84.67 0.15 2.48 Skin Res Technol 2013, 19 (3), 230-235.
[3] T. Lee, et al., "DullRazor: a software approach to hair removal from images,"
Logsobel 100.00 79.74 89.87 79.82 0.12 3.06
Computers in biology and medicine 1997, 27 (6), 533-543.
Log 91.34 94.04 92.72 94.03 0.22 1.72 [4] P. Schmid-Saugeona, et al., "Towards a computer-aided diagnosis system for
pigmented skin lesions," Computerized medical imaging and graphics : the official
Lls 100.00 92.32 96.16 92.35 0.21 1.54 journal of the Computerized Medical Imaging Society 2003, 27 (1), 65-78.
DullRazor 30.73 100.00 65.36 99.73 0.55 6.81 [5] F.Y. Xie, et al., "PDE-based unsupervised repair of hair-occluded information in
dermoscopy images of melanoma," Computerized medical imaging and graphics : the
official journal of the Computerized Medical Imaging Society 2009, 33 (4), 275-282.
TABLE IV. RESULTS OF THE FIVE ALGORITHMS FOR THE GROUND [6] K. Kiani and A.R. Sharafat,“E-shaver: An improved DullRazors for digitally
TRUTH IMAGE WITH MANUALLY MARKED HAIR. removing dark and light-colored hairs in dermoscopic images” , Computers in biology
and medicine 2011, 41 (3), 139-145.
[7] A. Sultana et al.,”Removal of artifacts from dermatoscopic images”,
Method SENS SPE Q ACC MCC Communications (COMM), 2014 10th International Conference 2014
[8] R. Gonzalez and R. Woods Digital Image Processing, Prentice-Hall, Inc.,2002, pp.
Bothat 56.54 92.36 74.45 90.31 0.37
125-137
Laplacian 87.05 87.08 87.07 87.08 0.46 [9] Haralick, Robert M., and Linda G. Shapiro, Computer and Robot Vision, Vol. 1,
Addison-Wesley, 1992.
Logsobel 84.00 93.28 88.64 92.75 0.57 [10] Nobuyuki Otsu (1979). "A threshold selection method from gray-level
histograms". IEEE Trans. Sys., Man., Cyber. 9 (1): 62–66.
Log 75.22 93.68 84.45 92.62 0.53 [11] Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs,
NJ, Prentice Hall, 1990, p.548, (Eqs 9.26, 9.27, and 9.29).
Lls 78.85 91.68 85.26 90.95 0.50 [12] Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs,
NJ, Prentice Hall, 1990, pp. 478-488.
DullRazor 33.80 99.64 66.72 95.87 0.52 [13] K. H. Brodersen, C. S. Ong, K. E. Stephan, J. M. Buhmann, “The balanced
accuracy and its posterior distribution”, 2010 International Conference on Pattern
Recognition

2963

View publication stats

You might also like