Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Academic J. for Engineering and Science ‫ للهندسة والعلوم‬...

‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

De-blurring of Microscopy Image by


Laplacian and High Boost Filters
Kadhim K. Kadhim Ziad M. Abood
College of Education, Mustansiriyah University, Iraq
kazim_201082@yahoo.com dr.ziadmabood@uomustansiriyah.edu.iq

Abstract
In this study, two filters (Laplacian Filter and High Boost Filter) were applied to improve
the optical image from blur resulting during the process of obtaining the image because of
simple movement or vibration in the imaging system.
The study included images for a disease (Hepatitis) taken with a stain and magnification
power are (H&E, 400x) and through the results of image quality assessment measures have
been reached that the improved image quality from the blur by the Laplacian Filter was better
in terms of contrast and sharpness from image quality enhanced by the high scroll filter.
Keywords: Microscope Image, H&E Stain, De-blur Image, Image Quality.
‫المستخلص‬
‫في هذه الد ارسةةم تط تق ال الحرنةةراح الحرنةةر ح ال محرنةةر التحرار ال اليو لترسةةاح المةةمر ال م ةرام الحنةةمهم‬
.‫الض ا ام مالناتجم أثناء عحلام الرممل على الممر س ب الرركم ال ساقم أم احهتزاز في نظاط التممار‬
)400x ‫الد ارسةم مةمر لحرا الالت اب الك دو حذةمذ مة قم م م تك ار هي الال احاتمكسةالاح مايامسةاح‬ ‫تضةحن‬
‫محح ةال نتائج حقااال تقااط جمد الم ةةمر تط التمم ةةل الى أح جمد الم ةةمر الحرس ةةنم حح الضة ة ا ام ماس ةةقم حرن ةةر‬
.‫ح ال أفضل حح نارام الت ااح مالرد حح جمد الممر الحرسنم ماسقم حرنر التحرار ال الي‬

1. Introduction
Digital image (DI) is a matrix from the numbers use to represent and show vital
information, where the methods of capturing and recording these images are diverse;
therefore, the probabilities of having errors or degradations throughout the procedure
of capturing and recording images are also increased. The distortions that affect an
image, in general, are noise, contrast imperfections, and blur. Medical images such
as light microscope images (LMI) degraded by different types of blur such as motion
blur, atmospheric turbulence, Average, Box, Gaussian, Pillbox blur, and so on [1].

2. Blur of Image
The blurring, or degradation, of an image can be caused by many factors asre the
movement during the image capture process by the camera or when be exposure
times are long or short and also the distortion resulting from light scattering and other
reasons. Blurring in the image is a process that the uneasy to evade in every imaging
device [2]. Blurry images formed by convolving the original images with the Point-
Spread Function (PSF). A blurred or degraded image can be approximately described
by the following equation:
B(x, y) = HI(x, y) + n … (1)
Where B: Blurred image, H: The distortion (convolution) operator also called the
point spread function (PSF), I: The clear or original image and n: denote the noise.
-1-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬
In this study have been degraded of images by motion blur by convolving it with a
PSF by using the special function (fspecial) to create a PSF that simulates a motion
blur, with specifying the length of the blur in pixels, (Len=5), and the angle of the
blur in degrees (Theta=1.5).

