**4. The proposed technique**

In this research, we propose a novel technique to remove hair pixels from dermoscopic images. The YIQ (luminance (Y), hue (I), and saturation (Q ). The first component, luminance, represents gray scale information, while the last two components make up chrominance (color information)) or National Television System Committee (NTSC: the analogue television system used in North America and Japan) color space is chosen because the hair pixels are well demonstrated by only luminance (Y-channel) image, for example, compared to RGB as shown in **Figure 2**. In addition to Red, Green, and Red (RGB) color space, the Hue, Saturation, and Value (HSV) and YCbCr (Y is the brightness (luma), Cb is blue minus luma (B-Y), and Cr is red minus luma (R-Y)) color spaces present the hair pixels in more than one channel too. This issue complicates the hair removal task and may affect the performance.

The Y-channel image is partitioned into 256 non-overlapped blocks. During experimental studies, several block sizes are tested such as 4×4, 8×8, 16×16, and so on. We concluded that the implementation of block size 16×16 introduced better results for inpainting stage as compared with other block sizes. For each block, morphological operators and histogram analysis are implemented to detect hair pixels and inpainting operation as well to replace hair pixels by nonhair skin pixels. This section describes the proposed algorithm for automatic hair detection and inpainting operations. To achieve the aims of this research, **Figure 3** describes the work mechanism, and each step is described in the following subsections.

## **4.1 Color space conversion**

As depicted in **Figure 4**, the conversion operation from the input image (RGB) into YIQ color space.
