0% found this document useful (0 votes)
9 views

An Automated Approach Towards Digital

Uploaded by

akashraj122550
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

An Automated Approach Towards Digital

Uploaded by

akashraj122550
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

An Automated Approach Towards Digital

Photo-Trichogram for Hair Fall Diagnosis

Naren Debnath1, Nibaran Das2(&), Somenath Sarkar3,


and Mita Nasipuri2
1
Department of Computer Science and Engineering, Adamas University,
Kolkata, India
[email protected]
2
Department of Computer Science and Engineering, Jadavpur University,
Kolkata, India
[email protected],[email protected]
3
Department of Dermatology, Bankura Sammilani Medical College,
Bankura, West Bengal, India
[email protected]

Abstract. Identification of a specific type of alopecia or hair loss is essential to


get rid of hair loss issues. But identification of it is a challenging task to the
medial experts. Among different techniques, Digital Photo-Trichogram is one of
the popular non-invasive medical procedures for diagnosis of alopecia. In the
present work we propose a novel system which is able to measure automatically
the growth of hair without manual interaction and experts’ opinion. The
developed system can estimate hair fall related issues with the help of param-
eters such as unit area density, approximate average height and width of hair,
determination of vellus or terminal hair automatically from the picture of shaved
region of alopecia effected area. The system is tested with the samples collected
from Calcutta School of Tropical Medicine, Kolkata and achieve satisfactory
results.

Keywords: Index Terms—Digital Photo-Trichogram  Binarization


Inter-pixel gap  Horizontal and vertical scan

1 Introduction

Digital Photo-Trichogram is one of the non-invasive medical procedures for diagnosis


of hair fall disease or alopecia. In this method a portion of the scalp (1 mm2 to 2 mm2
area) is shaved and then the shaved portion is washed with dye for better contrast of the
captured image. After using the dye, a few numbers of suitable images of the shaved
portion are captured using either a very high resolution digital camera or a Digital USB
Microscope. There are other methods to diagnose alopecia, but Digital Photo-
Trichogram is nearly the most suitable and convenient method for current medical
cases. In India, dermatologists use their own cognition to detect and provide remedy for
hair loss. Since the number of patients increases every day, and their busy schedule, a
system is necessary for faster detection of the stages of alopecia. For recognizing and

© Springer Nature Singapore Pte Ltd. 2018


J. K. Mandal and D. Sinha (Eds.): CSI 2017, CCIS 836, pp. 314–329, 2018.
https://doi.org/10.1007/978-981-13-1343-1_28
An Automated Approach Towards Digital Photo-Trichogram 315

providing remedies for hair loss, very few computerized systems are available, among
which, TrichoScan® [1] is a popular one. But this software using Digital Photo-
Trichogram needs a good proportion of manual interaction for detecting features of hair
such as height, width, to determine whether the stage of hair is vellus or terminal.
Saraogi et al. [2] have identified the limitation of this software. Though existing works
do not provide any significant contribution, we have found only one research work by
Esfandiari et al. [3] which shows the use of Artificial Neural Network, for diagnosis of
hair loss using some numerical data allied to alopecia. In this research Two-Layer
Neural Network algorithms is used to detect the type of alopecia. They have tried to
diagnose the amount of hair loss using the factors like age, gender, genetic factors,
pregnancy, surgery record, zinc deficiency, iron deficiency and effect of the use of
cosmetics. This diagnosis was only based on some numerical test data obtained by
consultation with doctors and medical tests. The algorithms used in the paper are
Levenberg-Marquardt, Resilient Back Propagation, Powell-Beale Conjugate Gradient,
Fletcher Reeves Conjugate Gradient, Polak-Rebier Conjugate Gradient, and Scaled
Conjugate Gradient. The aforementioned factors for alopecia are the input parameters
for neural network. They obtained the Mean Square Error (MSE) and Mean Absolute
Error (MAE) to evaluate the performance of the neural network. Other works are
related to the evaluation of the TrichoScan® about its suitability and capability. In
Saraogi et al. [2] it is showed that optimality of detection of anagen/telogen hair
provides incorrect result and it is an overestimation of total hair density and the density
of vellus hair doesn‘t correlate the clinical severity of alopecia. It also showed that
single hair strands falsely divided into double hair strands at the point of exit from the
scalp surface and identified as telogen hair. Gassmueller et al. [4] validated that there is
excellent co-relation between TrichoScan® software and manual marking of hair for
about 10 patients. Holfmanet et al. [5] reported that TrichoScan® method is more
reproducible with smaller margin of operator error than with manual marking. To
address the issue in the present work we have estimated the density of the hair loss to
find out the features of hair strands such as height, width, percentage of vellus hair etc.
Sauvola’s [6] Binarization method is used followed by a novel method of horizontal
and vertical scanning. The database is created from The School of Topical Medicine,
Medical College, Kolkata, WB, India under the supervision of medical practitioners.
This paper is organized as: the immediate next sub-section states the motivation
towards this work followed by another subsection describing about the nature of hair
and hair loss. After that some of the related tasks are discussed followed by the present
work. In the present work we have discussed the data collection procedure along with
the proposed methodology. At the closure there is detailed discussion of experimental
results with the conclusion.