3. De-blurring of Image
Image de-blurring is a topic of essential in the area of image processing, where the
de-blurring process results in sharpened details and better image quality [3]. The
restoration of image is a vital stage to recover image from their degradations. There
are two types of techniques to the image restoration are direct and indirect
techniques. These techniques considered as direct techniques when the output is
formed in a one-step mode and it is considered as indirect techniques when the output
is acquired with a number of iterations [4]. In this study have been apply the image
de-blurring methods are Laplacian Filter and High Boost Filter.
4. Image De-blurring by Laplacian Filter (LF)
Laplacian filter is an edge detector used to compute the second derivatives of an
image, where it measuring the rate at which the first derivatives change and this
determines if a change in adjacent pixels values is from an edge or continuous
progression. LF can be used for sharpening of the image and use it extensively for
segmentation of the image. Laplacian Filter is implementation of 2-D second - order
derivative and their use for image sharpening. The approach consists of defining a
discrete formulation of the second-order derivative and then constructing a filter
mask based on that formulation [5].
The maximum possible to change the gray-level be finite, where the shortest distance
over which that changes can occur is between adjacent pixels. The reason behind this
is we are dealing with digital quantities whose values are finite. The basic definition
of the first-order derivative of a one-dimensional function as [5]:
∂f(x, y)
= f(x + 1) − f(x) … (2)
∂x
In above equation have been used the partial derivative to keeping the notation the
same as when considering the image as a function of two variables, f(x, y), at which
time we will be dealing with partial derivatives along the two spatial axes. Similarly,
we define a second-order derivative as the difference as:
∂2 f(x)
= f(x + 1) + f(x − 1) − 2f(x) … (3)
∂x 2
Therefore, the Laplacian is the simplest of isotropic derivative the operator, which
can be defined for a function (image) f(x, y) of two variables, is as [6]:
∂2 f(x, y) ∂2 f(x, y)
∇2 f(x, y) = + … (4)
∂x 2 ∂y 2
Since the derivative for any order be linear operations, therefore the Laplacian Filter
is a linear operator. To express about the above equation in discrete form must be
use Eq. (3) where the second variable must take into consideration. In a digital
image, the second derivative along to x-direction can be written as [6]:

-2-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

∂2 f(x, y)
= f(x + 1, y) + f(x − 1, y) − 2f(x, y) … (5)
∂x 2
Similarly, the second derivative along to y-direction can be written as:
∂2 f(x, y)
= f(x, y + 1) + f(x, y − 1) − 2f(x, y) … (6)
∂y 2
The digital implementation of Laplacian in the two-dimensional in Eq. (4) is
obtained by summing these two components in Eqs. (5) and (6) as:
∇2 f = [f(x + 1, y) + f(x − 1, y) + f(x, y + 1) + f(x, y − 1)
− 4f(x, y)] … (7)
Also, the derivatives along to the diagonals can be written as:
1
∇2 f = [f(x − 1, y + 1) + f(x + 1, y + 1) + f(x − 1, y − 1) + f(x + 1, y − 1)
2
− 4f(x, y)] … (8)
The above equations can be implemented using the mask or kernel where Laplacian
filter kernels usually contain positive or negative values in a cross pattern be centered
within the array. The corners are either zero or positive values and the center value
can be either negative or positive. In this study have been applied the Laplacian filter
kernel with a size (3x3) as follows [5, 6]:
1 1 0 1
Laplacian Kernel = ∗ [0 −4 0] … (9)
2
1 0 1
Equation (9) represents a Laplacian filter mask used to implement the digital
Laplacian, which gives an isotropic result for rotation in 90°. The above Laplacian
mask has been applied with the mask given as [5, 6]:
0 0 0
fmask = [0 1 0] … (10)
0 0 0
The above mask called matching kernel (or identity kernel); therefore, to get on the
final mask must be subtracting Eq. (10) from Eq. (9) as:
0 0 0 1 0 1
1
finalmask = [0 1 0] − 2 ∗ [0 −4 0]
0 0 0 1 0 1
1 −1 0 −1
finalmask = ∗ [ 0 −4 0 ] … (11)
2
−1 0 −1
The above mask or kernel use to remove the blur (De-blur) from the image and
enhanced her and to be the image most sharpening. The above Laplace Filter method
has been applied as in following steps:
Read the blurry colored image with RGB space.
1) Find the mask (kernel) by subtracting the matching matrix from the Laplacian
Filter matrix as Eq. (11).
2) Apply this mask on the blur image using the imfilter function to remove the blur
and get a sharp image.
3) Save the resulting image and evaluate its quality through image quality metrics.

-3-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

5. Un-Sharp Masking and High Boost Filtering


