Quadratic trigonometric B-spline for image interpolation using GA

In this article, a new quadratic trigonometric B-spline with control parameters is constructed to address the problems related to two dimensional digital image interpolation. The newly constructed spline is then used to design an image interpolation scheme together with one of the soft computing techniques named as Genetic Algorithm (GA). The idea of GA has been formed to optimize the control parameters in the description of newly constructed spline. The Feature SIMilarity (FSIM), Structure SIMilarity (SSIM) and Multi-Scale Structure SIMilarity (MS-SSIM) indices along with traditional Peak Signal-to-Noise Ratio (PSNR) are employed as image quality metrics to analyze and compare the outcomes of approach offered in this work, with three of the present digital image interpolation schemes. The upshots show that the proposed scheme is better choice to deal with the problems associated to image interpolation.


Introduction
Trigonometric polynomials and splines have always been beneficial in multifarious research areas such as medicines, electronics [1] and computer aided geometric design [2]. Recently trigonometric polynomials have attained pronounced attention in the field of image processing in particular to investigate problems related to image compression [3]. Trigonometric splines were first introduced by Schoenberg [4] with a recurrence relation established by Lyche and Winther [5] for trigonometric B-splines of arbitrary order. Furthermore Walz [6] discussed that trigonometric B-splines of odd order form a partition of a constant in case of equidistant knots. Keeping such utilities and application potentialities of trigonometric functions in view, several new quadratic and cubic trigonometric polynomials have been introduced by researchers later on [7][8][9].
In early years of developments in the field of image processing a variety of spline functions with confusing naming were found. Sometimes they are referred as cubic splines [10], bicubic splines [11] or high resolution splines [12], while interpolation is named as cubic convolution interpolation [13]. Hou and Andrews [10] for the first time discussed the computational implementation of B-splines as a tool in various digital image and signal processing applications both software and hardware point of view. The work was then extended by Unser in [14]. Parker, Kenyon and Troxel [12]  B-spline interpolation to preserve the quality of digital images. Luu, Wang, Vo, et al. [15] presented an improved interpolation method to enhance quality of two dimensional digital images with family of recursive interpolation functions based on B-spline representation and its inverse gradient weighting version.
In recent year some state-of-the-art image interpolation techniques became popular among the community of image processing. Li and Orchard [16] developed an edge-directed interpolation algorithm to estimate local covariance coefficients from a low-resolution image and adapt the interpolation at a higher resolution based on the geometric duality between their covariance. Li in [17] established a patch-based image interpolation algorithm under a set theoretic framework which formed as an alternate to the projection onto two convex sets: set of observation data and the other defined by a sparsity-based nonlocal prior. Hung and Siu [18] proposed a single frame super resolution algorithm using a finite impulse response; Wiener-filter. The correlation matrices are estimated using the nonlocal means filter to form a new iterative framework which is used to improve the estimated correlation and estimated high-resolution image.
Although B-spline were constructed as convolution of certain probability distributions in early nineteenth century, Schoenberg [19] in 1946 used them for statistical data smoothness which started a new era of modern mathematical study of spline approximation. Later on Lewis [20] for the first time developed local support basis for GC 2 splines. Bartels and Beatty [21] constructed local basis functions for β-spline. Foley [22] developed a B-spline like basis for different weights spline such as ν-spline, β-spline and γ-spline. Sarfraz [23] established number of B-spline like local basis for the rational splines. These splines maintains the geometrical smoothness, continuity and computational simplicity achieved by other ν-spline, β-spline, γ-spline and weighted splines.
In this paper, an iterative image interpolation scheme is designed to investigate the two dimensional digital image interpolation problems. First a quadratic trigonometric B-spline with control parameters is established using a constructive approach described in [24], then an optimization technique based on Genetic Algorithm (GA) helps find the appropriate values of control parameters in the description of B-spline. The interpolation scheme is made up of several stages to achieve the resulting interpolated images. Gray scale digital images are considered as reference image into account. Moreover to analyze the quality of resulting interpolated images FSIM, SSIM, MS-SSIM indices and PSNR are utilized as standard image quality metrics. A comparison of the outcomes of proposed interpolation scheme with three of the stateof-the-art image interpolation schemes is also made.
Rest of the paper is organized as follows. Section 2 is about the construction of local support quadratic trigonometric B-spline basis with control parameters defined in its description. Section 3 is dedicated to overall methodology and proposed image interpolation scheme. Demonstration of the proposed interpolation scheme is presented in Section 4. Finally, Section 5 concludes the paper.

Quadratic trigonometric B-spline
A C 1 quadratic trigonometric spline is proposed here to establish new local support quadratic B-spline basis which consists of two control parameters in its depiction. Quadratic B-spline basis are attained by a transformation to piecewise defined Bernstein-Bézier form which will then be used to formulate quadratic trigonometric B-spline representation.

