4822
4822
Dianyuan Han
Dept. of Computer Engineering
Wei Fang University
Shandong 261061, China
wfhdy@163.com
Abstract—Image magnification algorithms directly affect the such as P. so the values of these pixels should be calculated
quality of image magnification. In this paper, based on the throw interpolating estimation.
image interpolation algorithm principle, features of the nearest
neighbor interpolation, bilinear interpolation, A B A B
bicubic interpolation and cubic B spline interpolation were
analyzed. At the same time, their advantages and C D
disadvantages were compared. In the experiment, image
magnification performance of different interpolation
algorithms was compared from subjective and objective P
aspects. The experimental results give the guidance for the user
to choose a suitable algorithm to achieve optimum results C D
according to different application.
I. INTRODUCTION
Image magnification is one of the basic image operations, III. COMMON INTERPOLATION ALGORITHM
and is widely used in many applications[1]. The image
magnification is a conversion process from a low resolution A. Nearest neighbor interpolation
image to a high resolution image. The image magnification is In nearest neighbor interpolation algorithm, the position
essentially image interpolation process. There have been a of pixel P in the magnified image is converted into the
lot of practical image magnification methods which have original image, and the distance between P and its neighbor
their own characteristics, advantages and disadvantages. The points A, B, C and D were calculated. Then the color values
choice of the different image magnification algorithm of pixel P was set as the values of the pixel which was
directly affects enlarged image quality, so it is important to nearest to P[2].
find a suitable algorithm to improve the image magnification In Fig. 2, suppose ( i, j ) , ( i, j + 1) , ( i+ 1, j ) and ( i+ 1,j
quality. + 1) are the 4-neighbor points, and there values are f( i, j ) ,
In current, the commonly used image magnification f( i, j + 1) , f( i+ 1, j ) and f( i+ 1,j + 1). The distance between
method is interpolation method. In the experiment, image (u,v) and ( i, j ) , ( i, j + 1) , ( i+ 1, j ) and ( i+ 1,j + 1) were
magnification performance of different interpolation calculated, then the values of (u,v) was set as the value of
algorithms was compared from subjective and objective the point which is nearest to (u,v). [3]
aspects to give the guidance for the user to choose a suitable
algorithm to achieve optimum results according to different
(i,j) (i,j+1)
application.
II. IMAGE AMPLIFICATION PRINCIPLE
(u,v)
The basic principle of image magnification is to increase
the image pixel number, so a low resolution image is
converted to a high resolution image. (i+1,j) (i+1,j+1)
When a small image is enlarged, for example if an image
is zoomed to 400% shown in Fig. 1., the color values of Figure 2. Diagram of nearest neighbor interpolation algorithm
original 4 adjacent pixels marked A, B, C, and D in (a) were
filled in the new A, B, C, and D locations in (b) accordance
with the magnification factor. But there are a large number B. Bilinear interpolation
of pixels which values are unknown between A, B, C, and D, In bilinear interpolation algorithm[4], the position of
pixel P in the magnified image was converted into the
original image, then the Influence of the four pixel points A, nonlinear calculation. The diagram of nonlinear interpolation
B, C and D was calculate. The nearer distance to the point P, algorithm is shown in Fig.5.
the value is greater, which indicates the greater effects. The
diagram of bilinear interpolation is shown in Fig. 3.
A E B
(2) f ( x) = B
k = −∞
k , n +1 ( x) • f ( x k ) (4)
Step 3: to calculate the influence of E and F and denote it
as P. Three order B-spline function is as follows:
f (i + u, j + v) = (1 − u )(1 − v) f (i, j ) − (1 − u )vf (i, j + 1) ( x − xi ) 2
,xi ≤ x ≤ xi+1
( xi +1 − xi )( xi +2 − xi )
+ u (1 − v) f (i + 1, j ) + uvf (i + 1, j + 1)
( x − xi ) 2 ( xi +2 − x)( x − xi +1 )
(3) − ,xi+1 ≤ x ≤ xi+ 2
Bi ,3 = ( xi +1 − xi )( xi + 2 − xi ) ( xi + 2 − xi +1 )( xi +3 − xi +1 )
C. Bicubic Interpolation ( x − xi + 3 ) 2
,xi+2 ≤ x ≤ xi +3
Bicubic interpolation is similar to bilinear interpolation ( x i +3 − xi +1 )( xi +3 − xi + 2 )
algorithm. For the unknown pixel P in amplified image, its 0 everywhere
influence sphere is expanded to its 16 adjacent pixels, then (5)
the color value of P is calculated by these 16 pixels
according to their distance to P. The diagram of bicubic
interpolation algorithm is shown in Fig.4. IV. EXPERIMENT RESULT
In order to test the performance of the algorithm, We
(i-1, j-1) (i-1, j+2) have developed a MATLAB 2009[6] implementation on
Intel(R) Core(TM) 2 T7200 2.00GHz CPU, 2.0GB RAM
(i, j)
computer.
(u, v)
To compare the performance of the different algorithm, a
test image was zoomed out to half of the original size. And
then the shrunken image was expanded to its original size by
(i+2, j-1) (i-2, j+2)
using different algorithm.
At last the enlarged image quality was compared From
two aspects: subjective and objective.
Figure 4. Diagram of bicubic interpolation algorithm A. Objective Evaluation
In this paper, the mean square signal-to-noise ratio (SNR)
Compared with bilinear interpolation algorithm, bicubic was used to evaluate image expansion performance of
interpolation algorithm extends the influence with more different algorithms.
points, and uses advanced interpolation algorithm. Let f (x, y) represents the original image with the size of
In the horizontal direction, to calculate the value of e
M × N, f ( x, y ) represents the enlarged image which has
between two points A and B, it is need to use four pixels
been zoomed out to half size of its original image, and
value of A, B , A-1, B+1 and get a smooth curve through a
f represents the mean gray value of the original image. f Average Running Time
is defined as fellow.
M −1 N −1
1
f ( x, y) 18 17
f = (6)
16
MN x =0 y =0
14
SNR is defined as (7). 12
M −1 N −1 10
[ f ( x, y) − f ]
2 8
8 6
x =0 y =0 6 5
SNR = 10 lg M −1 N −1 (7)
4
[ f ( x, y ) − f ( x, y)]2 2
x =0 y =0 0 Neighbour B-SPline
In the experiment, we selected 30 images representative Nearest Bilinear Bicubic Cubic
image to test, the results is shown in Tab.1.
TABLE I. Contrast table of SNR with different interpolation mothods Figure 6. Average running time of different interpolation algorithm