C1 triangular Coons surface construction and image interpolation based on new Side-Side and Side-Vertex interpolation operators

In this paper, a new class of rational quadratic/linear trigonometric Hermite functions with two shape parameters is proposed. Based on these Hermite functions, new improved first class of Side-Side (FCSS), second class of Side-Side (SCSS), first class of Side-Vertex (FCSV) and second class of Side-Vertex (SCSV) interpolation operators are proposed respectively, which can be used to construct C1 Coons surfaces over triangular domain. By altering the values of two shape parameters, the shape of the Coons surface patch can be adjusted flexibly, but without affecting the function values and partial derivatives of the boundaries. For constructing the triangular surface patches with the center of mass passing through a fixed point, we also give a center of mass function value control method, by which we can solve the corresponding shape parameter values. Moreover, we also apply these four improved interpolation operators to image interpolation. Compared with some widely used image interpolation methods, our methods achieve competitive performance.


1.Introduction
The problem of constructing surfaces through a given set of scattered data points has a wide range of applications in many fields, such as medical imaging, scientific visualization, architectural design and aerospace materials manufacturing. In order to satisfy various requirements and obtain pleasing surfaces, many methods have been proposed, such as NURBS, Bézier-like surfaces, and so on. These methods can accurately construct quadrangular surfaces and free form surfaces. However, they still have disadvantages in some applications. One of them is that when adjusting the shape inside the surface, the boundary function values or partial derivatives will be affected simultaneously, which cannot satisfy the requirement of maintaining the shape of the boundaries.
In order to solve this problem, Coons [1] proposed a new surface construction method. If we need to construct a quadrangular surface that satisfies the boundary interpolation requirement, we only need to provide the data points with four boundaries. In real applications, bilinear Coons patches and bicubic Coons patches are widely used. However, the shape of the classic Coons patch is fixed and related to the given data points. Wang  improvement and used second-order trigonometric blending functions to construct biquadrate trigonometric polynomial Coons surface patches with adjustable parameters. Zou et al. [3] constructed a rational Coons surface over rectangular domain, which inherits the good properties of bicubic Coons patches. In her method, R-Hermit basis functions are applied to the interpolation operators, and the parameters in basis functions are used to adjust the shape of the patch. The rational Coons surface can accurately represent ellipsoidal surface, elliptical cone surface, and elliptic cylinder surface.
In computer-aided design (CAD), surfaces are often defined over rectangular domain, for CAD is originally applied to the design of objects with rectangular structures such as cars and aircraft fuselages. However, as the application range of surface geometric modeling technology becomes wider, and the shape of the design surface becomes more complex, rectangular surfaces and rectangular topology appear some limitations. Many scholars have begun to study the surface patches of non-rectangular topologies, such as the triangular surface patches. One of the methods used to construct Coons surface patches over triangular domain is transfinite interpolation, which constructs surface patches by interpolating the boundary values. The two main methods of transfinite interpolation are Side-Side method and Side-Vertex method. Barnhill et al. [4] first presented the Side-Side method, which uses Boolean sum to derive rational blending interpolation functions for constructing triangular surface patches that interpolate the boundary values and partial derivatives. Their method requires the cross partial derivatives to be compatible. If not, Gregory's square [5] can be used to solve this problem. Barnhill et al. [6] used the polynomial blending functions to replace the rational blending functions, and proposed a polynomial Boolean sum interpolant. In [7], Side-Vertex method was proposed by Nielson, which is based upon the convex combinations of three interpolation operators consisting of univariate interpolation along lines segments joining a vertex and its opposing side. In [8], Nielson proposed a new method for constructing G 1 surfaces. This new method utilizes the surface normals rather than the partial derivatives on the boundaries. In [9], Hagen generalized the Side-Vertex method using the geometric Hermite operators. The constructed surface patch guarantees to interpolate the function values, derivatives and curvature values of the triangle boundaries. In [10], this result has been further generalized to open and closed G 2 triangular surface patches by Hagen. Zhang et al. showed a new method to construct triangular surface patches in [11], which is the combination of an interior interpolation operator and three Nielson's Side-Vertex interpolation operators. This method shows better approximation precision than Nielson's Side-Vertex method.
The Coons surface patches constructed by the above methods have advantages in continuity and interpolation properties. However, once the boundary values are given, designers cannot further adjust the shape of the surface because it is already fixed. In order to construct adjustable curves and surfaces, researchers have proposed some convenient and effective methods, one of them is to apply shape parameters to the basis functions. In [12], Zhang gave four cubic C-Hermite polynomials depending on parameter α > 0, and they can exactly reproduce circles and cylinders. In [13], Han presented quadratic trigonometric polynomial curves with a shape parameter, and those curves satisfy C 1 continuity. In [14], Li et al. introduced two kinds of Coons surface patches generated by the hyperbolic polynomial functions and trigonometric polynomial functions respectively. Both two improved schemes achieve adjustable shape through combining the shape parameters in basis functions. In [15], Wu et al. used two classes of trigonometric Hermite polynomial functions to construct the Coons surface patches over triangular domain. By changing the shape parameters, the shape of the Coons surface patch can be adjusted. In [16], Ibraheem et al. developed a scheme for constructing positive surfaces via parameter control.
Interpolation is also an important tool in image magnification and visual processing. Image interpolation is an image processing technique that uses low resolution images (LR) to obtain high resolution images (HR). Nearest-neighbor interpolation, bilinear interpolation and bicubic interpolation are classic image interpolation algorithms. Bicubic interpolation was proposed by Keys in [17], and it shows an order of accuracy between that of linear interpolation and that of cubic spline. An algorithm for image enlargement and reduction with arbitrary accuracy using the scaling function of B-spline wavelet was offered by Yang et al. in [18]. An algorithm of image smooth interpolation using cubic B-spline was proposed by Hou et al. in [19], which can perfectly implement image enlargement, reduction and noise smoothing. In recent years, many new image interpolation algorithms have been proposed. In [20], Takeda et al. applied kernel regression to image interpolation and reconstruction. This algorithm is ideal for processing noisy images and sampling irregular images. In [21], Li et al. showed a novel edge-orientation adaptive interpolation scheme. Their idea is to use the geometric duality of LR and HR covariance coefficients for image interpolation. In [22], Zhang et al. applied the fractal analysis method to the field of image magnification, and proposed a novel singleimage super-resolution procedure based upon the rational fractal interpolation. In [23], Hussain et al. used a class of quadratic triangle B-spline with control parameters to implement image interpolation, and creatively applied genetic algorithms to optimize the selection of parameters, so as to obtain better quality interpolation images.
The purpose of this paper is to propose the improved first class of Side-Side (FCSS), second class of Side-Side (SCSS), first class of Side-Vertex (FCSV) and second class of Side-Vertex (SCSV) interpolation operators using a new class of rational quadratic/linear trigonometric Hermite functions. We use these methods to construct Coons surface patches and implement C 1 surface stitching. Based on the property that the surface shape can be adjusted through parameters, we introduce a center of mass function value control method, by which we can construct surface patches with the center of mass passing through a fixed point. Finally, we apply these proposed interpolation methods to image interpolation for upscaling the images with factor 2,3 and 4, and make comparisons between our methods and some existing image interpolation methods.
The rest of this paper is organized as follows. The definition and properties of a new class of rational quadratic/linear trigonometric Hermite functions are described in Section 2. In Section 3, we discuss the four improved interpolation operators: FCSS, SCSS, FCSV and SCSV. The constructed Coons surface patches and stitched surfaces are showed in Section 4. Section 5 shows a center of mass function value control method. In Section 6, four interpolation methods are applied to image interpolation. Section 7 summarizes our work.
It is easy to check that T 0 (u)+T 1 (u) � 1. And the trigonometric Hermite functions T i (u)(i = 0, 1, 2, 3) have the following important end-point properties

