High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
An analysisofperformanceforcommonlyusedinterpolationmethod
1. See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/308980343
An Analysis of Performance for Commonly Used Interpolation Method
Conference Paper · April 2016
CITATIONS
3
READS
1,574
5 authors, including:
Some of the authors of this publication are also working on these related projects:
An Intelligent Diagnostic System for Malaria View project
New Computing Architecture using Embedded Heterogeneous Processors for High Processing Power and Lower Complexity View project
Badrul hisham Mohamad
Universiti Malaysia Perlis
7 PUBLICATIONS 46 CITATIONS
SEE PROFILE
Shahrul Nizam Yaakob
Universiti Malaysia Perlis
67 PUBLICATIONS 291 CITATIONS
SEE PROFILE
Rafikha Aliana A. Raof
Universiti Malaysia Perlis
31 PUBLICATIONS 162 CITATIONS
SEE PROFILE
Mohd Wafi Nasrudin
Universiti Malaysia Perlis
12 PUBLICATIONS 56 CITATIONS
SEE PROFILE
All content following this page was uploaded by Badrul hisham Mohamad on 11 October 2016.
The user has requested enhancement of the downloaded file.
3. Adv. Sci. Lett. X, XXX–XXX, 2015RESEARCH ARTICLE
2
2.INTERPOLATION
Interpolation is the process of increasing the size of
images by creating new pixel value and filling the proper
value by some algorithms [4, 9]. The mean value of near
most pixels is used to add pixel values to this newly
generated pixel [5]. In order to estimate the value of
unknown point, interpolations use two or more known
data [6]. The basic in image interpolation is to have
reference image as the base to construct a new scaled
image. the constructed image will be larger depending on
the scaling. When enlarging an image, it absolutely
creating some empty spaces in the original base image as
shown in figure 1. Interpolation algorithms used to find
appropriate spot to place the empty spaces inside the
original image and top up each empty spaces with proper
value.
Fig.1. Image with scaling of 2
A. Nearest Neighbor Interpolation
There are many way to perform the interpolation.
One of them is Nearest Neighbor interpolation. Nearest
Neighbor algorithm is the simplest interpolation
algorithm [7]. Each unknown pixel is assigned with an
intensity value that is same as its neighboring pixels [8].
Moreover, this method is fastest implementation of image
scaling technique [9].
Therefore, Nearest Neighbor method is very useful
when the speed is the main concern especially for
zooming for a small part of the image. Having a reference
image is the principle in image scaling and by using this
image as a base; a new scaled image can be constructed.
When enlarge an image, it actually creating an empty
space on the original base image. For Nearest Neighbor
method, the empty spaces are replaced by the nearest
pixel.
Fig.2. Nearest Neighbor algorithms
Let say, the size of original image, A: RxC and size
of scaled image, B is R'xC'. The row scale factor, 𝑆𝑟 and
column scale factor, 𝑆𝑐is.
𝑆𝑟 =
𝑅 − 1
𝑅′
, 𝑆𝑐 =
𝐶 − 1
𝐶′
(1)
For each(𝑟′
, 𝑐′) in B, the corresponding fractional
pixel location, (𝑟𝑓, 𝑐𝑓)in A is:
𝑟𝑓, 𝑐𝑓 = 𝑆𝑟 ∙ 𝑟′
, 𝑆𝑐 ∙ 𝑐′
(2)
The closest integer pixel location 𝑟, 𝑐 , in A:
𝑟, 𝑐 = 𝑟𝑓, 𝑐𝑓 (3)
Where value of (𝑟, 𝑐)is the result of fractional pixel
location,(𝑟𝑓, 𝑐𝑓)which has been rounded whereby it is
used to gain 𝐵(𝑟′, 𝑐′).
𝐵 𝑟′
, 𝑐′
= 𝐴 𝑟, 𝑐 (4)
B. Bilinear Interpolation
Bilinear interpolation is extension of linear
interpolation. The main idea is to implement linear
interpolation in two directions [10, 13].Bilinear
interpolation algorithm is an interpolation technique that
reduces the visual distortion by the fractional zoom
calculation.
The concept of this method used is just like midpoint.
It uses four Nearest Neighbor of pixels whose value is to
be determined. From the below figure, it can be seen how
an intermediate pixel at point (𝑟𝑓, 𝑐𝑓) is created by
interpolating nearest four pixels which is 𝑟, 𝑐 , 𝑟 +
1,𝑐, 𝑟,𝑐+1 and 𝑟+1,𝑐+1.
Fig.3. Diagram for Bilinear Interpolation
An original image has been chosen before it
converting into a matrix form and another matrix with a
new size is created which contain zero elements. This
matrix is padded with the matrix of image so that the
resulted matrix will contains zero elements in every
alternate row and column. Then, the final pixel value of
𝐵 𝑟′
, 𝑐′ is calculating as below:
The value of 𝑆𝑟 and 𝑆𝑐 is the row and column scale
factor of original image of A and newly scaled image, B.
4. RESEARCH ARTICLEXXXXXXXXXXXXXXXXX
3
𝑆𝑟 =
𝑅 − 1
𝑅′
, 𝑆𝑐 =
𝐶 − 1
𝐶′
(5)
For each pixel (𝑟′
, 𝑐′)in output image, B, compute
the fractional location (𝑟𝑓, 𝑐𝑓)in original image, A
.
𝑟𝑓, 𝑐𝑓 = 𝑆𝑟 ∙ 𝑟′
, 𝑆𝑐 ∙ 𝑐′
(6)
𝑟, 𝑐 = 𝑟𝑓 , 𝑐𝑓 (7)
where 𝑟, 𝑐 is round down value of 𝑟𝑓, 𝑐𝑓 . By using
𝑟, 𝑐 , the integer part of 𝑟𝑓, 𝑐𝑓 to find the 4 neighboring
location in A.
∆ 𝑟,∆ 𝑐 = 𝑟𝑓 − 𝑟, 𝑟𝑓 − 𝑐 (8)
Then, compute 𝐵(𝑟′
, 𝑐′)from a weighted sum of A at
each the location. The weight computed from ∆ 𝑟and ∆ 𝑐.
𝐵 𝑟′
, 𝑐′
= (𝐴 𝑟, 𝑐 ∙ 1 − ∆ 𝑟 ∙ 1 − ∆ 𝑐
+ 𝐴 𝑟 + 1, 𝑐 ∙ ∆ 𝑟 ∙ 1 − ∆ 𝑐
+ 𝐴 𝑟, 𝑐 + 1 ∙ 1 − ∆ 𝑟 ∙ ∆ 𝑐
+ 𝐴 𝑟 + 1, 𝑐 + 1 ∙ ∆ 𝑟 ∙ ∆ 𝑐 ) (9)
C. Bicubic Interpolation
In mathematics, Bicubic interpolation is an extension
of cubic interpolation data point. In image enhancement,
Bicubic interpolation is often chosen compare with
Nearest Neighbor and bilinear interpolation when speed is
not taken into account. If earlier, previous method only
use nearest four pixels but in this method, the nearest 16
pixels are used to create an intermediate pixel, 𝐵(𝑟′
, 𝑐′)
[11]. See figure 4 for more detail.
Fig.4. Diagram for Bicubic Interpolation
In above figure, an intermediate pixel 𝐵(𝑟′
, 𝑐′) is
created by interpolating nearest 4x4 pixels
from 𝐴(𝑟, 𝑐)to 𝐴(𝑟 + 2, 𝑐 + 2). The row scale factor, Sr and
column scale factor, Sc for original image of A and new
scaled image B is computed.
𝑆𝑟 =
𝑅
𝑅′
, 𝑆𝑐 =
𝐶
𝐶′
(10)
Then, to find the value of𝐵(𝑟′
, 𝑐′), the equation below
is used to interpolate nearest 16 pixels.
𝐵 𝑟′, 𝑐′ = 𝑎𝑖𝑗 𝐴𝑖𝑗
3
𝑗=0
(11)
3
𝑖=0
Where 𝐴𝑖𝑗 are values of 16 nearest pixels of
𝐵(𝑟′
, 𝑐′).The coefficients of 𝑎𝑖𝑗can be found by using La-
grange equation.
𝑎𝑖𝑗 = 𝑎𝑖 × 𝑏𝑗 (12)
𝑎𝑖 =
𝑟′ − 𝑆𝑟 × 𝑥 + 𝑘
𝑆𝑟 × 𝑥 + 𝑖 − 𝑆𝑟 × 𝑥 + 𝑘
(13)
3
𝑘=0, 𝑘≠𝑖
𝑏𝑖 =
𝑐′ − 𝑆𝑐 × 𝑦 + 𝑘
𝑆𝑐 × 𝑦 + 𝑖 − 𝑆𝑐 × 𝑦 + 𝑘
(13)
3
𝑘=0, 𝑘≠𝑗
Where 𝑎𝑖 is the 𝑖 𝑡
row of A and 𝑏𝑗 is the 𝑗 𝑡
column of
A. The value of k is considered not equal to 𝑖. Meanwhile,
x and y is the value of each rowsand columns that divided
by scale factor, 𝑆𝑟 and 𝑆𝑐.
3.EXPERIMENTAL RESULT
In order to test and compare the performance of all
three interpolation method, several different images are
captured. Those images are captured by twice for every
single of testing image where first sample is taken in 120
centimeter from camera (which is called sample 1) and
the second sample is taken in 60 centimeters from the
camera (called sample 2). Rationally, the image of sample
1 is considered as small image for original image of
sample 2 for every different testing image.
By using the algorithms, the images sample 1 are
enlarging by two scale factor. The resultant images which
acquired from that implementation will be compared to its
original image which is sample 2 of every testing image.
Therefore, Peak Signal to Noise Ratio (PSNR) is
applied on the resultant images in order to evaluate the
performance of interpolation methods. By using its
calculation, PSNR values prove which one has really
higher quality than others. PSNR is most easily defined
via the mean squared error (MSE). Consider I is noise-
free monochrome image and K is its noisy approximation,
MSE is defined as [12]:
𝑀𝑆𝐸 =
1
𝑚𝑛
[𝐼 𝑖, 𝑗 − 𝐾(𝑖, 𝑗)]2
𝑛−1
𝑗=0
𝑚−1
𝑖=0
(15)
The PSNR (in dB) is defined as:
𝑃𝑆𝑁𝑅 = 10 ∙ 𝑙𝑜𝑔10
𝑀𝐴𝑋1
2
𝑀𝑆𝐸
= 20 ∙ 𝑙𝑜𝑔10
𝑀𝐴𝑋1
𝑀𝑆𝐸
(16)
Table 1 has shown the value of PSNR between
magnified image of sample 1 and sample 2 for those
interpolation methods after the test for all of testing image
has been done. This PSNR value computes the peak to
signal ratio, in decibel, between two images. This ratio is
often used as a quality measurement between the original
and a magnified image. Therefore, the higher value in
5. Adv. Sci. Lett. X, XXX–XXX, 2015RESEARCH ARTICLE
4
PSNR means the quality of image is higher.
Table.1. PSNR Value For Three Interpolation
Method
Testing Image Nearest Bilinear Bicubic
Image 1 20.6239 20.7859 20.9603
Image 2 22.8448 22.8676 22.9120
Image 3 23.6664 24.0662 24.4238
Image 4 24.3410 24.5270 25.5025
From the table above, it shown that the Nearest
Neighbor interpolation give lowest quality compare to
others. This method assigns a pixel value with an error
equal at most to half a pixel. Consequently, its produces a
blocky appearance and increase the visibility of jagged
that resulting a poor quality image. Meanwhile, Bilinear
interpolation gives better result than previous method.
From the observation, this method produces much
smoother looking image than Nearest Neighbor. However,
the image can still be somewhat jagged and also resulting
in blurring or loss of image resolution due to the
alteration of grey level in the process. The method that
provided highest quality interpolated image is Bicubic
interpolation. This method produces smoother edge than
bilinear and nearest neighbor. It's also very effective and
generate a better image that are very close to the original
image.
4. CONCLUSIONS
Nearest neighbor interpolation is simplest algorithms
to be implemented and make the pixels bigger. Low of
computation load makes this method easy to be
performed. In this method, the value of a pixel in the new
image is the value of the nearest pixel of the original
image. However, these algorithms create a jagged and
blocky appearance on the resultant image.
In interpolation, bilinear interpolation is more
difficult than nearest neighbor interpolation and it has
larger calculation. Therefore, bilinear interpolation
generates an image of smoother appearance than nearest
neighbor interpolation but alteration of grey level in the
process causing blurring or loss of image resolution.
Bicubic interpolation absolutely can give a better
image quality than previous methods. This method is the
best method among them when the execution time is not
taken into account. Therefore, the algorithm is always
chosen in many images processing image software as
Photoshop, After Effects and Avid etc. Nevertheless, it
need larger amount of calculation and its computation
complexity is higher than bilinear algorithms.
ACKNOWLEDGMENTS
This work was supported financially by the Ministry
of Education under Fundamental Research Grant Scheme
(FRGS9003-00464).
REFERENCES
[1] A. J. Shah and S. B. Gupta, “Image super resolution-A survey,”
2012 1st Int. Conf. Emerg. Technol. Trends
Electron.Commun.Netw., pp. 1–6, Dec. 2012.
[2] S. Farsiu, D. Robinson, M. Elad, and P. Milanfar,
“Advances and challenges in super-resolution,” Int. J.
Imaging Syst. Technol., vol. 14, no. 2, pp. 47–57, 2004.
[3] J. Tian and K.-K. Ma, “A survey on super-resolution imaging,”
Signal, Image Video Process., vol. 5, no. 3, pp. 329–342, Feb.
2011.
[4] Rafael C. Gonzalez and Richard E. Woods,(2002), “Digital
Image Processing” , Second Edition, Pearson Publishing. [3] J.
Tian and K.-K. Ma, “A survey on super-resolution imaging,”
Signal, Image Video Process., vol. 5, no. 3, pp. 329–342, Feb.
2011.
[5] A. Sinha, A. K. Jaiswal, R. Saxena, and C. Engineering,
“Performance A NalysisOf H Igh R Esolution I Mages U Sing I
Nterpolation T EchniquesIn M Ultimedia,” vol. 5, no. 2, pp. 39–
49, 2014.
[6] Cambridgeincolour.com, 'Understanding Digital Image
Interpolation', 2015. [Online]. Available:
http://www.cambridgeincolour.com/tutorials/image-
interpolation.htm. [Accessed: 06- April- 2015].
[7] Cao Hanqiang and Oliver Hukundo,(2012), “Nearest Neighbor
Interpolation”, IJACSA, Vol-11 , No-4.
[8] D. Han, “Comparison of Commonly Used Image Interpolation
Methods,” Proc. 2nd Int. Conf. Comput. Sci. Electron. Eng.
(ICCSEE 2013), no.Iccsee, pp. 1556–1559, 2013.
[9] Tech-algorithm.com, ' Nearest Neighbor Image Scaling', 2015.
[Online]. Available: http://tech-algorithm.com/articles/nearest-
neighbor-image-scaling/. [Accessed: 08- may- 2015].
[10] W. Siu, K. Hung, and A. Polynomial-based, “Review of Image
Interpolation and Super-resolution,” pp. 1–10.
[11] Robert G Keys, (1981), “Cubic Convolution Interpolation for
Digital Image Processing” ,Vol. ASSP-29, No. 6, December.
[12] Pantech Blog, 'Matlab Code for PSNR and MSE', 2015.[Online].
Available: https://www.pantechsolutions.net/blog/matlab-code-
for-psnr-and-mse/. [Accessed: 20- jun- 2015].
[13] H. Lin, C. Lin, C. Lin, S. Yang and C. Yu, 'A Study of Digital
Image Enlargement and Enhancement', Mathematical Problems
in Engineering, vol. 2014, pp. 1-7, 2014.
Received: 22 September 2010. Accepted: 18 October 2010
View publication statsView publication stats