SharpRazor: Automatic removal of hair and ruler marks from dermoscopy images. Issue 4 (30th March 2023) - Kasmi, Reda; Hagerty, Jason; Young, Reagan; Lama, Norsang; Nepal, Januka; Miinch, Jessica; Stoecker, William; Stanley, R Joe
Abstract: Background: The removal of hair and ruler marks is critical in handcrafted image analysis of dermoscopic skin lesions. No other dermoscopic artifacts cause more problems in segmentation and structure detection. Purpose: The aim of the work is to detect both white and black hair, artifacts and finally inpaint correctly the image. Method: We introduce a new algorithm: SharpRazor, to detect hair and ruler marks and remove them from the image. Our multiple‐filter approach detects hairs of varying widths within varying backgrounds, while avoiding detection of vessels and bubbles. The proposed algorithm utilizes grayscale plane modification, hair enhancement, segmentation using tri‐directional gradients, and multiple filters for hair of varying widths. We develop an alternate entropy‐based processing adaptive thresholding method. White or light‐colored hair, and ruler marks are detected separately and added to the final hair mask. A classifier removes noise objects. Finally, a new technique of inpainting is presented, and this is utilized to remove the detected object from the lesion image. Results: The proposed algorithm is tested on two datasets, and compares with seven existing methods measuring accuracy, precision, recall, dice, and Jaccard scores. SharpRazor is shown to outperform existing methods. Conclusion: The Shaprazor techniques show the promise to reach the purpose of removing and inpaint both dark and white hair in a wide variety of lesions.