The unsharp masking (USM) is a technique in which an image is sharpened by
subtracting the blurred (unsharp) version of the image from original image. This
technique in general consist of the three steps as [6]:
1) Blur or defocusing the original image.
2) Obtaining the mask from subtracting the original image from the blurred image
copy and the difference resulting called the mask.
3) Adding the mask to the original image.
Therefore, Letting f(x, y) and fB (x, y) represents the original image and blurred
image respectively, and accordingly, the unsharp masking method can be expressed
as:
g mask (x, y) = f(x, y) − fB (x, y) … (12)
The above equation first applies to obtain the mask g mask (x, y) and then it is done
adding a weighted portion of the mask back to the original image as:
g(x, y) = f(x, y) + k ∗ g mask (x, y) … (13)
Where the above equation included a weight, k where (k ≥ 0), and in generality
when (k = 1) the above equation becomes represents the Un-Sharp Masking (USM)
method as have been defined her in the above. But, when (k > 1) the process is
referred to as High Boost Filtering (HBF). In image processing, it is often desirable
to emphasize high-frequency components representing the image details without
eliminating low-frequency components such as sharpening. Therefore used the high-
boost filter can be used to enhance the high-frequency component while still keeping
the low-frequency components [6].
6. Digital Image Quality Metrics
These metrics which have been used in image quality assessment include as:
1- The Structural Similarity Index (SSIM): Proposed by Wang et al. [7], where
based on the assumption that the Human Visual System (HVS) is highly adapted
to extract structural information from the viewing field. SSIM index system
separates the task of similarity measurement into three comparisons are
Luminance comparison, Contrast comparison and Structure comparison. SSIM
index define as:[7]
(2μx μy + C1 )(2σxy + C2 )
SSIM(x, y) = … (14)
(μ2x + μ2y + C1 ) (σ2x + σ2y + C2 )
From the definition of SSIM, the large value of SSIM(x, y) mean the images
x and y are more similar, where the similarity measure SSIM satisfy the following
conditions:
1) Symmetry: i.e. S(x, y) = S(y, x).
2) The value of SSIM ≤ 1.
3) Maximum value of SSIM is (1) if and only if (x = y).
2- Universal Quality Index (UQI): UQI metric is considered a special case from
the similarity measure SSIM proposed by Wang et al. [7, 8], where “universal,”
mean that the quality measurement method does not depend on the images being
tested, the viewing conditions or individual observers. This quality index model

-4-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬
considers any distortion as a combination of three different factors are a loss of
correlation, luminance distortion, and contrast distortion and defined as [8]:
σxy 2x̅ y̅ 2σx σy
UQI = ( )( 2 )( 2 ) … (15)
σx σy (x̅ + y̅ ) (σx + σy 2 )
2