3.The improved Side-Side methods and Side-Vertex methods
Over triangular domain, we use transfinite interpolant to construct Coons surface patches. In order to facilitate the discussion over triangular domain, we first need to convert the Cartesian coordinates to the barycentric coordinates.

Barycentric coordinates
Let the non-degenerate triangle be T, and its vertices be V i (x i , y i )(i = 1, 2, 3) counterclockwise (see Fig 1). @T represents the boundary of T. The vectors of three boundaries are marked as A is the area of T, and A i is the area of ΔPV j V k . F represents the continuous function on T.
The conversion relationship between the Cartesian coordinates (x, y) and the barycentric coordinates (b 1 , b 2 , b 3 ) is as follows

The First Class of Side-Side (FCSS) interpolation operations
The classic Side-Side method, proposed by Barnhill, Birkhoff and Gordon [4], is also called the parallel projection method. Each interpolation operator P i [F] represents the linear Now we make an improvement to the first class of Side-Side interpolation operators. The Hermite functions in the operators are replaced by the new class of rational quadratic/linear trigonometric Hermite functions given in Eq (1), and the first class of Side-Side (FCSS for short) interpolation operators P i [F](i = 1, 2, 3) are defined as follows where

PLOS ONE
and @F @e 1 ðxÞ is the partial derivative of F along the direction of e 1 at point x. where and @F @e 2 ðxÞ is the partial derivative of F along the direction of e 2 at point x. where and @F @e 3 ðxÞ is the partial derivative of F along the direction of e 3 at point x.