1.1 Motivation
In India only 25% of people with a general hair loss problem consult with dermatol-
ogists. Rest randomly search for the non-prescribed remedies and due to ignorance
many of them reach up to the verge of extinction of hair. Many patients, often, after
consulting with a dermatologist, stop following the prescribed medicines in interme-
diary period and also break the communication with the respective doctors. Keeping all
316 N. Debnath et al.

these factors in mind and to save precious time of patients, a system that can diagnose
the hair loss pattern and provide remedy for the respective hair loss problem is much
needed in our country. Some semi-automatic systems such as TrichoScan Smart,
TrichoScan Pro exist in other country only for the diagnosing purpose. So it is our
endeavor to develop a system that can automatically diagnose and provide a suggestion
for remedy of hair loss disease and also to help dermatologists to provide better
suggestion to their patients in a much more convenient manner in Indian sub-
continental conditions.

1.2 Hair and Hairloss


Hair is a composition of a special type of protein called Keratin. Cuticle, Cortex and
Medulla is the three concentric layers of each hair strand. Hair grows in four different
phases – Anagen, Catagen, Telogen, and Exogen. Different People have different
textures of hair, and hair-colors based on different environmental conditions. Very few
people take a good care of hair, as a result of which most of the people suffer from hair
fall. It is noticed by medical practitioners that 50 to 150 hair strands shed daily, which
is normal in nature, greater amount of it is considered as hair loss.
Hair loss patterns in male and female are called Male Pattern Hair Loss (MHPL)
and Female Pattern hair Loss (FHPL) respectively. We have considered only MPHL in
this work. There are different categories of hair loss, such as Androgenetic Alopecia,
Alopecia Areata, Telogen Effluvium, Traction Alopecia, Trichotillomania, Cicatricial
Alopecia and Hair Fall due to Hair-Shaft Abnormalities [7]. Androgenetic Alopecia
and Alopecia Areata is mostly observed alopecia in Indian people. The main agent
responsible for Androgenetic Alopecia is Dehydrotestosterone, a very powerful
Androgen hormone. It reduces the scalp hair and increases body and genital hair. Apart
from this, various other diseases like hormonal changes, consumption of drugs, envi-
ronmental factors, and genetic factors accelerate the hair loss problem and result in
cause complete hair loss [3].

2 Related Work

Segmentation of images is the process of dividing the image pixels into two groups,
background pixels and foreground pixels. Bi-level information of an image can be
obtained through segmentation which reduces the computational load and enables the
utilization of simplified analysis method compared to 256 grey level information [4].
There are a number of segmentation algorithms existing and they are categorized as
thresholding, region based, cluster based, graph based etc. [8]. Thresholding and region
based are mostly used segmentation methods among the all others. Thresholding based
segmentation is again categorized as Global threshold based and Local threshold based
[9]. Due to non-uniform illumination over the captured image, local pixel value dif-
ference, error in capturing images, the global thresholding method is insufficient. We
have used Local threshold based segmentation method in our work. Sauvola, Bersen,
Niblack [10] are three of many other local thresholding methods which we have used.
An Automated Approach Towards Digital Photo-Trichogram 317