3- Root Mean Square Error (RMSE): This metric presents the amount of
deviation present in De-blur image compared to reference image, and defined as
follow [9, 10]:
M N
1 2
RMSE = √ ∑ ∑(x(i, j) − y(i, j)) … (16)
MN
i=1 j=1
The image quality be a better when the value of RMSE should as low as possible.
4- Peak Signal to Noise Ratio (PSNR): PSNR is error metric computes the peak
signal-to-noise ratio, in decibels (dB), between two images. This ratio is often
used to quality measurement between the original and a reconstructed image.
PSNR is represents a measure of the peak error derived by setting the mean square
error (MSE) metric about the maximum possible value of the luminance and
define as follows [11]:
R2
PSNR = 10 ∗ log10 ( ) … (17)
MSE
Where R is the number of gray levels and its range is (0-255) and represents the
maximum fluctuation in the input image data type, for example if the input image
data type is (8-bit) the value R=255, …etc [12].
5- Mean Absolute Error (MAE): The large value of Mean Average Error (MAE)
means that image is poor quality. MAE is defined as follow [13]:
M N
1
MAE = ∑ ∑|x(i, j) − y(i, j)| … (𝟏𝟖)
MN
i=1 j=1
6- Visual Information Fidelity (VIF): The visual quality measurement is of
fundamental importance in many image and video processing applications. VIF
is an effective full reference image quality metric proposed by Sheikh and Bovik
[14], where they proposed an information fidelity criterion that quantifies the
Shannon information that is shared between the reference and the distorted images
relative to the information contained in the reference image itself. They use
Natural Scene Statistics (NSS) modeling in concert with an image degradation
model and an HVS model [15, 16]. VIF is define as:
∑k ∈ subband ∑b I(Cb , Fb )
VIF = … (19)
∑k ∈ subband ∑b I(Cb , Eb )
Where I (Cb , Eb ) and I (Cb , Fb ) represent the information that can ideally be
extracted by the brain from a particular sub-band in the reference and the test
images respectively.
7- Nonlinear Correlation Coefficient (NCC): This measure used to describing
any type of correlation between two variables or images. NCC is define as [17]:
-5-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬
NCC(X, Y) = H(X) + H(Y) − H(X, Y) … (20)
Where H(X): the revised entropy for the variable X, which is defined as:
b
ni ni
H(X) = − ∑ log b … (21)
N N
i=1
And H(X, Y): The revised joint entropy for the two variables X and Y is defined
as:
b b
nij nij
H(X, Y) = − ∑ ∑ log b … (22)
N N
i=1 j=1
NCC is sensitive to nonlinear correlation between two variables. Its value lies
within the closed interval [0, 1], with 0 indicating the minimum correlation and 1
indicating the maximum.
8- Feature Similarity Index (FSIM): FSIM index proposed based on a fact that
the human visual system (HVS) understands the image mainly according to its
low-level features. This metric specifically uses two features are a primary and
secondary feature. A primary feature is the Phase Congruency (PC), which is a
dimensionless measure of the significance of a local structure, where considering
that PC is contrast invariant while the contrast information does affect HVS’
perception of image quality. A secondary feature is the image Gradient Magnitude
(GM). The two features PC and GM play complementary roles in characterizing
the image local quality. FSIM defined as [18]:
∑M N
i=1 ∑j=1(Similarity Image)
FSIM = … (𝟐𝟑)
∑M N
i=1 ∑j=1(PCm )

7. Microscopic Images Samples


This study included Microscopic Images for three cases from disease of Hepatitis
taken by Optical Microscope (OM) and with power of magnification is (400x), stain
method is Hematoxylin and Eosin (H&E) and with format and size are (jpg,
420*420). Where have been De-blurring image from blur by applying tow methods
are (Laplacian Filter and High Boost Filter). Figure (1) shown blur and De-blur
images by two methods.

8. The Algorithms of Study


Figure (2) illustrates the flowchart for De-blurring methods applied in this study and
are Laplacian Filter and High Boost Filter to get an image be more sharpen and
contrast.

-6-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

Figure (1) Images for Three Cases before and after Fusion by Laplacian Filter

Figure (2) Flowchart of Apply Laplacian Filter and High Boost Filter
9. The Results
Tables (1), (2) and (3) show the results of De-blurring image quality assessment by
using Laplacian filter and High Boost Filter for three cases from Hepatitis with Stain
method and Magnification Power are (H&E, 400x).

-7-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

10. Conclusions
The results of quality measures to assess the improved image quality from the blur
as illustrates in tables (1), (2) and (3). Where it included measures to measure both
image structure, image error, image correlation, and visual Information Fidelity ...
etc. Where it showed that the quality of the improved image from the blur was rather
good after applying both Laplacian Filter and High Boost Filter to the blurry image.
But in a comparison between the two methods and through the results of the quality
assessment measures we conclude that the method of Laplacian Filter gave an image
with sharpness and contrast better from the improved image by High Boost Filter.

Table (1) Quality Measures for De-blurring Image (Hepatitis, H&E, 400x) For Case 1

Figure (1) Analysis of Quality Metrics for Enhanced Image – Hepatitis 1, H&E 400x

-8-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

Table (2) Quality Measures for De-blurring Image (Hepatitis, H&E, 400x) For Case 2

Figure (2) Analysis of Quality Metrics for Enhanced Image – Hepatitis 2, H&E 400x

