Keywords

1 Introduction

Digital image magnification (DIM) means to take low resolution image as an input and generate a corresponding high resolution image. The terms zooming, super resolution (SR) and scaling etc. are also used interchangeably for the same process. Image magnification aims to compute high resolution image containing accurate and precise details of the original low resolution image. Magnification technique must preserve the sharp luminance information, texture, geometrical invariance, and smoothness of the original image while producing high resolution image from the source image. DIM has various applications in many areas e.g. high-definition television (HDTV), medical Imaging, surveillance system, satellite-imaging, and entertainment etc. A variety of techniques can be used to produce SR image. The reconstruction based DIM techniques [1216] need prior information to model the zooming scheme. This information can be acquired by down-sampling the HR images to low-resolution (LR) images. In order to construct the high resolution image, reconstruction DIM is considered as the inverse problem by adding one or more LR images. There are various other image zooming schemes based on machine learning approaches [1520]. Therefore a set of LR and their corresponding patches of HR image are stored in database. To construct HR image from given LR image, a patch from LR input image and their corresponding HR is used for the magnification. Machine learning approaches have high time complexity and impossible to implement in real time systems. Interpolation based DIM techniques [710] are used most often. Such techniques take a single image as an input and produce HR image. The common interpolation techniques are Nearest Neighbor (NN), Bilinear (BL) and Bicubic (BC). These techniques are non-adaptive. The time complexity of these non-adaptive techniques is low but these techniques introduce some unwanted artifacts across the edges in the image. There are some edge-directed interpolation schemes [11] which are adaptive and preserve original information of the source image. Moreover, these schemes perform the interpolation in selective direction using the geometrical and structural information of the image. Still BC interpolation scheme is used most frequently due its low time complexity and good visual results. [1] proposed a zooming technique using block-expanding method based on intervals which associate each pixel with an interval acquired by a weighted combination of the pixels in the vicinity of the neighborhood.

In this paper, our objective is to develop an efficient magnification technique which, construct HR image from given source LR image. The idea of the proposed technique is based on the calculation of the value of the unknown pixels from given known pixels information in the neighborhood by weighted approximation. For assigning correct weight to each pixels in the neighborhood [1, 21, 22], resultant image of HR will be of high quality. To use this concept, the proposed technique uses two type Gaussian kernels, generated by two different values of standard deviation of Gaussian Function. The standard deviation of the neighborhood pixels determines which Gaussian kernels to be used.

The proposed technique is computationally simple and produces good results quantitatively as well as qualitatively. For this purpose it has been compared with contemporary techniques as discussed in detail in Sect. 3

2 Proposed Method

Suppose Sin is the source image of size r × c and λ is a magnification factor. The source image is first expanded by factor λ where λ = {2, 4, 8}. Sin is mapped from a smaller pixel grid to larger pixel grid i.e. Sout (R,C) = Sin(r × λ, c × λ) where R × C is the size of expanded image. After expansion, Sout has undefined pixels which are interpolated from already known pixels. The magnified image of high quality is obtained by convolving a kernel ΦGk(s,t) on Sin.

$$ {\text S}_{\text out} {\text (x,y)} = \sum\limits_{\text s = i} {\sum\limits_{\text t = j} {\text S_{in}} {(\text x + s,y + t)}\Upphi_{\text Gk} {(\text s,t)} } $$
(1)

ΦGk(s,t) is the Gaussian kernel of size s × t. k denotes type of Gaussian’s kernel. In order to get the complete zoomed image of high quality Eq. (1) must be convolved for x = 1, 2 … R and y = 1, 2 … C. The proposed technique uses two type of Gaussian kernels depending on the luminance information of the interpolation window. The size of the interpolation window is also of size s × t. Initially the standard deviation σw of the interpolated window is calculated according to:

$$ \sigma_{\text w} = \sqrt {\sum\limits_{\text s = i} {\sum\limits_{\text t = j} {\frac{{\left( {\overline{\text X} - {\text S_{\text out}} {(\text x + s,y + t)}} \right)^{2} \,\,}}{{\text s_{xt} }}} } } $$
(2)

where \( \overline{X} \) is the mean of interpolated window. The Gaussian Kernel is generated with σGk = 0.3 of size s × t, if σw is greater than threshold τ otherwise it will be generated with σGk = 0.8 of the same size. The Gaussian kernel [46] is defined as:

$$ \Upphi_{Gk} (s,t) = \frac{1}{{\sqrt {2\pi \sigma } }}e^{{\frac{{ - d^{2} }}{{2\sigma_{Gk} }}}} $$
(3)

