Automated Digital Hair Removal by Threshold Decomposition and Morphological Analysis J. Koehoorn 1 , A. Sobiecki 1 , D. Boda 2 , A. Diaconeasa 2 , S. Doshi 4 , S. Paisey 5 , A. Jalba 3 , and A. Telea 1,2 1 JBI Institute, University of Groningen, the Netherlands {j.koehoorn, a.c.telea, a.sobiecki}@rug.nl 2 University of Medicine and Pharmacy ‘Carol Davila’, Bucharest, Romania {daniel.boda, adriana.diaconeasa}@umf.ro 3 Eindhoven University of Technology, the Netherlands a.c.jalba@tue.nl 4 School of Computer Science and Informatics, Cardiff University, UK doshisk@cardiff.ac.uk 5 School of Medicine, Cardiff University, UK paiseysj@cf.ac.uk Abstract. We propose a new approach to digital hair removal from dermoscopic images, based on a threshold-set model. For every threshold, we adapt a recent gap- detection algorithm to find hairs, and merge results in a single mask image. Next, we find hairs in this mask by combining morphological filters and medial descriptors. We derive robust parameter settings for our method based on its application on over 300 skin images. We detail a GPU implementation of our method and show how it compares favorably with five existing digital hair removal methods. Keywords: Hair removal, threshold sets, morphology, skeletonization 1 Introduction Automatic analysis of pigmented skin lesions [14,7] occluded by hair is a challenging task. Several digital hair removal (DHR) methods address this by finding and replacing such hairs by plausible colors based on surrounding skin. Despite much work in this area [19,30,15,12,2,13], DHR methods are challenged by hairs which are thin, entangled, of similar contrast or color to underlying skin, or overlaid on a highly-textured skin structure. We present a new DHR approach that addresses most above problems. After converting the skin image into a luminance threshold-set, we adapt a recent gap-detection technique to find thin structures that are potential hairs in each threshold layer. All found gaps are next merged into a single hair mask, from which we find actual hairs using a combination of morphological techniques and 2D medial axes, and finally remove these by image inpaint- ing. We implement our pipeline on the GPU, which yields speeds comparable to all DHR algorithms we are aware of, while producing results of similar or higher quality. Section 2 reviews related work on digital hair removal. Section 3 details our DHR method. Section 4 presents implementation details. Section 5 compares our results with five DHR methods and also shows a separate application for the restoration of CBCT images. Section 6 discusses our method’s speed, robustness, and parameters. Section 7 concludes the paper. 2 Related Work In the past decade, several DHR methods have been proposed. DullRazor, the first and arguably best known method, finds dark hairs on light skin by a generalized morphological