Abstract
Introduction
S
All LHR devices are based on the principles of selective photothermolysis and the extended theory of selective photothermolysis. 9,10 The laser released from the light output window of the device reaches the hair follicle and damages it without causing collateral damages to the nearby environment. 7,9 Before performing LHR, the target area is completely shaved of hair for optimal laser irradiation. 11 –14 This method not only provides optimal hair removal results but also prevents burnt hair. 15,16
The assessment of the quantitative result of hair removal cannot depend solely on the appearance of the target area before and after the procedure. Several patent applications for computer-assisted image analysis devices for use in evaluating hair growth have been published since the 1990s. 17 –19 Counting the number of hairs on an area may not be the only measurement criterion to indicate a healthy hair condition. 20 However, it is still imperative to determine the number of hairs in a specific area corresponding to the wide area because the absolute quantity of hair reflects the true effects of a treatment applied. Quantification of hair is a challenging task. The best result can be achieved by manually counting all hairs on the skin of a target area; however, this method is not practical in reality.
An alternative is to take photographs and count the hairs with eyes; however, this task is also technically difficult and prone to human errors and subjectivity. A quick and accurate method for counting the number of hairs within a wide region can build confidence in the treatment results among clinicians and patients. Further, the data from the treatment with an LHR device can be easily quantified and saved digitally for future reference. Hair quantification studies have been conducted by some research groups. TrichoScan® Research (TRICHOLOG GmbH, Freiburg, Germany), for example, has many built-in features, including the automatic analysis of the hair condition, hair count, hair thickness, and hair length. 20 –23 The method uses an image processing technique to quantify hair. 24
However, the analysis area is up to a 2 cm2 circle, and the test requires the application of hair dye. 20,25 Lim et al., on the contrary, counted each hair with eyes by using photographs, and although this was a relatively accurate method, the process was time-consuming, tedious, and slow. 26
To resolve these problems and produce a dependable, accurate, and fast solution, we developed a computer-aided image processing system to count the hairs on shaved skin and validated its performance through clinical trials. The proposed system is an automatic standardized counting system with less bias and fast results, allowing the quantification of hair to serve as a basis for analysis. It can aid clinicians with automatic hair detection, placing a “+” sign on each site of positive hair detection in the image. Through this method, it can easily be checked whether hair is counted or not by performing comparisons with the original image. The present article focuses on the difference in the hair counts between the proposed system and the manual counts by a human observer. The system will benefit both patients and physicians in terms of fast and reliable judgment about the results of hair treatment methods.
Materials and Methods
The research protocol was approved by the Institutional Review Board of Seoul National University Hospital (No. H-1602-067-740), and the study was conducted in accordance with the 2013 revision of the Declaration of Helsinki.
The inclusion criteria for subjects were a minimum of 35 hairs within an area of 90 × 120 mm2 on each thigh and an equivalent amount of hair on both thighs. The exclusion criteria were any photographs that contain personal information of subjects, any area other than the lower half of the body and technical failures such as out of focus effect.
Clinical trials and hardware setup
Figure 1 depicts the procedures for the clinical trials and the hardware setup. The subjects wore short pants to expose the thighs and laid down on a thin mat in a comfortable position. A brief summary of the specifications of the hair count system is provided in Table 1. Figure 2 illustrates the subjects' pose, the locations of the DSLR camera, and the LED light bulbs. In all subjects, the target area of 90 × 120 mm2 was thoroughly shaved with an electrical shaver (ES-148; Panasonic, Osaka, Japan). Thereafter, a photograph was taken by using a digital camera (DSLR D5100; Nikon, Tokyo, Japan) with an AF-S Micro NIKKOR 40 mm 1:2.8 G lens. The camera was fixed on a tripod throughout the experiment, and a photograph was taken at a fixed distance in A-mode. The original resolution of the image was 4928 × 3264 pixels/mm2.

The procedures for clinical trial and hardware setup. It starts from subjects enter for clinical trial to acquiring image for image processing.