Local Variance Method: Local variance method to calculate threshold is used by


both Niblack and Sauvola. Local mean m(x,y) and standard deviation of a window
sized r  r of a pixel are used in these techniques.
Niblack’s Method: Niblack’s method used the following equation to calculate the
threshold TP(x,y) at (x,y) position using window size r  r:

TPðx;yÞ ¼ mðx;yÞ þ kdðx;yÞ ð1Þ

In this equation m(x,y) and d(x,y) are the local mean and the standard deviation of
the pixel at (x,y) inside the window and k the bias. The value of k = −0.2 and r = 15
produce satisfactory results. The change of threshold according to the change of
contrast in the local neighbourhood of the pixel at (x,y) is adapted by the local mean m
(x,y) and standard deviation d(x,y). The level of adaptation which varies the threshold
value is controlled by the value of k.
Sauvola’s Method: Mean m(x,y) and standard deviation d(x,y) are used to calculate
the threshold value in Sauvola’s method using a window size r  r given as:
  
dðx;yÞ
Tðx;yÞ ¼ mðx;yÞ 1 þ k 1 ð2Þ
R

Local Grey Range using Bernsen’s Method: In Bernsen’s method local grey range
technique is used where the values between the maximum and minimum gray range
within the local neighborhood window are used to determine the threshold value.
The local threshold value Tðx;yg within a window size r  r is obtained as:

Tðx;yÞ ¼ 0:5 Imaxði;jÞ þ Iminði;jÞ ð3Þ

I maxði;jÞ and I minði;jÞ are the maximum and minimum values within the local
neighbourhood window and results the contrast.

Cði;jÞ ¼ Imaxði;jÞ  Iminði;jÞ  15 ð4Þ

The mean value of I max ði; jÞ and I min ði; jÞ is used to calculate the midrange value as
the threshold within the local neighbourhood window. In this method no bias controls
the threshold value. The value r = 31 provides satisfactory results.
Figure 1(ii) displays the comparison of the above mentioned three binarization
method using Digital Photo-Trichogram image.
318 N. Debnath et al.

3 Present Work
3.1 Database Preparation
Database design is the most challenging task of any pattern recognition problem for the
validation of different algorithms. The design of the databases of scalps is the most
important and crucial task of the present work. The methodology of Digital Photo-
Trichogram process is followed under the present work for creation of the database.
The overall process consists of: (1) shaving off a small portion of the scalp of patients,
(2) dying the shaved area of the scalp for better contrast, (3) capturing the image of that
area using a digital camera. The other records of patients are also kept appropriately for
the proper treatment and future references. As this kind of image database is being
designed for the first time for research in Image Processing in India, due to lack of
appropriate standard some data are rejected. The other difficulties we have faced during
collection of images are, non-availability of proper resources such as (USB digital
microscope), environmental burden, lack of the patient’s time, and proper shaving and
cleansing material for the imaging of affected scalp area. A set of images from image
database is given in Fig. 1(i).

(i) (ii)

Fig. 1. (i) Examples of sample images form the collected database (ii) Comparison of three
binarization method on sample image a.
An Automated Approach Towards Digital Photo-Trichogram 319

3.2 Proposed Method


Hair strand(s) which is (are) considered as foreground object, filled with distinct ran-
dom colour using 8-neighborhood pixel after binarization. If any of the neighbors of the
current black pixel of a particular object is also black then the current pixel is assigned
to the distinct random color and this process is continued recursively until any other
black neighbor pixel exists for that object.

Fig. 2. Inter-pixel gap between hair strands

Separation and Counting of Hair Strands


After segmentation by using Sauvola’s method, and filling with distinct random colour,
we found a considerable amount of inter-pixel (background colour) gaps in between the
same overlapped object. Considering this background inter-pixel gaps in the overlap-
ping hair strands shown in Fig. 2, have been separated by using the following method.
Separating a particular object (overlapped or single hair strand) is done by scanning
horizontally as well as vertically. For each horizontal and vertical scan the below
mention in Algorithm 1 is used.
320 N. Debnath et al.