The second class of Side-Side (SCSS) interpolation operations
The second class of Side-Side interpolation operators also can be obtained by replacing the Hermite functions with two trigonometric Hermite functions T 1 (u) and T 3 (u) given in Eq (1), respectively. And the second class of Side-Side (SCSS for short) interpolation operators P i [F] (i = 1, 2, 3) are defined as follows where the definitions of M i ,N i , @F @e i ði ¼ 1; 2; 3Þ are the same as (2), (3), and (4).

The First Class of Side-Vertex (FCSV) interpolation operations
The Side-Vertex method proposed by Nielson [7] is also called the radial projection method. Each operator represents the interpolation along line joining a vertex and its opposing side. The principle of Side-Vertex method is shown in Fig 3. Set S i as the point on the boundary corresponding to vertex V i , and the coordinates of S i is We also make an improvement to the first class of Side-Vertex interpolation operators. The Hermite functions are replaced by the trigonometric Hermite functions given in Eq (1), and the first class of Side-Vertex (FCSV for short) interpolation operators Q i [F](i = 1, 2, 3) are showed as follows

The second class of Side-Vertex (SCSV) interpolation operations
By using the new trigonometric Hermite functions T 1 (u) and T 3 (u) given in Eq (1), the second class of Side-Vertex (SCSV for short) interpolation operators Q i [F](i = 1, 2, 3) are defined as follows where the definitions of R 0 i ð1Þ; R 0 i ð0Þði ¼ 1; 2; 3Þ are the same as Eqs (9)-(11).

Given the FCSS and SCSS interpolation operators P i [F](i = 1, 2, 3), the Coons surface patch is defined by the Boolean sum of three operators
where Theorem 1. The weight function ω i (i = 1, 2, 3) given in Eq (16) has the following properties: Proof of Theorem 1. Through simple calculations, we have 3. Taking i = 1 as an example. Since in Barycentric coordinates, From this together with b 1 = 0 on the side e 1 , it follows immediately that @o 1 @ẽ j j e 1 ¼ 0. The proofs for @o 2 @ẽ j j e 2 ¼ 0 and @o 3 @ẽ j j e 3 ¼ 0 are similar. Theorem 2. Let F(x, y) 2 C 1 (T), when (x, y) 2 @T, P[F] will interpolate F(x, y) and its firstorder partial derivatives, so P[F] 2 C 1 (T).
Proof of Theorem 2. The following proof is based on the FCSS interpolation operators over triangular domain T. For b i = 0 and b j = 1 − b k on the side e i , i = 1, 2, 3; j = 2, 3, 1; k = 3, 1, 2, the Boolean sum of three interpolation operators is According to the geometric principle of Side-Side method shown in Fig 2, We find that M j and N k are points on the same boundary, thus Therefore, we have proved the following properties Next, we prove that P[F] interpolates the first derivative values of the triangle boundaries. Taking i = 1 as an example, according to Theorem 1 (3), we have thus, we prove that @P½F� @ẽ j j e 1 ¼ @FðS 1 Þ @ẽ j : Similarly, both on the side e 2 and e 3 of T, we can verify that The proof of the SCSS interpolation operators is analogy to the FCSS interpolation operators. Therefore, we have verified that P[F] interpolates F(x, y) and its first-order partial derivatives of the triangle boundaries, which means that P[F] 2 C 1 (T).
Both FCSS and SCSS interpolation operators contain two shape parameters α and β. Through adjusting the values of two shape parameters, we can obtain Coons surfaces of different shapes. Comparing to the classic Side-Side interpolation operators based on cubic Hermite basis functions, which construct the surface patches with fixed shape, both FCSS and SCSS interpolation operators show advantages in shape adjustment. Besides, Theorem 2 illustrates that no matter how the Coons surface is adjusted, function values and first-order partial derivatives of the triangle boundaries are always interpolated.
Proof of Theorem 3. The proof of Theorem 3 is analogy to Theorem 1.