where d2 is the distance of neighbor pixels (si, tj) from the center pixel (sc, tc). The σGk defines the width i.e. the degree of smoothness, of a Gaussian Kernel ΦGk(s,t). In case of sharp luminance, we use the kernel with σGk = 0.3 and for smoothness where the interpolation region is constant, we use the kernel with σGk = 0.8. The values for σGk = {0.3,0.8} have been chosen after a number of tests on smoothed, texture and sharped luminance interpolated regions of the images. σGk with value 0.3 gives good result on sharped luminance interpolated area while maintaining the texture of the image and σGk with value 0.8 has better-quality for smooth interpolated region. It preserves not only the smoothness of the image but also preserves the texture property of the image inside smooth region. The Gaussian function has been shown with both sigma’s values in Fig. 1. The Gaussian kernels ΦGk(s,t) of size s × t generated with σGk = 0.3 and σGk = 0.8 are shown in Fig. 2. Figure 2a shows the interpolation window in expanded image in the form of grid of size S × T. The dark gray blocks in grid represent the known pixels and white blocks in the grid stand for unknown pixels. The block contain ‘X’ is the interpolated pixel. These both kernels convolve to the known pixels inside the interpolation region and sum of the convolved pixels is assigned to the block contain ‘X’.

Fig. 1
figure 1

The two-dimensional Gaussian function with σ Gk  = 0.3 and σ Gk  = 0.8

Fig. 2
figure 2

a Example of interpolation window in expanded image b is the Gaussian kernel with σGk = 0.3 (c) is the Gaussian kernel with σGk = 0.8

Figure 3 shows the system model of the proposed technique. The proposed technique take gray scale image as an input and produce the zoomed image by factor λ = 2. It also work same for the color image. Let £rgb be the color source input image of size r × c × z where z stands for RGB color channels. We split this color image £rgb into RGB channels e.g. £r, £g and £b. On each separate color channel (gray-scaled image) the proposed technique is applied independently with magnification λ = 2 and produced the magnified images of each color channel £R, £G and £B of size R × C. For combining these three £R, £G and £B images we get the zoomed color image £RGB of size R × C × Z.

Fig. 3
figure 3

System model of the proposed magnification technique

3 Experimental Results

The proposed technique has been evaluated qualitatively as well as quantitatively. For this purpose we use a set of images from public database provided by [3]. All the images were of size M × N where M = N = 512. The images were reduce by factor λ = 1/4 and magnified to its original size using different zooming techniques. Let OMN be the original image obtained from public database and TMN be the magnified image after reducing it by λ = 1/4. The proposed technique has been compared with other three techniques, one recent technique ‘InInfo’ [1] and other two are well-known classic interpolation schemes i.e. Bilinear (BL) and Bicubic (BC) interpolation techniques [2]. The program for InInfo was provided by the author and for bilinear and bicubic we used already existing implementations in MATLAB R2011b. In order to evaluate that how much the magnified image TMN is similar to original image OMN, we assess the similarity using Peak Signal to Noise ratio (PSNR) [1] and Mean Squared Error (MSE) as:

$$ PSNR = 20*\log_{10} \frac{255}{MSE} $$
(4)
$$ {\text MSE} = \frac{{\sum\limits_{\text x = v,y = t} {\left( {\text O_{\text MN} \left( {\text x_{v} ,y_{t} } \right)\quad {\text T}_{\text MN} \left( {\text x_{v} ,y_{t} } \right)} \right)}^{2} }}{\text MN} $$
(5)

PSNR is the ratio between the strength of the maximum achievable signal and corrupting noise. The noise is the error introduced during zooming process and the signal is the original pixel’s intensity information. The greater value of the PSNR notifies good quality of zooming technique and vice versa. The results have been shown in Table 1. The proposed technique has the highest PSNR values which show the superiority of the proposed technique over other techniques.

Table 1 Comparison of proposed technique with other zooming techniques by calculating PSNR over 10 standard images. The zooming factor is λ = 4

Equation (5) shows how to calculate the MSE. The lower values of MSE describe high quality of zooming technique and vice versa. Figure 4 shows the MSE results calculated over ten standard images. The overall results of the proposed technique are better than other zooming technique. These both quantitative result shows that the proposed technique calculates the unknown value close to actual value. This is because of usage two separate Gaussian kernels adaptively.

Fig. 4
figure 4

MSE computed over ten images zoomed by factor λ = 4 using proposed technique, Bilinear, Bicubic and InInf zooming techniques

In Fig. 5a cropped portion of size 146 × 54 from the color image Bobcat has been magnified by factor λ = 2 (Fig. 5b) and by factor λ = 4 (Fig. 5c). The proposed technique preserved the texture, edges, smoothness, and geometrical variation of the zoomed image to the greater extent which proved the high quality of it. The time complexity of the proposed technique is O (R,C) where R is the number of rows and C is the number of columns. Both qualitative and quantitative results of proposed technique are better than InInfo, Bilinear and Bicubic techniques.

Fig. 5
figure 5

a Cropped portion of size 194 x 71 of Bobcat, b 2 x zoomed, c 4 x zoomed

4 Conclusion

In this paper we have presented a DIM scheme via Gaussian edge-directed interpolation method. The technique uses two Gaussian kernels which intelligently calculate the unknown pixels. The standard deviation of the interpolation window decides the type of Gaussian kernel to be used. The Gaussian kernel with σGk = 0.3 works well in edges and preserves the sharp luminance variation across the boundaries. The Gaussian kernel with σGk = 0.8 works well in smooth area of the image and preserve the texture of the image. In this paper we use only two Gaussian kernels. In future, we intend to test the interpolation region for more than two Gaussian kernels with different values of σGk to preserve the details of the original image up to greater extent.