Subject's pose during the photograph session, location of DSLR camera, and LED light bulb.
N/A, not available; SW, software.
Two LED light bulbs, each directed toward the target area, were installed to minimize shade and create a homogeneous light effect on the surface of the target area. The distance between the target area and the DSLR lens was vertically fixed at 20 cm to reduce the fish-eye effect and the occurrence of blur on the edges of images. The distance of 20 cm was empirically determined and showed optimal results.
Image processing algorithm
A series of image processing steps were conducted to achieve the objective (Fig. 3). First, the area of 90 × 120 mm2, the region of interest (ROI), was cropped from the original photograph file. The ROI was then divided into two 90 × 60 mm2 areas. As both thighs were photographed, there were four 90 × 60 mm2 samples for each subject. Therefore, a total of 20 samples from five subjects were collected. Before image processing, the file size of the DSLR image was 3000 × 1200 pixels 2 , which was much higher than necessary. Therefore, the horizontal and vertical sizes were truncated by one-third of the original size. After the resizing process, cubic interpolation was performed to reduce the size and noise of the entire area. Direct cubic convolution interpolation reduces the loss of information in the image, preserves the nature of the edges, and minimizes the artifacts. 27,28

The image processing steps in diagram. RGB, red, green, and blue; ROI, region of interest.
These features allowed keeping the edges of hairs within the image while reducing unwanted noises. As hairs are extremely thin and appear as small dots on the image, they are rather easily eliminated during the denoising step in image processing. To keep the hairs in the image and reduce the extra light on skin texture and pores, a Gaussian blur technique based on probability density function was used, followed by the black-hat operation to isolate objects (hair) on the image that show brightness changes relative only to the area to which they are attached (skin). Therefore, the black-hat operation can display regions that are darker than the surrounding area. 29 Hence, the green space was separated from the RGB (red, green, and blue) channel. The black color of hair could be represented as zero in the RGB channel and the color of skin has distinguishably higher numbers in the R and G space than do hairs.
Within the image, small red spots or erythema can exist, which create irregularities or noise; therefore, the G space was separated and chosen for use in the analysis. As a last step of image processing, adaptive thresholding was done to adjust and modify the image of the target area relative to its surroundings. With this method, all pixels in the target area were weighted equally. This technique served to control the reflection of light or illumination gradient within the ROI. The image processing step allowed hairs on the target area to be captured and detected on the image, and counted using the developed program.
Visual hair count
Adobe Photoshop CC 2014 (Adobe, Inc., San Jose, CA) was used to open the photograph files. Each hair was counted with eyes by three different human observers, and then the average value was computed. The evaluators attempted to be as objective as possible in recognizing and counting hairs from the images, and used the zoom-in and zoom-out functions when necessary.
Statistical verification
All of the statistical calculations were performed by using IBM SPSS Statistics 23 (IBM, Armonk, NY). Table 2 provides brief explanations on the null hypothesis (H0) and the alternative hypothesis (HA) used for the statistical assumptions to validate and make decisions on the data. The percentage error was measured by using the following equation:
The statistical analysis of the experimental data was verified by using the Shapiro–Wilk test for the normality of the data; Levene's test was used to assess the equality of variances; and Student's independent t-test was performed to show whether the sets of data were significantly different from each other.
Results
Figure 4 illustrates the results of two samples. Figure 4a shows two different samples from the cropping, both sized 90 × 60 mm2; Fig. 4b shows the automatic results of the proposed system; and Fig. 4c shows the manual results for the same samples. From the images, it can be easily seen that the results from the automatic and manual methods were not heavily different from each another. Table 3 shows the number of hairs counted with the two methods (automatic with the proposed system and manual counting with eyes by using the photographs). The error rate was measured by using Equation (1), to compare the results from the proposed system with the manual counts, which is considered the standard. The error percentages represent the results calculated by using Equation (1). The data show that the error rates were all <5%.