Theorem 4. Let F(x, y) 2 C 1 (T), when (x, y) 2 @T, Q[F] will interpolate F(x, y) and its firstorder partial derivatives, so Q[F] 2 C 1 (T).
Proof of Theorem 4. The proof of Theorem 4 is analogy to Theorem 2. The basis functions of two improved Side-Vertex methods also have shape parameters α and β analogous to the improved Side-Side methods, so we can adjust the shape by simply altering the parameter values, while the Coons surface patches still keep the interpolation property the same. Comparing to Nielson's Side-Vertex method which is only suitable to construct fixed shape surfaces, the improved Side-Vertex methods have advantages.

Approximation precision of the improved Side-Side methods and Side-Vertex methods
In order to demonstrate that the improved four interpolation methods have good approximation precision, we perform the following experiments. Given a test surface F(x, y), we first sample the boundary data, then apply the four improved interpolation methods to reconstruct interpolation surfaces and calculate the approximation accuracy of these restructured surfaces. We will also compare the approximation accuracy of the improved methods with the classic where (x, y) 2 T with V 1 (0, 0), V 2 (1, 0), V 3 (0, 1).    Comparing the results of different interpolation methods in Table 1, regardless any shape of the test surface, the RMS errors of the improved Side-Side methods and Side-Vertex methods are less than the classic Side-Side method and Nielson's Side-Vertex method, and less than 6 percent of the range of the function values. These results demonstrate that the four improved interpolation methods have higher approximation accuracy, and are more competitive than the classic Side-Side method and Nielson's Side-Vertex method.

5.Center of mass function value control method
In practical applications, the center of mass over triangular domain is more important than other points for shape control. Since we can use shape parameters α, β to adjust the surface, we expect the control of the center of mass can also be achieved through parameters. The method introduced below can solve this issue perfectly.
If we require that the function value of the interpolation surface at the center of mass is equal to M, where M 2 f min 1�i�3 FðV i Þ; max 1�i�3 FðV i Þg, we only need the shape parameters to satisfy: For convenience, we use a new variable k to represent the shape parameters α, β, where k ¼ a b . The center of mass coordinates of the triangle is known to be 1 3 ; 1 3 ; 1 3 À � . By substituting the shape parameter ratio k and the coordinates into (19) and making a simplification, we can derive the following equations about k. For FCSS, the equation of k is For SCSS, the equation of k is For FCSV, the equation of k is  For SCSV, the equation of k is By solving the above simple first or quadratic equation, the shape parameter ratio k of FCSS, SCSS, FCSV or SCSV can be obtained.
Set three vertices of the triangle as V 1 (0, 0), V 2 (1, 0), V 3 (0, 1), and the value of center of mass as M. The boundaries of the surface patch are constructed by function gðx; yÞ ¼ 5:2exp À x 2 À ðyÀ 0:5Þ 2 We use these four methods to construct Coons surface patches respectively. The given values M and the calculated shape parameter ratios are shown in Table 2. Fig 9 shows the improved Side-Side methods and Side-Vertex methods Coons surface patches with the corresponding M displayed in Table 2.

