[go: up one dir, main page]

0% found this document useful (0 votes)
113 views12 pages

Image Processing

Uploaded by

sai
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)
113 views12 pages

Image Processing

Uploaded by

sai
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/ 12

Available online at www.sciencedirect.

com
ScienceDirect
ScienceDirect
Procedia Computer Science 00 (2019) 000–000
Available online at www.sciencedirect.com
Procedia Computer Science 00 (2019) 000–000 www.elsevier.com/locate/procedia
www.elsevier.com/locate/procedia
ScienceDirect
Procedia Computer Science 163 (2019) 300–311

16th International Learning & Technology Conference 2019


16th International Learning & Technology Conference 2019
Medical image enhancement based on histogram algorithms
Medical image enhancement based on histogram algorithms
Nema Salema*, Hebatullah Malikb, Asmaa Shamsc
Nema Salema*, Hebatullah Malikb, Asmaa Shamsc
a
Assistant Professor, Electrical and Computer Engineering Department, Effat University, Jeddah 21478, KSA
Undergraduate
b, c a
students,
Assistant Professor, Electrical
Electrical andand Computer
Computer Engineering
Engineering Department,
Department, Effat
Effat University,
University, Jeddah
Jeddah 21478,
21478, KSAKSA
b, c
Undergraduate students, Electrical and Computer Engineering Department, Effat University, Jeddah 21478, KSA