Quadratic trigonometric spline
Let (x i ,F i ), i = 1,2,. . .,n be the given set of data demarcated over the interval [a Ã ,b Ã ] where the partition of the data is . .,n, is defined as: where Q l ; l = 0,1,2,3, are co-efficient of interpolation which are defined as follows: are the derivatives at the knots x i which may be given or estimated using any approximation schemes; geometric mean, arithmetic mean and harmonic mean. Furthermore, the quadratic trigonometric spline function (1) has the following C 1 interpolating properties: where T (1) (x) represents the derivatives with respect to the variable x. The functions S l,i (φ,α i , β i ); l = 0,1,2,3 in (1) are the quadratic trigonometric basis functions defined in each sub intervals [x i ,x i+1 ] as: Moreover these quadratic functions satisfied the following properties: . .,n−1.

Convex hull property:
The entire segments of piecewise quadratic trigonometric spline function must lie inside the control polygon spanned by P 0 ,P 1 ,P 2 and P 3 .

Variation
Diminishing Property: It can be stated as the curve has no more intersections with any plane than does the control polygon.

Local support quadratic trigonometric B-spline basis
On the way to construct local support quadratic trigonometric B-spline basis, additional knots x −3 < x −2 < x −1 < x 0 and x n < x n+1 < x n+2 < x n+3 will be introduced on both outsides of the interval [x 0 ,x n ] with control parameters α i , β i > 0; i = −3, −2, . . ., n + 3, defined on this stretched partition of [x 0 ,x n ]. A quadratic spline ϑ l (x); l = −1, . . ., n + 3, can be defined as: ( Therefore, the function ϑ l (x) will have the following quadratic form for the remaining inter- where S l,i (φ,α i ,β i ); l = 0,1,2,3 are same as defined in Eq (3). The requirement that ϑ l is continuous up to second order in particular at x l−2 , x l−1 , x l and x l+1 , the quadratic trigonometric function uniquely determined the following where and The graphical view of the quadratic trigonometric function ϑ l (x), l = −1,0,. . .,n + 2, is shown in Fig 4. Next the local support quadratic trigonometric B-spline basis is elaborated by the difference of the quadratic functions ϑ l as: Therefore, an explicit form of the quadratic trigonometric B-spline B l (x) on any interval is computed from (4)-(7) as: ðx l Þ ¼l l Àm l ; Hence, it can be noticed that the quadratic trigonometric B-spline basis B l (x), l = −1, −2, . . ., n + 1, have the following properties: for all x.

1D and 2D quadratic trigonometric B-spline functions
In this section, 1D and 2D quadratic trigonometric B-spline functions are established. Both the functions are inspired by the local support basis (8). Let T Ã (x) be the desired 1D quadratic trigonometric B-spline interpolating function, where Q Ã l are the co-efficient of interpolation and can be obtained from the set of discrete data defined at certain given spatial points. Furthermore from the local support properties defined in Section 2.2, Eq (9) can be rewrite as Thus by substituting the values of B l (x) from Eq (8) in Eq (10) where with σ l = 2/(1 + σ l ), and ω l = 2/(1 + β l ). As Eq (11) represents the piecewise Bernstein-Bézier form of quadratic trigonometric Bspline so the function T Ã (x) can be rewritten in vector form as: where X l = [F l V l W l F l+1 ] T and X l = Y l Z l with In order to extend the above 1D B-spline interpolating function to two dimensions, Eq (9) can be written as: where B l (x) are same as defined in Section 2.2 and analogouslyB k ðxÞ are the quadratic trigonometric B-spline basis corresponding to a set of knotsx j ; j ¼ À 3; À 2; . . . ; m þ 3. Here the control parametersã j ;b j ; j ¼ À 2; À 1; . . . m þ 2 also correspond to the set of knotsx j ; j ¼ À 3; À 2; . . . ; m þ 3. Hence for x 2 [x i ,x i+1 ],x 2 ½x j ;x jþ1 , the function T Ã ðx;xÞ be the required 2D quadratic trigonometric B-spline in vector form is defined as: where the points X i;j l;k can be computed from the quadratic trigonometric B-spline vertices Q Ã l;k as ; ; and the matrix Y l is given in (12) with a corresponding extension forỸ k .

Genetic algorithm approach to image interpolation
This section describes the overall process of implementation of soft computing technique genetic algorithm to image interpolation using newly constructed quadratic trigonometric Bspline. The process includes the phases of problem matching with genetic algorithm and image interpolation based on quadratic trigonometric B-spline basis. An introduction to the parameters used for genetic algorithm is also made a part to this section.

Optimization by genetic algorithm
Genetic algorithms [25] are probabilistically modeled search techniques which are used to find out global optimal solutions in an effectual way as compare to other conventional optimization techniques even in large solution spaces. Genetic algorithms represent a class of parallel adaptive search techniques whose mechanisms are based on natural selection of optimal solutions through some biological evolutionary procedure. They use multiple search points at the same time to find out an optimal solution without going through an exhaustive mechanism of searching. Genetic algorithms start with a collection of solutions which are analogous to the chromosomes in natural systems of genetics. Each chromosome usually represents a binary bit string with individual bits 0 or 1which are named as genes. The collection of candidate solution is called population which is randomly chosen from the solution space at the beginning when the search through genetic algorithms starts. The main three genetic operators 'selection', 'crossover' and 'mutation' help genetic algorithms for survival in the large solution space. The crossover and the mutation operators are exemplified here in Fig 6 to illustrate the overall process of genetic algorithm for some selected chromosomes.
As this work is aimed to search an optimal solution for image interpolation based on quadratic trigonometric B-spline basis with control parameters a i ;ã j ; b i , andb j for i = 0,1,2,. . .,n − 1 and j = 0,1,2,. . .,m − 1. Therefore, genetic algorithm is employed here to pursue the appropriate values of control parameters. Now before starting the discussion on genetic algorithm, several terms and system parameters are needed to be defined in advance. In this work the maximum no. of iterations or generations set is 10 and the size of population taken is 20. Initially population is generated by randomly selecting chromosomes or bit strings where each single gene represents the value for control parameters a i ;ã j ; b i , andb j as defined in the portrayal of quadratic trigonometric B-spline (14). Moreover a fitness or objective function is the sum square error which is defined for the image spatial data and formulated as: where Im ij and Im 0 ij represent the original reference image and resulting interpolated images respectively. Genetic operations selection, crossover and mutation will be used to maintain the preeminence of optimal solution. The process of genetic algorithm will be stopped when the predefined number of iterations is attained.

Proposed image interpolation scheme
In this section, an image interpolation scheme is designed using quadratic trigonometric Bspline (15) and genetic algorithm. The scheme comprises of several steps which are elaborated here one by one. First of all, it finds the spatial data of a selected reference image through some image decoding schemes. Secondly, all the system parameters of GA are initialized to attain the optimal values of control parameters a i ;ã j ; b i , andb j . An initial population is made randomly with possible combination of the values of parameters. Successive implementations of search operations mutation, crossover and selection to this population make a better lead to optimal values of a i ;ã j ; b i , andb j such that the sum square error (16) is minimized. Thus the optimal values of a i ;ã j ; b i , andb j make the whole quadratic trigonometric B-spline representation optimized and the interpolated image designed using the optimized B-spline will be called optimal interpolated image. So, finally the image data is interpolated using the optimized quadratic trigonometric B-spline. Repeated implementations of search operations for respective iterations of GA will help to contain better approximation until the best optimal resulting interpolated image is obtained. Fig 7 presents the flow diagram of the proposed scheme.

Experimental results
In this section, the proposed quadratic trigonometric image interpolation scheme with soft computing technique, genetic algorithm, defined in Section 3 is tested and compared with some representative work in the literature: the image Super Resolution algorithm based on Non-Local Means (SR-NLM) [18], Patch Based Non-Local (PB-NL) image interpolation [17] and New Edge-Directed Interpolation (NEDI) [16]. The proposed scheme is tested on three different natural images. The images are gray scaled in 512×512 resolution with eight bits per pixel and named as 'Moon-Surface', 'Boat' and 'Truck' respectively. The images were downsampled first to acquire low-resolution images and then up-sampled twice using the proposed image interpolation scheme to get the resulting interpolated images. For SR-NLM, PB-NL and NEDI implementation codes are provided by the authors and available online at [26, 27].  As the original test images are known so one can easily characterized the difference between the resulting and original reference images using different existing image quality metrics. Structure SIMilarity (SSIM) index [28], Multi-Scale Structure SIMilarity (MS-SSIM) index [29] and Feature SIMilarity (FSIM) index [30] along with the traditional Peak Signal-to-Noise Ratio (PSNR) [31] are utilized here to assess the expediency of proposed optimal image interpolation scheme. PSNR is a classical objective image quality metric to measure the intensity differences of two images. It is usually measured in the unit of decibels (dB) and attains high values if an image has a high picture quality and attains a low value if an image contains a low picture quality but in some examples the resulting images may look close to the original refer-

Conclusions
A newly constructed quadratic trigonometric B-spline representation and a soft computing technique genetic algorithm are combined together to design an image interpolation scheme. The image quality metrics SSIM, MS-SSIM and FSIM indices along with traditional PSNR are employed to assure the quality of resulting interpolated images. Experimental outcomes and comparison with existing image interpolation schemes show that the suggested quadratic trigonometric B-spline together with genetic algorithm is a better representation and plays a significant role for the problem related to image interpolation e.g. image magnification and geometric transformation (resizing, rotation, sharing, etc.).