The results of two samples.
Percentage error = ∣Automatic – Manual∣ * 100/Manual.
Averages of time consumed per subject measured in minute: second.
The average, standard deviation, and standard error of mean of the automatic counts were 180.70, 26.41, and 5.90, respectively. For the manual counts, the values were 184.45, 26.21, and 5.86, respectively. Regardless of the number of hairs on the sample data, the hair counting process took <0.5 sec for the automatic system, while it took an average of 8 min 25 sec for the manual method. The averages of the time taken for counting hairs in each subject for both methods are provided in Table 3 to show the efficiency and accuracy of the proposed system.
In this study, the data were divided into two groups depending on the method of counting used (automatic and manual). The Shapiro–Wilk test, used to test the normality of data, showed p-values of 0.051 and 0.052 for automatic and manual counting, respectively. As both p-values were >0.05, the H0 was accepted and the data of both groups were considered to show normality. Levene's test showed a p-value of 0.863, which indicated that homogeneity of variance existed, and the H0 was accepted. Finally, Student's independent t-test revealed a p-value of 0.655, indicating that the averages of the two groups were statistically equivalent and their data were not different.
Discussion
Through this research, we developed a dependable and fast method of counting hairs on shaved skin, through a computer-aided image processing system, and validated its performance by means of clinical trials. Overall, the results indicated that there was no statistical difference between the manual method of counting and our proposed automatic system, which shows the reliability of the automatic method. As the automatic method relies on image processing algorithms, the hair counts will not be completely accurate; however, it enables counting with a high reliability. Further, the function of placing “+” signs on the image allows clinicians to perform comparisons with the original image and determine any omission or redundancy in the counting process.
The hardware of the system (e.g., CPU and RAM) can be varied but the automatic process is, of course, extremely faster than counting with eyes. The performance of the system will remain constant and the results are dependable with the right setup environment, as described in the Materials and Methods section. Compared with manual counting of hairs on the photographs with eyes, problems related to human errors and subjectivity of judgment can be minimized by adopting the proposed system.
This study can be enhanced by resolving the following limitations. First, the proposed system is preferably used on subjects with light skin and dark (near to black) hairs. Because the clinical trials were performed in Asia (Republic of Korea), we were unable to include subjects with diversity in skin tone and hair color. Therefore, our system was tested in subjects who mostly have light skin and dark hairs. Nevertheless, owing to the nature of the image processing algorithm of the proposed system (i.e., color disparity between the inliers [hair] and the surrounding area [skin] was considered), subjects with high disparities in skin and hair color (light hair/dark skin or dark skin/light hair) are preferred. Second, the proposed system was clinically tested only on the thighs, which are relatively flat and less contoured body parts.
It has not been tested on other sites, including the axilla, inner thighs, calves, and chin. Further, it should be aware that although the subjects had relatively similar skin tones, the photograph results can be varied considerably depending on the light condition; therefore, the light conditions and camera setup angle should be kept constant for collecting quality data. In our study setting, thorough shaving of hair with an electric shaver made the size of the follicle to be much smaller than that of postinflammatory hyperpigmentation (PIH). Through the threshold method of image processing, we were able to distinguish and disregard objects that were abnormally larger or brighter than the acceptable size or color ranges of the follicles.
However, since there can be various types and sizes of PIH and our system was not heavily centered on testing against various types of PIH, it is possible that our system has limitations on detecting PIH. We will accompany the specific functions to distinguish the various types of PIH in our following research. With the success of the present research and the developed system, we aim to conduct further studies in the near future involving comparative research with other confirmed devices such as Folliscope system (LeadM Corp, Seoul, South Korea) or TrichoScan (TRICHOLOG GmbH) used in the industry.
Conclusions
The proposed system does not require conditions other than keeping the lighting and the vertical distance from the target area constant. Further, hair dye application and hair trimming methods are not required. Therefore, the proposed system is expected to be useful in evaluating the results of multiple treatments related to hair quantity, including LHR and hair transplantation, and is expected to be widely applicable for clinical use.
Footnotes
Acknowledgments
This work was supported, in part, by the BK21 Plus Program through the National Research Foundation (NRF) funded by the Ministry of Education (Grant No. 22A20130011025) and the Seoul Ocean Aquarium (No. 0411-20130059).
Author Disclosure Statement
No competing financial interests exist.