Abstract
Abstract
Medical images constitute important information that clinicians need to diagnose and make the suitable treatment decisions. The
diagnostic
Medical process
images extremely
constitute involvesinformation
important the image visual perception.
that clinicians Unfortunately,
need to diagnose and the make
possibility of errortreatment
the suitable existencedecisions.
in perception
The
diagnostic process
is not acceptable as extremely involves
it mainly affects thethe imagelives.
patients’ visualImage
perception. Unfortunately,
enhancement improvesthe thepossibility of error
visual quality existence
of image, helpsinthe
perception
clinician
is
in not
his acceptable
decision andasthus
it mainly
savesaffects the patients’
the patients’ lives. Image
lives. Histogram is aenhancement
common toolimproves the visual
for improving quality
contrast of image,
in medical helps the
imaging. It clinician
recovers
the lost
in his contrast
decision andbythus
redistributing the image
saves the patients’ brightness
lives. Histogram values that unfortunately
is a common may generate
tool for improving contrastundesirable
in medical artifacts.
imaging. It Therefore,
recovers
the lost contrast
researchers by redistributing
developed the imagealgorithms
the histogram-based brightnesstovalues
overcomethat unfortunately
this problem. may This generate undesirable
paper presents artifacts. Therefore,
a comprehensive study of
researchers developed the
many histogram-based histogram-based
algorithms. We utilizedalgorithms to overcome
the powerful MATLAB thispackage
problem. This paper
to analyze the presents a comprehensive
enhancement performance study of
of these
histogram-based
many algorithms.
histogram-based Moreover,
algorithms. this paper
We utilized thequantitatively
powerful MATLAB compares the results
package and thus
to analyze theevaluates their performance by
enhancement three
of these
histogram-based
metric algorithms.
parameters, which areMoreover, this paper
the mean square quantitatively
error, compares
standard deviation, andthethe
results
peak and thustoevaluates
signal their performance by three
noise ratio.
metric parameters, which are the mean square error, standard deviation, and the peak signal to noise ratio.
© 2019 The Authors. Published by Elsevier B.V.
© 2019 The Authors. Published by Elsevier B.V.
© 2019
This The
is an Authors.
open accessPublished by Elsevier
article under B.V.
the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
This is an
Peer-review open access
under article under
responsibility of the CC BY-NC-ND
scientific license
committee
Peer-review under responsibility of the scientific committee ofofthe(https://creativecommons.org/licenses/by-nc-nd/4.0/)
the 16thInternational
16th International Learning
Learning && Technology
Technology Conference
Conference 2019.
2019.
Peer-review under responsibility of the scientific committee of the 16th International Learning & Technology Conference 2019.
Keywords: Histogram; Medical images; Enhancement; Contrast; Metric evaluation parameters; Peak signal to noise ratio
Keywords: Histogram; Medical images; Enhancement; Contrast; Metric evaluation parameters; Peak signal to noise ratio

1. Introduction
1. Introduction
Radiology is a milestone in disease diagnosis, as it has the ability to obtain a visual representation of the human
Radiology
interior is ainmilestone
anatomy forms of in disease diagnosis,
radiographs. There areas different
it has thebranches
ability toofobtain a visual
radiology, representation
each is used for aof the human
purpose, and
interior anatomy in forms of radiographs. There are different branches of radiology, each is used for a purpose,
each produces a radiograph of different pixels’ intensity distribution. For example, X-rays are mostly used for bone and
each produces a radiograph of different pixels’ intensity distribution. For example, X-rays are mostly used
detection because the calcium atoms that make up the human bones have the ability of absorbing the x-rays photons. for bone
detection because the calcium atoms that make up the human bones have the ability of absorbing the x-rays photons.

*
Corresponding author. Tel.: +966920003331; fax: +966126377447.
*
Corresponding nsalem@effatuniversity.edu.sa
E-mail address:author. Tel.: +966920003331; fax: +966126377447.
E-mail address: nsalem@effatuniversity.edu.sa
1877-0509 © 2019 The Authors. Published by Elsevier B.V.
This is an open
1877-0509 access
© 2019 The article
Authors.under the CC by
Published BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Elsevier B.V.
Peer-review under
This is an open responsibility
access of the
article under thescientific committee
CC BY-NC-ND of the(https://creativecommons.org/licenses/by-nc-nd/4.0/)
license 16th International Learning & Technology Conference 2019.
Peer-review under responsibility of the scientific committee of the 16th International Learning & Technology Conference 2019.

1877-0509 © 2019 The Authors. Published by Elsevier B.V.


This is an open access article under the CC BY-NC-ND license (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the 16th International Learning & Technology Conference 2019.
10.1016/j.procs.2019.12.112
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 301
2 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000

While, MRI produces visual imaging of organs, soft tissues, bones and other internal body structures. Therefore,
radiographs generated from X-rays are different from those generated from MRI.
In spite of the continuous development of X-rays and MRI acquisition systems, the resultant radiographs still have
some uncertainties in representing human parts. In medical image analysis field, any margin of error is not acceptable.
In addition, the amounts of image details, quality, and clearness are essential. To meet these requirements, researchers
proposed many image enhancement techniques to improve the image perception quality.
Unlike regular still photos, digital radiographs have complex structures and different modalities. Thus, analyzing
and processing them require special manipulations to prevent the data loss and to retrieve the attenuated details.
Image histogram is the basis algorithm for numerous spatial domain processing. It provides useful image statistics
and it is useful for image enhancement, compression and segmentation. It is simple to calculate in software and even
in hardware implementations. Histogram Equalization (HE) generates an image whose intensity levels are equally
likely and covers the entire image [2]. The result of this intensity-level equalization is an image with increased dynamic
range leading to increase of its contrast [1]. There are different types of histogram equalization algorithms such as
Cumulative Histogram Equalization (CHE) [2], Contrast-Limited Adaptive Histogram Equalization (CLAHE) [4, 5,
6], and Quadrant Dynamic Histogram Equalization (QDHE) [3].
The main objective of this research is to find the best contrast enhancement technique for medical images. It
describes how to equalize a histogram of medical images and analyzes the four techniques: HE, CHE, CLAHE, and
QDHE. In terms of five medical images, it evaluates the response of each technique by three metrics: Peak Signal to
Noise Ratio (PSNR), Mean Square Error (MSE), and Standard Deviation (SD). We used the powerful MATLAB
package in the implementation of the four algorithms and the response evaluation of each of them.

2. Image histogram processing

Radiology is a milestone in disease diagnosis, as it has the ability to obtain a visual representation of the human
interior anatomy. A two-dimensional digital monochromatic image is a binary representation of an array of pixels.
Each pixel has a numerical value that represents a grey level.
An image histogram is a graphical representation of the probability distribution of the gray values in a digital
image. The visualization of the image’s histogram helps in analyzing the frequency of appearance of the different gray
levels contained in the image. Equation (1) represents the relation between the histogram and the contrast of the image.

bright Right  sided histogram



Gray  level image : dark left  sided histogram 1
 good appearance well  distributed histogram

Medical images are commonly 8-bit grayscale images with a gray-level range from zero (black) to 255 (white).
Fig. 1. displays three images and their corresponding histograms. The histograms of the bright, dark, and good in
appearance images, in sequence, are right-sided, left-sided, and well distributed. Thus, the histogram measures the
brightness level of images and reflects either the image has a low or acceptable contrast. As a conclusion, the histogram
that covers all the possible values in the gray scale indicates that the image has good contrast and that the details in
this image are clear.

2.1. Generating histogram

The histogram of a digital image with 𝐿𝐿 total possible intensity levels in the range [0, 255] is in equation (2).

h (r )  n
k k
 2

where 𝑛𝑛𝑘𝑘 is number of pixels with 𝑟𝑟𝑘𝑘 intensity level. It is better working with the normalized histogram that can be
302 Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311
Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000 3

obtained by dividing ℎ(𝑟𝑟𝑘𝑘 ) by the total number of pixels in the image, as in equation (3). Histogram of any image is
simply the plotting of 𝑃𝑃𝑟𝑟 (𝑟𝑟𝑘𝑘 ) against 𝑟𝑟𝑘𝑘 .

h ( rk ) nk
p (r )

k
  : for k 0,1, 2, ( L  1)  3
number of rows  number of columns MN

Fig. 1. Image histogram of dark, bright and well-contrast images.

3. Histogram equalization, HE

HE transformation spreads out the image intensity values along the total range [0, 1] leading to an image with a
higher contrast. The HE transformation function is simply the Cumulative Distribution Function (CDF), given in
equations (4 and 5).

k
cdf ( k )
  Pr ( ri ) : k 0,1, 2, , L 1  4
i 0

 k   L 1 k 
T ( rk ) 
sk  floor  ( L 1)  pi 
 
floor 
 MN  i
n ; 0,1,2, ,( L 1)
k 5
  i 0   i 0 

As an explanatory example, assume an image with intensities in the range [1-8] and it is required to perform the
HE on the image and scale the processed image in the range [1-20]. The algorithm starts by counting the total number
of pixels associated with each pixel intensity. Secondly, the algorithm calculates the probability of each pixel intensity
(number of pixels divided by the total number of pixels). Thirdly, the algorithm calculates the CDF and then multiply
it by 20. Lastly, the algorithm floor round the obtained values (to lower integer values). Both of equation (6) and table
(1) represent the procedures of this example. The results show that the processed image includes pixels with increased
intensities leading to a higher contrast.

 3 2 4 5  8 5 11 13 
 7 7 8 2 18 18 20 5 
Original    Processed    6
 3 1 2 3 8 1 5 8
5 4 6 7 13 11 15 18 
   
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 303
4 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000

4. Cumulative histogram equalization, CHE

Fig. 2 shows the procedures of the CHE algorithm and equation (7) represents its general formula [2].

Table 1. The intermediate results of applying the HE algorithm.


Pixel intensity # of pixels Probability Cumulative probability CP times 20 Floor rounding
(CP)
1 1 0.0625 0.0625 1.25 1
3 3 0.1875 0.25 5 5
3 3 0.1875 0.4375 8.75 8
2 2 0.125 0.5625 11.25 11
2 2 0.125 0.6875 13.75 13
1 1 0.0625 0.75 15 15
3 3 0.1875 0.9375 18.75 18
1 1 0.0625 1 20 20
0 0 0 1 20 20
0 0 0 1 20 20

Get image Calculate new values using the Construct the new image by replacing original
Get CDF
histogram general CHE formula gray values with the new gray values

Fig. 2. Stages of cumulative histogram equalization algorithm.

 cdf ( k ) cdf min 


eh ( k )  round ( * ( L 1)  7
 MN  cdf min 

where CDFmin is the minimum CDF in the image.

5. Quadratic dynamic histogram equalization, QDHE

This technique produces better brightness preservation with natural looking compared to other existing techniques
[3]. Fig. 3 shows the four processes of the QDHE algorithm that are histogram partitioning, clipping, gray levels re-
distribution and histogram equalization.

Histogram partitioning Clipping Gray level range allocation Histogram equalization

Fig. 3. Procedures of the quadratic dynamic histogram equalization algorithm.

5.1. Histogram partitioning

The QDHE is a median-based partition algorithm. Thus, it segments the number of pixels equally in each sub-
histogram. Firstly, it divides the original image-histogram into two sub-histograms. Secondly, it uses the medians from
the two partitioned sub-histograms as separating points to further division of the two sub-histograms into two smaller
sub-histograms per each resulting in four sub-histograms. The minimum and maximum intensity values of the input
304 Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311
Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000 5

histogram are set as the limiting separating points while the equation set (8) calculates each other separating point.
Fig. 4a shows an image histogram with these separating points.

 1 
 m1
 ( Iwidth  I height ) 
4
 
1
 m2


( Iwidth  I height ) 

8 
2
 3 
 m3
 ( Iwidth  I height ) 
 4 

where 𝑚𝑚1 , 𝑚𝑚2 , and 𝑚𝑚3 are intensities set to 0.25, 0.5 and 0.75, respectively, for the total number of pixels in the
histogram of the input image. 𝐼𝐼𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤ℎ 𝑎𝑎𝑎𝑎𝑎𝑎 𝐼𝐼ℎ𝑒𝑒𝑒𝑒𝑒𝑒ℎ𝑡𝑡 represent the width and height of the input image, respectively.

5.2. Clipping

HE is able to stretch the high-contrast regions and compresses the low-contrast regions of a histogram. Thus, if the
object of interest occupies a small portion of the image, then HE will not be able to, successfully, enhance it.
The clipped HE method overcomes this problem by controlling the enhancement rate and thus preventing the
existence of unnatural and over-enhancement in the processed image. It modifies the shape of the input histogram by
reducing or increasing the value in the histogram’s bins based on a threshold/clipping limit/threshold, Tc that is equal
to the average of the image-intensity values. Fig. 4b illustrates the clipping process in which the bins with higher
values than Tc take the threshold value itself.

(a) (b) (c)

Fig. 4. The procedures of the clipping process.

5.3. New gray level range allocation

To balance the enhancement space for each sub-histogram, equations-set (9) shows the new gray level dynamic
range allocation based on the ratio of gray level spans and the total number of pixels in each sub-histogram.

span
 i mi 1  mi 

spani 
rangei  ( L 1) 
4  9
 span k 
 k 1 

where 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑖𝑖 is the dynamic grey level of the 𝑖𝑖 𝑡𝑡ℎ sub-histogram and 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑖𝑖 is the dynamic level range for 𝑖𝑖 𝑡𝑡ℎ sub-
histogram in the output image. Equation-set (10) represents the new dynamic range [𝑖𝑖𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 , 𝑖𝑖𝑒𝑒𝑒𝑒𝑒𝑒 ] of the 𝑖𝑖 𝑡𝑡ℎ sub-
histogram. Noting that, the first 𝑖𝑖𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 is at the minimum intensity value of the new dynamic range. Fig. 4c shows this
stage of process.
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 305
6 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000

i start  (i 1)end 1 
 10
i
end start  rangei 
i

5.4. Histogram equalization

The last step of QDHE is applying HE algorithm for each sub-histogram independently. If the 𝑖𝑖 𝑡𝑡ℎ histogram is
allocated at gray-level range [𝑖𝑖𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 - 𝑖𝑖𝑒𝑒𝑒𝑒𝑒𝑒 ], then the resultant HE follows equation (11).

y ( x )  (i start  iend )  cdf (X k )  i start 11

6. Contrast limited adaptive histogram equalization, CLAHE

Reza in [4], states that CLAHE produces good results on medical images and its procedures are as follows.

 Divide the image into several almost equal sizes and non-overlapping regions. This partition consequence in three
different groups of regions: corner regions (CR), boarder regions (BR), and inner regions (IR). Fig. 5a represents
an example of the image partitioning process.
 For each group, calculate the histogram.
 If the clipping level is known, then clip the histogram to that level and then use the clipped histograms to calculate
the CDFs.
 For each pixel in the image, find its closest four neighboring grid points. Using the intensity value of that pixel as
an index, find its mapping at the four grid points based on their 𝐶𝐶𝐶𝐶𝐶𝐶𝐶𝐶.
 Interpolate among these values to get the mapping at the current pixel location. Map this intensity to the range
[min: max) and allocate it in the output image.

Fig. 5. (a) Three groups of regions in the portioned image, (b) an IR region with its neighboring regions, (c) a BR region with a quadrant 2 pixel
of (i, j) region, (d) the top-left corner region and its neighborhood structure.

6.1. Clipping process based on a desired limit for contrast expansion

Clipping the histogram is not simple because the excess after clipping has to be re-distributed among the other bins,
which might increase the level of the clipped histogram. Thus, the clipping has to be performed at a level lower than
the specified clip level so that after redistribution the maximum histogram level is equal to the clip level. There are
many approaches for identifying the point at which the clipping should be performed. Following is an overview of two
clipping algorithms.
306 Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311
Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000 7

6.1.1. First approach

Reza in [4] defines a clip limit β as in equation (12).

M   
1 (S max 1)  12
N  100 

where 𝑀𝑀 and 𝑁𝑁 are the number of pixels and gray-levels in each region, respectively. The parameter ∝ is the
clipping factor in percentage. 𝑆𝑆𝑚𝑚𝑚𝑚𝑚𝑚 represents the limited slope of the transformation function. The clip factor α range
is [0-100], thus the slope range, in each mapping, is [1-𝑆𝑆𝑚𝑚𝑚𝑚𝑚𝑚 ].

6.1.2. Second approach: binary search

Pizer et al. in [6] developed the binary search approach to find the clip value in an automated way. The procedures
are as follows.

 Let the specified clip level be Top and 0 be the Bottom. Thus, 𝑇𝑇𝑇𝑇𝑇𝑇 = 𝐶𝐶 & 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵 = 0
 While the difference between Top and Bottom is greater than one, perform the following steps.
 Calculate the Middle between Top and Bottom. Thus, 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀 = (𝑇𝑇𝑇𝑇𝑇𝑇 + 𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵𝐵)⁄2.
 Find the sum of excess above Middle in each bin of the histogram, 𝑆𝑆.
 𝐼𝐼𝐼𝐼 (𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 + 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀) > 𝐶𝐶 𝑡𝑡ℎ𝑒𝑒𝑒𝑒 𝑡𝑡𝑡𝑡𝑡𝑡 = 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚.
 𝐼𝐼𝐼𝐼 (𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 + 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀) < 𝐶𝐶 𝑡𝑡ℎ𝑒𝑒𝑒𝑒 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏 = 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚.
 𝐼𝐼𝐼𝐼 (𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 + 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀) = 𝐶𝐶 𝑡𝑡ℎ𝑒𝑒𝑒𝑒 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑖𝑖𝑖𝑖 𝑡𝑡ℎ𝑒𝑒 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑎𝑎𝑎𝑎 𝑤𝑤ℎ𝑖𝑖𝑖𝑖ℎ 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡 𝑏𝑏𝑏𝑏 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝.
 Then break out of the binary search loop.
 Clip the histogram at the value of middle. Thus, 𝑡𝑡ℎ𝑒𝑒 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣, 𝑃𝑃 = 𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏𝑏.
 Redistribution of each histogram in a way that its height does not exceed the clipping limit. Thus, the modified
histogram 𝑉𝑉 is calculated from the original value 𝑉𝑉𝑜𝑜𝑜𝑜𝑜𝑜𝑜𝑜 𝑖𝑖𝑖𝑖 as in equation (13).

(V orig 
 L ) (V orig C  P ) if Vorig  P
V  13

 C if Vorig  P

6.2. Combination of the regions

The last process is the determination of the CDF of the resultant contrast limited histograms. The final image is
constructed by mapping all enhanced regions, and by applying bilinear interpolation between the neighbouring pixels
whose centres are based on the four nearest IR, two nearest BR, or one nearest CR.

6.2.1. Regions in IR group

The pixel in the 1st quadrant of (i, j ) region is mapped based on its vertical and horizontal distances from the
centres of (i, j  1), (i  1, j ), &(i  1, j  1) regions, Fig. 5b. If 𝑓𝑓𝑖𝑖,𝑗𝑗 is the mapping function of pixels in (i, j )
region then, the new value p of the pixel that exists in the 1st quadrant of (i, j ) region is given by equation (14).
Similar procedures are applied to the other pixels in other quadrants of (i, j ) region.

s  y x  r  y x 
p  f (p ) f (p )   f (p ) f (p ) 14 
new r s  x  y i 1, j 1 old x  y i , j 1 old  r s  x  y i 1, j old x  y i , j old 
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 307
8 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000

6.2.2. Regions in BR group

Referring to Fig. 5c and for the right-hand boarder of the image, the structure of the pixels in the 1st and 3rd quadrants
is the same as that of regions in the IR group but not the same as the pixels in the 2nd and 4th quadrants. Equation (15)
represents the new value 𝑝𝑝 of the pixel in the 2nd quadrant of (𝑖𝑖, 𝑗𝑗) region.

s r
p f (p ) f (p ) 15
new r s i , j 1 old r s i , j old

6.2.3. Regions in CR groups

Referring to Fig. 5d and the top-left corner of the image, the 4th quadrant has neighbourhood structure similar to
those of IR regions. While, the 2nd and 3rd quadrants have neighbourhood structures similar to those of BR regions.
The 1st quadrant in this group has a unique structure as it has no contact with other regions. Its mapping follows
equation (16).

p
new
f
i,j
(p
old
) 16

7. Quantitative analysis

In order to explore the successfulness of each histogram method, three metrics are calculated which are Mean
Square Error (MSE), Peak Signal to Noise Ratio (PSNR), and Standard Deviation (SD). Mean Square Error MSE
measures the noise contained in the image and it can be calculated by equation (17).

M N 2
   Im g '(i , j )Im g (i , j ) 
i 1 j 1

MSE  17 
MN

where 𝐼𝐼𝐼𝐼𝑔𝑔′ and 𝐼𝐼𝐼𝐼𝐼𝐼 are the enhanced and original images, respectively. Peak Signal to Noise Ratio PSNR
measures the strength of the information kept in the image in relation to the existing noise and it can be calculated
using equation (18).

10log10 ( L 1)2
PSNR (dB )  18
MSE

Standard Deviation, SD, measures the closeness of the data to their mean and it can be calculated by equation (19).

1 n 2
SD   f (i , j ) X  19
n 1 k 1

Where f (i, j ) is the intensity of a pixel at the location (i, j ), X is the average of the intensities, and n is the
number of pixels.

8. Results

We enhanced five medical images: retina, knee, MRI-brain, MRI-endometria, and mammogram-breast by the four
308 Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311
Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000 9

histogram-based algorithms, discussed above [9-12]. In addition, we evaluated each algorithm in each image by the
three evaluation metrics. Fig. 6 displays the original images and their enhanced versions. Tables 2, 3, and 4 show the
results of the three evaluation metrics for each algorithm and each image. The obtained results are plotted in Figs 7a,
b &c.

9. Conclusion

Clinicians can falsely diagnosis medical images due to the unclearness of the images. Therefore, enhancing the
images before diagnosis is a crucial step in image processing. Image histogram displays the intensity recurrence in
pixels of a digital image. An image with a well-distributed histogram has a high contrast. This paper covered HE,
CHE, QDHE, and CLAHE algorithms and tested them on retina, brain, endometrium, breast and knees images. In
addition, it evaluated each of them using PSNR, SD and MSE.
HE spreads out intensity values along the total range of values in order to achieve higher contrast while CHE has a
better performance than HE. The QDHE is a brightness-preserving algorithm that reduces limitations caused by HE
in contrast enhancement. The CLAHE is a recommended technique for images with non-uniform intensity distribution
over all areas of the image.
The amount of contrast enhancement for some intensity is directly proportional to the slope of the CDF function at
that intensity level. Thus, contrast enhancement can be limited by limiting the slope of the CDF. Therefore, if we limit
the height of the histogram to a certain level we can limit the slope of the CDF and hereafter the amount of contrast
enhancement.
Results indicated that SD is higher in all the enhanced techniques rather than the original images, meaning that all
the techniques give better image than the original images. Both of QDHE and CLAHE gave the least MSE. Except for
the retina image, QDHE gave the highest PSNR. The CLAHE is the best enhancement technique for the retina images
while QDHE is the best for brain, endometrium, breast and knees images.
10 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 309

Fig. 6. The 1st (top) row displays the five original medical images, the following rows display the enhanced imaged by the techniques HE, CHE,
QDHE, and CLAHE, in sequence.

Table 2. PSNR in dB of each algorithm for each medical image.


Image Type HE CHE QDHE CLAHE
Retina 6.6611 7.2010 17.4330 21.2357
Knee 9.0325 9.3432 23.6541 16.3653
Brain MRI 7.6048 8.4482 19.8646 14.5745
Endometrium 10.5983 11.0645 18.5760 14.9021
Breast 7.1113 7.3033 19.2915 18.0190
Average 8.20 8.67 19.76384 17.01932

Table 3. MSE of each algorithm for each medical image.


Image Type HE CHE QDHE CLAHE
310 Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311
Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000 11

Retina 1.4027e+04 1.2387e+04 1.1743e+03 223.0449


Knee 8.1251e+03 7.5641e+03 280.3330 966.1183
Brain MRI 1.1288e+04 9.2952e+03 670.8361 1.2612e+03
Endometrium 5.6656e+03 5.0890e+03 902.5713 1.1520e+03
Breast 1.2646e+04 1.2099e+04 765.4772 770.9151
Average 1.04e+04 9.29e+03 7.59e+02 8.75e+02

Table 4. SD of each algorithm for each medical image.


Image Type HE CHE QDHE CLAHE
Retina 52.5158 51.8401 60.1603 47.4125
Knee 61.5050 62.0608 68.4751 70.8974
Brain MRI 63.0925 69.3057 60.8605 63.9431
Endometrium 70.9154 72.8752 66.3201 66.6786
Breast 44.8501 44.5951 71.2628 70.8172
Average 58.57576 60.13538 65.41576 63.94976

(b)
(a) (c)

1.60E+04 25 80
70
1.40E+04 20 60
1.20E+04 50
15 40
1.00E+04 30
10 20
8.00E+03 10
5 0
6.00E+03
4.00E+03 0
Brain MRI

Endometrioma
Knee
Retina

Breast

2.00E+03
0.00E+00

Original HE CHE

HE CHE QDHE CLAHE HE CHE QDHE CLAHE QDHE CLAHE

Fig. 7. (a) MSE; (b) PSNR; (c) SD; for each algorithm and for each image.

References

[1] R. C. Gonzalez and R. E. Woods (2008) “Digital Image Processing”, Third Edition.
[2] Krutsch, Robert, and David Tenorio (2011) "Histogram equalization." Freescale Semiconductor, Document Number AN4318, Application
Note.
[3] Chen Hee Ooi and Nor Ashidi Mat Isa (2010), “Quadrants Dynamic Histogram Equalization for Contrast Enhancement”, IEEE Transactions
on Consumer Electronics, Vol. 56, No. 4
[4] Reza AM (2004) “Realization of the contrast limited adaptive histogram equalization (CLAHE) for real time image enhancement”, J VLSI
signal process system, 38(1), pp: 35 - 44
[5] J. Joseph, J. Sivaraman, R. Periyasamy, and V. Simi (2017), “An objective method to identify optimum clip-limit and histogram specification
of contrast limited adaptive histogram equalization for MR images,” Biocybernetics and Biomedical Engineering, vol. 37, no. 3, pp. 489–497
[6] Pizer, Stephen M., E. Philip Amburn, John D. Austin, Robert Cromartie, Ari Geselowitz, Trey Greer, Bartter Haar Romeny, John B.
Zimmerman, and Karel Zuiderveld (1987) “Adaptive histogram equalization and its variations.” Computer vision, graphics, and image
Nema Salem et al. / Procedia Computer Science 163 (2019) 300–311 311
12 Nema Salem, Hebatullah Malik, and Asmaa Shams/ Procedia Computer Science 00 (2019) 000–000

processing 39, no. 3, pp. 355-368.


[7] O. Demirkaya, M. H. Asyali, and P. Sahoo, Left Retina, Knee. [Online]. Available: http://biomedimaging.org/BookImages.aspx
[8] F. Gaillard, Normal Brain MRI (2015) [Online]. Available: https://radiopaedia.org/cases/normal-brain-mri-6
[9] A. Stanislavsky, Endometrioma - Endometrioma MRI (2014), [Online]. Available: https://radiopaedia.org/cases/endometrioma-mri-1
[10] H. Knipe, Simple Breast Cyst (2017), [Online]. Available: https://radiopaedia.org/cases/simple-breast-cyst-2

You might also like