Algorithm 1
Input – a preprocessed image of Digital Photo- Trichogram
Output – approximate total no. of hair strand
Data Structures:
cp(i,j) – current pixel of the current object
bgc – background pixel colour
obp – object pixel colour
Steps
Initialize tcount=0
Row Scan:.
Initialize hcount=0, phcount=0
For each row pixels
if (cp(i-1,j) == bgc and cp(i,j) == obp) then
hcount= hcount + 1
if (hcount>phcount) then
phcount= hcount
(Repeat steps 3 to 4 for no. of rows for the particular
object)
Column Scan:.
Initialize vcount=0,pvcount=0
For each column pixels
if (cp(i,j-1) == bgc and cp(i,j) == obp) then
vcount= vcount + 1
if (vcount>pvcount)
pvcount= vcount
Repeat steps 6 to 7 for no. of columns for a particular
object
if (phcount>pvcount)
tcount= tcount + phcount
else
tcount= pvcount + pvcount
Repeat steps 2 through 8 until all the object pixels are
scanned
The variable tcount is used in both of the following algo-
rithms.

Calculation of Approximate Average Width


As the width of hair strands is not equal along the length of each hair strand, so a
minimal average of vertical and horizontal pixel width is calculated. In this method
each horizontal and vertical scanning is done for each row pixels and column pixels
side by side till the current hair strand pixels are encountered. The following algorithm
is used for horizontal and vertical scan.
An Automated Approach Towards Digital Photo-Trichogram 321

Algorithm 2:
Input – a processed Digital Photo-Trichogram image
Output – approximate average width of each hair strand
Data Structures:
cp(i,j) – current pixel of current object
bgc – background pixel colour
obp – object pixel colour
Steps:
1. Initialize avwc=0
2. Initialize twc= 0, ob= 0
Row scan:.
3. Initialize hpc = 0
4. If ((cp(i-1,j) == bgc and cp(i,j) == obp) or
(cp(i-1,j) == obp and cp(i,j) == obp) or (cp(i-
1,j) == obp and cp(i,j) == bgc)) then
hpc=hpc + 1
(Repeat step 4 until end row pixel is reached)
Column Scan:.
5. Initialize vpc = 0
6. If ((cp(i,j-1) == bgc and cp(i,j) == obp) or
(cp(i,j-1) ==
obp and cp(i,j) == obp) or (cp(i-1,j) == obp and
cp(i,j) == bgc)) then
vpc= vpc+ 1
(Repeat step 6 until end column pixel is reached)
7. If (hpc== 0 and vpc!= 0) then
8. twc = twc+ vpc
ob=ob+ 1
• else if (vpc== 0 and hpc!= 0) then
twc = twc+ hpc
ob=ob+ 1
• else if hpc>vpc then
• twc = twc+ vpc
ob=ob+ 1
else if vpc>hpc then
• twc = twc+ hpc
ob=ob+ 1
(Repeat steps 3 through 7 until all the object pixels
are scanned)
9. avwc= avwc+ (twc/ob)
(Repeat 1 through 8 until all the objects pixels are
scanned)
10.avwc = avwc/tcount
11.Stop.
322 N. Debnath et al.

Calculation of Approximate Average Height


As the orientation of objects couldn’t be corrected, the method applied here is by
counting the horizontal and vertical edge wise pixels of each object including over-
lapped object and multiplying the number of edge wise pixels by the number of objects
(for single and overlapping objects). To count the horizontal and vertical edge wise
pixels the following algorithm is used.
Algorithm 3:
Input - a processed Digital Photo-Trichogram image
Output - The approximate height of each hair strand
Data Structures:
cp(i,j) – current random coloured pixel
Steps:
1. Initilization of avhc = 0
2. Initialize hc=0, hr = 0
3. Scan the pixels from left to right
If (s == cp(i,j))
hc++
break
(Repeat until all the horizontal initial edge pixels are
compared)
4. Scan the pixels from top to bottom
If (s == cp(i,j))
hr++
break
(Repeat until all the vertical initial edge pixels are
compared)
5. If (hc>hr) then
avhc = avhc + hc × tot. no. of adjacent hair strands
else
avhc = avhc + hr × tot. no. of adjacent hair
strands
(Repeat steps 1 to 5 until all the objects are covered)
6. avhc = avhc/tcount
7. Stop.
avhc is the approximate average height of each object.