-9-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

Table (3) Quality Measures for De-blurring Image (Hepatitis, H&E, 400x) For Case 3

Figure (3) Analysis of Quality Metrics for Enhanced Image–Hepatitis 3, H&E 400x

-10-
Academic J. for Engineering and Science ‫ للهندسة والعلوم‬... ‫اجمللة األكــاديمــية‬
2020 ‫) – كانون األول لسنة‬0( ‫العدد‬

References

[1] Alan C. Bovik, "The essential guide to image processing". Academic Press, 2009.
[2] Madhu V Nayakkankuppam and YV Venkatesh, "Deblurring the Gaussian blur
using a wavelet transform," Pattern Recognition, vol. 28, no. 7, pp. 965-976, 1995.
[3] Sirisha L. Kala, "Deblurring Images via Partial Differential Equations,"
Proceedings of the Louisiana-Mississippi Section of the Mathematical Association
of America, 2004.
[4]Salem Saleh Al-amri and NV Kalyankar, "A comparative study for deblured
average blurred images," International Journal on Computer Science Engineering,
vol. 2, no. 3, pp. 731-733, 2010.
[5] Rafael C. Gonzalez and Richard E Woods, "Digital Image Processing",
Publishing House of Electronics Industry, vol. 141, no. 7, 2002.
[6] Rafael C. Gonzalez and Richard E. Woods, "Digital Image Processing. Third
edit," ed: New Jersey: Pearson Education, Inc, 2008.
[7] Zhou Wang, Alan C. Bovik, Hamid R Sheikh, and Eero P Simoncelli, "Image
quality assessment: from error visibility to structural similarity," IEEE transactions
on image processing, vol. 13, no. 4, pp. 600-612, 2004.
[8] Zhou Wang and Alan C. Bovik, "A universal image quality index," IEEE signal
processing letters, vol. 9, no. 3, pp. 81-84, 2002.
[9]Niranjan Damera-Venkata, Thomas D. Kite, Wilson S. Geisler, Brian L. Evans,
and Alan C. Bovik, "Image quality assessment based on a degradation model," IEEE
transactions on image processing, vol. 9, no. 4, pp. 636-650, 2000.
[10] D Amnon Silverstein and Joyce E Farrell, "The relationship between image
fidelity and image quality," in ICIP (1), pp. 881-884, 1996.
[11] Ahmet M. Eskicioglu, Paul S. Fisher, and Si-Yuan Chen, "Image quality
measures and their performance", 1994.
[12] VS Vora, AC Suthar, YN Makwana, and SJ Davda, "Analysis of compressed
image quality assessments," Tech Student in EC Dept, CCET, Wadhwan-Gujarat,
2010.
[13] Sonja Grgic, Mislav Grgic, and Marta Mrak, "Reliability of objective picture
quality measures", Journal of Electrical Engineering, vol. 55, no. 1-2, pp. 3-10, 2004.
[14] Hamid R. Sheikh and Alan C. Bovik, "Image information and visual quality," in
2004 IEEE International Conference on Acoustics, Speech, and Signal Processing,
vol. 3, pp. iii-709: IEEE, 2004.
[15] Martin J. Wainwright and Eero P. Simoncelli, "Scale mixtures of Gaussians and
the statistics of natural images," in Advances in neural information processing
systems, pp. 855-861, 2000.
[16] Martin J. Wainwright, Eero P. Simoncelli, and Alan S. Willsky, "Random
cascades on wavelet trees and their use in analyzing and modeling natural images",
Applied Computational Harmonic Analysis, vol. 11, no. 1, pp. 89-123, 2001.
[17] Tania Stathaki, Image fusion: algorithms and applications. Elsevier, 2011.
[18] Lin Zhang, Lei Zhang, Xuanqin Mou, and David Zhang, "FSIM: A feature
similarity index for image quality assessment," IEEE transactions on Image
Processing, vol. 20, no. 8, pp. 2378-2386, 2011.

-11-

You might also like