6.Apply four new interpolation operators to image interpolation
In this section, we apply four new constructed FCSS, SCSS, FCSV and SCSV interpolation operators to image interpolation and achieve image magnification. The proposed methods are tested with six different standard images, which are gray scale and named as 'Airplane', 'Baboon', 'Flower', 'Peppers', 'Rail' (kodim19) and 'Truck' respectively. They are obtained from SIPI image database, University of Southern California [24] and the classic Kodak test image data set (http://r0k.us/graphics/kodak/). Besides, these methods will be compared with some classic schemes: bilinear interpolation, bicubic interpolation, kernel regression (KR) [20], new edge-directed interpolation (NEDI) [21], cubic trigonometric B-spline image interpolation scheme (CTB) [25] and rational cubic B-spline image interpolation scheme (RBC) [26]. The following algorithm illustrates the steps to implement image interpolation using the methods of this paper. Algorithm 1. Input. Standard test image, parameters α and β. Output. Upscaling image, PSNR value and SSIM value.
Step 1. Convert the input image to a gray matrix G. The elements g ij (i = 1, 2, . . .m, j = 1, 2, . . ., n) of matrix G represent the pixel values of corresponding pixel points in the i row and j column of the image.
Step 2. Down-sample the original image to obtain low-resolution image. Depending on whether the required interpolation factor is 2, 3 or 3, the pixel matrix of low resolution image is obtained by down-sampling the original image with interpolation factor 1/2 (sample one pixel every two pixels), 1/3 (sample one pixel every three pixels) or 1/4 (sample one pixel every four pixels). The grayscale matrix corresponding to the low resolution image is recorded as G d .

PLOS ONE
Step 3. Use FCSS, SCSS, FCSV and SCSV for fragment interpolation. Subdivide the pixel matrix G d into small pixel matrices. Each small pixel matrix is 2 × 2, and stores the pixel values of a rectangular region in the down-sampled image. We divide the rectangular region into two triangle regions by triangulation and perform transfinite interpolation on each triangle patch. In order to implement the interpolation scheme, an approximation is made that the boundary values are considered as piecewise linear. After transfinite interpolation is done on all small matrices, we get the high resolution image. The gray matrix calculated by the interpolation method is recorded as � G ¼ � g ij ði ¼ 1; 2; . . . m; j ¼ 1; 2; . . . ; nÞ.
Step 4. Results analysis. Compare the results of our four interpolation methods against some existing methods by analyzing the visual quality and calculating the values of Peak Signal to Noise Ratio (PSNR) and Structural Similarity Index (SSIM). PSNR is defined as where MSE is the mean square error defined as MSE ¼ 1 SSIM is defined as where μ 1 is the mean of g ij . μ 2 is the mean of � g ij . s 1 2 is the variance of g ij . s 2 2 is the variance of � g ij . σ 12 is the covariance of g ij and � g ij . c 1 = (k 1 L) 2 , c 2 = (k 2 L) 2 are the constant used to maintain stability. L is the dynamic range of the pixel values. Generally k 1 = 0.01, k 2 = 0.03. Higher PSNR and SSIM mean better image quality.
When the image interpolation is performed by FCSS, SCSS, FCSV and SCSV, different interpolation results can be obtained by altering the values of parameters α and β, and interpolated images will have different qualities. However, based on Theorems 2 and 4, for the boundary values do not change with the shape parameters, the adjustment of the shape by parameters is limited to a reasonable range, which means that the adjusted image always maintains a high degree of fit with the original image, and a fine adjustment will result in a high quality image. We perform experiments on image enlargement with interpolation factors 2, 3 and 4, respectively. In the experiment of image magnification with interpolation factor 2, we compare our four methods with bilinear interpolation, bicubic interpolation, KR, NEDI, and CTB. Table 3 lists the values of parameters α, β used in all experiments. Tables 4 and 5 list the PSNR and SSIM values for each image interpolation scheme with interpolation factor 2. PSNR and SSIM data for KR and NEDI are referenced from [27].
In terms of the data shown in Tables 4 and 5, the PSNR values of our four methods are the highest among all image interpolation schemes. In general, the PSNR values of our interpolation methods have pleasing results, that is, the error between corresponding pixels is small. The SSIM values of our methods are better than bilinear interpolation, bicubic interpolation and CTB. Although our methods are not as good as KR and NEDI in terms of SSIM, we can

PLOS ONE
see the average SSIM values of our methods differ from KR by less than 0.05, and differ from NEDI by less than 0.08. Therefore, our methods still give pleasing results overall. The image obtained by bicubic interpolation is obviously better than bilinear interpolation, and bicubic interpolation works well in maintaining edges. But comparing the texture direction in Fig 11a and 11c, we find that bicubic interpolation fails in preserving the texture direction. In terms of CTB, it has made a breakthrough in keeping the edges of the image. But looking at Fig 10d, we find that the reconstruction of the texture regions is still not perfect. The four methods we proposed overcome the problem of jagged edges to a certain extent. It can also be seen from Fig 10e-10h that these four improved interpolation methods preserve the texture direction and reproduce the texture details.
Furthermore, we also use FCSS, SCSS, FCSV and SCSV to upscale images with interpolation factor 3 and 4, and compare with NEDI and RBC. The standard test images are 'Peppers', 'Airplane' and 'Flower'. In order to fully evaluate the quality of high resolution images, in addition to PSNR and SSIM, we have also added two image quality assessment metrics, which are MS-SSIM [28] and FSIM [29]. Similarly, the higher values of MS-SSIM and FSIM indicate the better quality of upscaling images. The PSNR, SSIM, MS-SSIM, FSIM results of NEDI and RBC are referenced from [26]. Tables 6-9 show PSNR, SSIM, MS-SSIM, and FSIM values of different image interpolation methods. For Tables 6-8, it can be noted that the PSNR, SSIM, and MS-SSIM of our four image interpolation methods are the highest. In Table 9, the FSIM of our method is higher than NEDI and slightly lower than RBC. Figs 12 and 13 show the upscaling images of 'Peppers', and 'Flower', which are produced by our image interpolation methods with interpolation factor 4. Comparing the visual quality of two standard test images, when the interpolation factor increases, our methods are prone to jagged edges, see Fig 12. Therefore, in terms of processing the images with long edges, our

PLOS ONE
methods are not as good as RBC. But for the images containing texture regions, our methods have advantages, see Fig 13. This result is also reflected in Table 9. For pepper and airplane images, the FSIM values of our methods are lower than RBC. But the difference between the FSIM value of each of our method and RBC is significantly smaller, and even the results of our methods are better.

7.Conclusions
In order to overcome the shape defect of the classic Side-Side method and Nielson's Side-Vertex method, this paper proposes a new class of rational quadratic/linear trigonometric Hermite functions with two shape parameters. Applying them we obtain the new improved first class of Side-Side (FCSS), second class of Side-Side (SCSS), first class of Side-Vertex (FCSV) and

PLOS ONE
second class of Side-Vertex (SCSV) interpolation operators. These improved interpolation methods can be used to construct Coons surface patches and stitch surfaces that meet the following properties: 1. The shape of the Coons surface patch can be flexibly adjusted by altering the values of shape parameters.
2. Always maintain interpolating boundary values and partial derivatives.
For the properties that we can adjust the shape of the surface patches using the shape parameters, a center of mass function value control method is proposed. When constructing a triangular patch that requires the center of mass passing through a fixed point, the corresponding parameter values can be calculated by this method. Moreover, FCSS, SCSS, FCSV and SCSV are applied to image interpolation. By adjusting the parameter values, it is possible to obtain images with better quality. The reason is that the Coons surface patches constructed by these proposed methods always satisfy the interpolation of boundary values and partial derivatives. Therefore, these methods ensure that the adjustment of the surface shape is limited to a reasonable range without destroying some of the properties required by the original image. Future work will concentrate on constructing C 2 Coons surfaces over triangular domain with shape parameters.