4 Experimental Results and Discussion

After applying the proposed methodology, the result obtained is shown in Fig. 3.
Sauvola’s method is used in proposed methodology varying the value of parameter k
from 0 to 40 and the optimal result is obtained at k = 15 and 32. These two values of k
have been chosen for better binarization and clear primary separation of hair strands.
An Automated Approach Towards Digital Photo-Trichogram 323

Tables 1, 2 and 3 display the results of data samples obtained only in the first phase
of diagnosis, due to unavailability of the patient of the first phase in the second phase.
Table 4 specifically displays the percentage of telogen hair for six patients. Table 5
shows the comparison of the results of data samples obtained in two phases of the
diagnosis.

Table 1. Number of hair strand count


Sl. # Name of images Object count by (in pixels)
Manual count Proposed method
1 Image 1 17 19
2 Image 2 67 77
3 Image 3 34 34
4 Image 4 31 33
5 Image 5 41 39
6 Image 6 36 37
7 Image 7 28 27
8 Image 8 45 37
9 Image 9 33 31
10 Image 10 32 29
11 Image 11 27 24
12 Image 12 27 25
13 Image 13 33 26
14 Image 14 34 45
15 Image 15 34 39
16 Image 16 31 38
17 Image 17 18 19
18 Image 18 48 48
19 Image 19 35 49
20 Image 20 42 47
21 Image 21 41 58
324 N. Debnath et al.

Fig. 3. Sample images after applying proposed methodology

Table 2. Number of hair strand count


Sl. # Name of images Height measure (in pixels)
Manual count Proposed method
1 Image 1 106 98
2 Image 2 75 68
3 Image 3 48 50
4 Image 4 46 44
5 Image 5 57 52
6 Image 6 55 47
7 Image 7 60 45
8 Image 8 61 82
9 Image 9 45 41
10 Image 10 62 61
11 Image 11 65 59
(continued)
An Automated Approach Towards Digital Photo-Trichogram 325

Table 2. (continued)
Sl. # Name of images Height measure (in pixels)
Manual count Proposed method
12 Image 12 67 52
13 Image 13 48 41
14 Image 14 111 129
15 Image 15 99 132
16 Image 16 90 105
17 Image 17 94 95
18 Image 18 60 80
19 Image 19 54 48
20 Image 20 58 55
21 Image 21 65 69

Table 3. Width measure of hair strands


Sl. # Name of images Width measure (in pixels)
Manual count Proposed method
1 Image 1 6 4
2 Image 2 6 6
3 Image 3 6 7
4 Image 4 5 5
5 Image 5 6 6
6 Image 6 5 6
7 Image 7 6 6
8 Image 8 7 6
9 Image 9 6 8
10 Image 10 5 6
11 Image 11 5 6
12 Image 12 6 5
13 Image 13 5 6
14 Image 14 6 5
15 Image 15 7 5
16 Image 16 7 6
17 Image 17 7 7
18 Image 18 5 6
19 Image 19 5 6
20 Image 20 5 6
21 Image 21 6 6
326 N. Debnath et al.

Table 4. Percentage of telogen hair in 6 patients in both the test phases


Sl # Name of Numbers of hair strands Percentage of
images First phase of Second phase of telogen hair
diagnosis diagnosis
1 Image 1 14 19 10.52
2 Image 2 70 77 8.75
3 Image 3 19 64 0.0
4 Image 4 18 69 0.0
5 Image 5 34 58 3.57
6 Image 6 25 31 0.0

Table 5. Width measure in 6 patients in both the test phases


Sl # Name of images Width measure (in pixels)
First phase of diagnosis Second phase of diagnosis
1 Image 1 6 8
2 Image 2 6 8
3 Image 3 6 7
4 Image 4 5 7
5 Image 5 6 7
6 Image 6 8 11

Fig. 4. Height of each hair strand of 6 patients

