An Automated Approach Towards Digital
An Automated Approach Towards Digital
1 Introduction
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.
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
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
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.
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.
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 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
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
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.
8 and 9 show the comparison of height of hair strands in both the phases of the
diagnosis for each five patients.
5 Conclusion
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)