In this work the results are obtained automatically in terms of number of objects
(individual and overlapped hair strands), approximate average height and width of each
hair strand. So our proposed system is able to measure automatically the growth of hair
and no manual interaction is needed except uploading the image. From Table 1 to
Table 3 we can so far conclude that this system is able to identify the growth of hair in
the shaved region (the diagnosed area) by which it is possible to identify the
improvement in hair growth. The diagnosis is done in two phases. The data obtained in
An Automated Approach Towards Digital Photo-Trichogram 327

Fig. 5. Height of each hair strand of PATIENT 1

Fig. 6. Height of each hair strand of PATIENT 2

Fig. 7. Height of each hair strand of PATIENT 3

these two test phases are used for comparison in terms of the growth of the number of
hairs on the shaved region, height and width of hair strands, are shown in Table 5.
In Fig. 4 we have shown that the comparison of the total number of hair in two
phases of the diagnosis and number of telogen hairs in six patients. From Figs. 5, 6, 7,
328 N. Debnath et al.

Fig. 8. Height of each hair strand of PATIENT 4

Fig. 9. Height of each hair strand of PATIENT 5

8 and 9 show the comparison of height of hair strands in both the phases of the
diagnosis for each five patients.

5 Conclusion

The diagnostic method used here is non-invasive Digital Photo-Trichogram. People


with busy schedule with a severe hair loss problem can be helped using this system
using a computer and dermatologists may also be helped for better treatment once the
overall system is developed. The most challenging part of this project was to collect
sufficient and a good amount of data samples of the scalp images using Digital Photo-
Trichogram method, as this kind of data samples are not readily available. To the best
of our knowledge, there is no previous research except one TrichoScan®, a proprietary
computer aided semi-automatic hair loss diagnostic system. The other challenging task
was to segment the overlapped hair strands and to measure the approximate average
height and width of total number of hair strands.

Acknowledgement. Authors are thankful to the “Center for Microprocessor Application for
Training Education and Research” of Computer Science & Engineering Department, Jadavpur
An Automated Approach Towards Digital Photo-Trichogram 329

University, for providing infrastructure facilities during progress of the work. Authors are also
thankful to Dermatology department, Calcutta School of Tropical Medicine for providing useful
data.

References
1. TrichoScan ……makes hair growth measurable - Home (n.d.). http://trichoscan.com/pages/
english/home.php. Accessed 15 May 2014
2. Saraogi, P.P., Dhurat, R.S.: Automated digital image analysis (TrichoScan®) for human hair
growth analysis: ease versus errors. Int. J. Trichology 2(1), 5–13 (2010). https://doi.org/10.
4103/0974-7753.66905
3. Esfandiari, A., Kalantari, K.R., Babaei, A.: Hair loss diagnosis using artificial neural
networks. Int. J. Comput. Sci. Issues 9(5(2)), 174–180 (2012)
4. Gassmueller, J., Rowold, E., Frase, T., Hughes-Formella, B.: Validation of TrichoScan®
technology as a fully-automated tool for evaluation of hair growth parameters. Eur.
J. Dermatol. 19(3), 224–231 (2009). https://doi.org/10.1684/ejd.2009.0640
5. Basic Structure of Hair (n.d.). http://www.fbi.gov/
6. Sauvola, J., Pietikäinen, M.: Adaptive document image binarization. Pattern Recogn. 33(2),
225–236 (2000). https://doi.org/10.1016/S0031-3203(99)00055-2
7. Mulinari-Brenner, F., Bergfeld, W.F.: Hair loss: diagnosis and management. Clevel. Clin.
J. Med. (2003). https://doi.org/10.3949/ccjm.70.8.705
8. Maru, D., Shah, B.: Image segmentation techniques and genetic algorithm. Int. J. Adv. Res.
Comput. Eng. Technol. (IJARCET) 2(4), 1483–1487 (2013)
9. Dass, R., Devi, S.: Image segmentation techniques. Int. J. Electron. Commun. Technol.
(IJECT) 3(1), 66–70 (2012)
10. Singh, T.R., Roy, S., Singh, O.I., Sinam, T., Singh, K.M.: A new local adaptive thresholding
technique in binarization. Int. J. Comput. Sci. Issues 8(6), 271–277 (2012)

You might also like