We compare a recently proposed multivariate spline based on mixed partial derivatives with two other standard splines for the scattered data smoothing problem. The splines are defined as the minimiser of a penalised least squares functional. The penalties are based on partial differential operators, and are integrated using the finite element method. We compare three methods to two problems: to remove the mixture of Gaussian and impulsive noise from an image, and to recover a continuous function from a set of noisy observations.
We begin by outlining the scattered data problem. Consider the set of scattered points in a domain with , and the set of noisy observations at those points . We want to reconstruct an unknown function u to approximate the given data. Assuming that the underlying data set is corrupted with Gaussian noise, we can assume that the unknown function u satisfies
, where is a set of normally distributed random variables with mean 0 and variance .
To recover the unknown function u, we will use an approach based on the multivariate L-spline. That is, we will search for a function u that minimises the following least squares functional
over a Sobolev space V, where L is a partial differential operator, and λ is a positive smoothing parameter.
We use the standard notation for Sobolev spaces on Ω.1–3 We consider three different choices for L. The first choice is to take Lu as the gradient of u. Then we need to have . However, the continuous problem is not well-posed with this choice for , because the point value of a function is not defined in when . The second choice is to choose Lu as the Laplacian of u. Then we need to have . Again, the continuous problem is not well-posed for d > 3, because the point value of a function is not defined in when d > 3. The third choice is to include mixed partial derivatives of u on the gradient penalty to construct Lu.4 Unlike the other two choices, the resulting spline is well defined for any dimension .
This is the first time that computational results of the newly proposed multivariate spline4 are presented and compared with other existing techniques. Moreover, we observe the instability of the gradient penalty approach in our numerical experiments, which is another novelty of this contribution.
We will apply these methods to two problems. The first problem is to recover an image that have been corrupted with both Gaussian and impulsive noise. We apply a finite element method to compute the solution of the above minimisation problem. Finite element methods have recently become popular in different areas of image processing.5–9 Finite element methods are applied in Lamichhane10 and Lamichhane11 to remove the mixture of Gaussian and impulsive noise using the gradient penalty and total variation penalty, respectively.
The second problem is to recover a continuous function from a set of noisy observations. We consider observations that have been corrupted with Gaussian noise. In this example, we see spurious spikes in the solution using the gradient penalty. This is due to the fact that the gradient penalty does not control the point-wise values of the function. Numerical results show that we can increase the mesh-size to reduce the height of the spikes but they cannot be totally removed.
This paper is organised as follows. In the next section, we present the gradient penalty smoothing technique. In the third section, we present the smoothing technique based on the minimisation of a functional involving mixed partial derivatives. In the fourth section, we compare the three finite element methods in denoising images and recovering continuous functions. We discuss these results in the last section.
Multivariate spline with gradient penalty
The multivariate spline with the gradient penalty is given by the following minimisation problem
Due to the choice of the minimisation functional it is natural to take , for which the problem will not be well-posed when d > 1.
Now we consider a finite element discretisation of the spline. Let be the space of continuous functions in Ω and a finite element triangulation of Ω. Note that is the set of triangles or rectangles. Then let
be a finite element space, where P(T) is the linear polynomial space if T is a triangle, and P(T) is the bilinear polynomial space on T if T is a rectangle.12 The minimisation problem leads to the variational problem of finding such that
where the bilinear form and the linear form are given by
It is easy to show that the above problem has a unique solution under the assumption that the set of scattered points is non-empty.10
Since is positive definite, we can define the energy on V as
for all
The following lemma shows that the discrete multivariate spline with the gradient penalty is well-posed for d = 1 but not well-posed for d > 1. The point-value of a function is not controlled by the gradient of the function when d > 1. The well-posedness is exhibited in the stability result first proved in Garcke and Hegland.13 For completeness we have given these results in Lemmas 1, 2 and 3, which are taken from Garcke and Hegland.13
Lemma 1.(Discrete Sobolev inequality). There exists constantsuch that for all
for d = 1.
for d = 2.
for d > 2.
The constant cd is independent of the mesh-size h but depends on d. These bounds are tight, and for d > 2 we have that
Lemma 2.(Discrete Poincaré inequality). Letandfor. Then there exist constantssuch that
for d = 1
for d = 2
for d > 2.
Lemma 3.(Discrete V-ellipticity). There exist constants cd and Cd such that the energy norm on Vh satisfies
for all, whereandare given by
andfor d = 1
andfor d = 2
andfor d > 2.
The above results imply that for the solution of the spline with the gradient penalty we have
where is the L2-norm of the linear functional .
Remark 4.We can see that the ill-posedness is exhibited in the stability constant being not independent of the mesh-size h. There is no easy way to remove this dependency.
Multivariate spline with Laplacian penalty
The multivariate spline with the Laplacian penalty is the solution of the following minimisation problem
where . The minimisation problem is well-posed for since when . More details of this spline can be found in Ramsay.14 This spline will be called Laplacian spline in the following.
Remark 5.The Laplacian penalty imposes higher smoothness in the solution. Since we look for a solution, whose second derivatives are square integrable, point-values of the solution are well-defined in contrast to the gradient penalty spline. However, a finite element approximation of the Laplacian spline is more expensive than the gradient penalty spline.
While we can use a direct finite element approximation using a low order finite element space Vh to approximate the gradient penalty spline, we cannot directly use this space to approximate the Laplacian spline as for is not well-defined. We use a mixed finite element method proposed by Lamichhane.15 We first introduce a new variable in the minimisation formulation (3) and then write a weak equation as
Now choosing and , we have a well-defined formulation for which we can use the space Vh to discretise u and μ, whereas we use a discontinuous piecewise polynomial space Wh to discretise . The basis functions of Wh and Vh satisfy a biorthogonality relationship15 so that the associated matrix corresponding to the L2-inner product in (4) is diagonal. In this way, we arrive at a very efficient finite element method to approximate the solution of the minimisation problem (3). The discrete problem is then to compute
subject to the constraint
Since when d > 1, the gradient penalty spline formulation does not provide a well-posed problem. The problem is well-posed only in one dimension. Similarly, for but when d > 3. This motivates us to find a well-posed spline formulation for any , which is given in the next section.
New multivariate spline with mixed derivative penalty
In order to define the new multivariate spline, we define the associated Sobolev space. Let , where is a zero vector. We use a standard multi-index notation with so that a mixed derivative of a sufficiently smooth function u is denoted by
where we use the usual Cartesian coordinate system with .
We now define our Sobolev space for the multivariate spline problem as
which is equipped with the norm
and the semi-norm
The semi-norm for d = 2 is simply
where is the Euclidean norm of the vector .
We note that the space is a Hilbert space, and .16 The new multivariate spline is then obtained as a solution of the minimisation problem
The associated inner-product for the semi-norm on -space for d = 2 is
We can define a bilinear form and a linear form as
where
is a column vector of the function values of u at the scattered points , and is a column vector with ith component zi. Then the multivariate spline problem is to find such that
for all .
Let Ω be a rectangle in and the tensor product partition of the domain with mesh size h, such that each element is a rectangle. Then we define a finite element space Vh as
where is the space of bilinear polynomials on T. We can now write our discrete multivariate spline problem as
That is, the discrete problem is to find such that
for all .
The discrete problem is shown to be well-posed in Lamichhane.11 Here we recall some of the important results. We first show that the bilinear form is positive definite on Vh.
Lemma 6.Letand let the set of scattered pointsbe non-empty. Then the bilinear formis positive definite on the vector space Vh.
Proof. If uh = 0, then clearly . Conversely, let . Then
Since uh is a continuous function, gives that u is a constant function in Ω. Further, since is non-empty and Puh = 0, we have that uh = 0.
Since is positive definite, we can define the energy norm on Vh as
for all . Since and satisfy the conditions of the Lax-Milgram lemma,2,3 the unique minimiser is the solution of the discrete problem (7). In addition, the following holds.
Lemma 7.Letand letbe non-empty. Then the discrete problem (7) admits a unique solution which depends continuously on the data with respect to the energy norm.
Proof. We have that
for all . Hence and are continuous on Vh. We also have that
for all . Hence is coercive on Vh. By the Lax-Milgram lemma,2,3 there exists a unique solution uh of the discrete problem 7. Additionally, the solution depends continuously on the data z.
In addition, a direct application of the Céa lemma provides an optimal a priori estimate of the discrete solution.
Lemma 8.Let u be the solution to the continuous problem (6), and let uh be the solution to the discrete problem (7). Then
Each finite element basis function is associated with a point in the tensor product partition . Assuming there are mn points, we have mn basis functions. Let be the set of finite element basis functions, which span Vh. Then we can write our solution as a linear combination of these basis functions, namely
Let and let K be the finite element stiffness matrix, where . Let M be a mixed partial derivative matrix, where . Then the finite element problem leads to the linear system
where A is a matrix of size N × mn, with entries .
Computation of K and M
We will use a reference element to construct the matrices K and M. For rectangles, we choose our reference element to be the square with vertices and (0, 1). We then construct local basis functions at these vertices. These are
Now consider the rectangular element T with vertices and (x1, y2). We construct global basis functions at these vertices. When restricted to the element, these are given by
Let be the bijective map from the reference element to T. This mapping is given by
Let the matrix in this transformation be denoted BT. We note that .
We will use the chain rule to calculate the derivatives. We have
where and .
Applying the chain rule again we obtain
Now, we’ll calculate K. Let be the local stiffness matrix associated with the element T. Then
Now
Similarly
Hence we have
We then assemble each KT into the global stiffness matrix, by relating the local nodal numbering to the global numbering. Let the global numbering of the vertices of T be . Then the local matrix KT will be stored in the submatrix of the global matrix K. (Note here that the submatrix is formed by keeping the ith, jth, kth and th rows and columns of the matrix K.) The global matrix is obtained by adding all the contributions from the local matrices.
We now calculate the mixed partial derivative matrix M. Let be the local matrix associated with the element T. Then
Hence we have
We then assemble each MT into the global matrix M in the same way that the stiffness matrix was assembled.
Numerical results
Real life images
We would like to recover some real life images. Consider an image of size m × n. Then we define a tensor product partition of the square using the collection of points , and . Then each pixel of the image is associated with a grid point in .
Since we know the images before they have noise applied to them, we will use peak signal-to-noise ratio (PSNR) to compare the results. Let the original image be given by I, and the recovered image be given by . Then the PSNR is given by
where is the maximum pixel value of the image, and MSE is the mean square error. We note that MSE is given by
We now consider two test images. These images are the Lena image and Baboon image (see Figure 1). We will apply both Gaussian and impulsive noise to these images. The Gaussian noise has zero mean and variances 0.05 and 0.1, and the salt and pepper noise has densities from 30% through to 80%.
Lena image (a) and Baboon image (b).
We will now use the three different splines to reconstruct the images. As an example, we will first consider the images corrupted with Gaussian noise with variance 0.05, and impulsive noise of density 60%. In the first image of Figure 2, we show the noisy Lena image. The next three images show the reconstructed images obtained by the three splines. The results for the Baboon image are shown in Figure 3.
Noisy Lena image (, 60% salt and pepper noise density) (a), recovered image using gradient penalty spline (b), recovered image using mixed derivative spline (c), recovered image using Laplacian spline (d).
Noisy Baboon image (, 60% salt and pepper noise density) (a), recovered image using gradient penalty spline (b), recovered image using mixed derivative spline (c), recovered image using Laplacian spline (d).
We will now show the PSNR for the reconstructed images in Tables 1to 4.
Lena image PSNR for Gaussian (variance 0.05) and different impulsive noise densities.
Lena image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
22.13
22.01
22.22
21.90
21.42
20.91
Mixed
22.29
22.28
22.42
21.93
21.59
20.80
Biharm.
22.98
22.95
22.30
22.09
21.74
21.48
Baboon image PSNR for Gaussian (variance 0.05) and different impulsive noise densities.
Baboon image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
19.14
19.09
18.81
18.48
18.47
18.37
Mixed
19.14
19.08
18.74
18.48
18.35
18.32
Biharm.
18.89
18.71
18.47
18.12
17.84
17.83
Lena image PSNR for Gaussian (variance 0.1) and different impulsive noise densities.
Lena image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
21.45
21.40
20.81
20.34
20.21
19.82
Mixed
21.77
21.69
20.80
20.44
20.21
19.85
Biharm.
22.20
22.09
21.56
21.10
20.48
20.14
Baboon image PSNR for Gaussian (variance 0.1) and different impulsive noise densities.
Baboon image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
18.24
18.20
17.93
18.09
17.89
17.65
Mixed
18.18
18.17
17.89
18.06
17.86
17.56
Biharm.
18.06
17.85
17.66
17.54
17.40
17.06
Note that we have chosen our parameter λ using generalised cross validation17 and the stochastic trace estimator proposed by Hutchinson.18 We note that this gives a good estimate of the optimal parameter. In Figure 4 we have plotted the PSNR and the generalised cross validation function versus λ. Note that the validation function has been scaled for visualisation purposes. For both plots, the Lena image has been corrupted with Gaussian noise with variance 0.05, and has been recovered with the mixed derivative spline. In the left plot, the image has been corrupted with impulsive noise of density 30% while in the right plot the density is 40%.
Generalised cross validation function and PSNR versus λ for Gaussian noise with variance 0.05 and impulsive noise with densities 30% (a) and 40% (b).
Binary image
We will now apply the same methods to a binary test image (see Figure 5). As an example, consider the image is corrupted with Gaussian noise of variance 0.05, and impulsive noise of density 60%. We show the noisy image and the reconstructed images in Figure 6.
Binary image.
Noisy binary image (, 60% salt and pepper noise density) (a), recovered image using gradient penalty spline (b), recovered image using mixed derivative spline (c), recovered image using Laplacian spline (d).
We will now show the PSNR for the reconstructed image in Tables 5 and 6.
Binary image PSNR for Gaussian (variance 0.05) and different impulsive noise densities.
Binary image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
14.77
14.66
14.37
14.19
13.77
13.47
Mixed
15.37
15.21
15.03
14.84
14.43
14.00
Biharm.
15.17
14.93
14.86
14.49
14.39
13.72
Binary image PSNR for Gaussian (variance 0.1) and different impulsive noise densities.
Binary image PSNR
Noise density
30%
40%
50%
60%
70%
80%
Grad.
13.24
13.05
13.01
12.61
12.49
12.20
Mixed
13.58
13.38
13.27
13.03
12.86
12.50
Biharm.
13.36
13.10
12.23
12.88
12.89
12.56
Continuous functions
We would now like to recover continuous functions. We define a tensor product partition of the square using the set of points
We sample the function value at each point in the partition, and then apply Gaussian noise of variance 0.05. We then refine the partition several times, which halves the mesh size h in each iteration. We will now consider the first test function. Let the function f be given by over the domain (see Figure 7).
restricted to (a), function recovered using gradient penalty spline (b), function recovered using mixed derivative spline (c), function recovered using Laplacian spline (d).
We compare the PSNR values for the recovered function and the original function for different steps of refinement in Table 7, where the refinement step is given by the step-size h.
PSNR for f using different penalty terms.
i
h
Grad.
Mixed
Bihar.
0
2/19
19.85
24.31
25.54
1
1/19
20.01
24.48
26.44
2
1/38
19.59
24.61
26.61
3
1/76
19.16
24.67
26.69
4
1/152
18.51
24.70
26.72
5
1/304
17.95
24.71
26.73
We can see that PSNR values do not increase or decrease for the spline with the mixed derivative penalty and the spline with the Laplacian penalty, whereas the PSNR values decrease for the spline with the gradient penalty. This is due to the fact that the stability constant depends on the mesh-size h for the spline with the gradient penalty.
We show the functions recovered after the fifth iteration in Figure 7. We can see that gradient penalty spline produces a recovered function that overfits the noisy data. On the other hand, both the mixed derivative and the Laplacian splines produce smoother recovered functions.
We want to see the effect of the mesh-size on the spurious spikes of the recovered function. In Figure 8, we show the functions recovered using the gradient penalty spline using the coarser mesh-sizes h = 2/19 and h = 1/19. These pictures show that the spurious spikes are still present although the spikes are slightly smaller in the coarser mesh results.
Function recovered using gradient penalty spline with h = 2/19 (a), function recovered using gradient penalty spline with h = 1/19 (b).
We will now provide a second test function. Let the function g be given by over the domain (see Figure 9). We have tabulated the PSNR values for different splines at different levels of refinement in Table 8. The results are similar to the first example but the spurious spikes of the recovered function using the gradient penalty formulation have not affected the PSNR values much in this example.
restricted to (a), function recovered using gradient penalty spline (b), function recovered using mixed derivative spline (c), function recovered using Laplacian spline (d).
PSNR for g using different penalty terms.
i
h
Grad.
Mixed
Biharm.
0
2/19
19.49
21.24
22.19
1
1/19
19.01
21.17
22.29
2
1/38
18.76
21.15
22.33
3
1/76
18.33
21.13
22.31
4
1/152
18.16
21.12
22.30
5
1/304
18.82
21.11
22.29
We show the functions recovered after the fifth iteration in Figure 9. Again, we see that the gradient penalty spline overfits the data.
Discussion
We compared three different bivariate L-spline approaches for removing the mixture of Gaussian and impulsive noise from images. We found that for the Lena image, the Laplacian penalty produced recovered images with the best PSNR. However, we found that the Laplacian penalty performed the worst when recovering the Baboon image. The gradient and mixed derivative penalties performed very similarly to each other when recovering the two real life images. For the Binary image, we found that the mixed derivative penalty performed the best, followed by the Laplacian penalty and then the gradient penalty.
We then applied the same approaches to recover two continuous functions from a set of noisy observations. We found that for both functions, the Laplacian penalty produced the best recovered functions, closely followed by the mixed derivative penalty. The gradient penalty produced recovered functions that overfitted the data.
The overfitting occurred because the gradient penalty formulation is not well-posed in the continuous setting. For dimensions , we have that (by the Sobolev embedding theorem). This ill-posedness exhibits itself when the mesh size goes to zero.19 The other formulations, however, are well-posed in the continuous setting. This is because for any dimension d,16 and for dimensions .
Overall, the gradient penalty was the simplest spline to implement and the most computationally efficient. However, as this is not well-posed for d > 1, it often produces spurious results. The computational cost of the spline with the mixed derivative penalty is very close to the gradient penalty and this is well-posed for all dimensions.11 The Laplacian penalty was the least simple to implement, and was the least computationally efficient. Moreover, the spline with the Laplacian penalty is also not well-posed when d > 3. Therefore, we find that the spline with the mixed derivative penalty is the best choice among the presented three splines.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
ORCID iD
Bishnu P Lamichhane
References
1.
AdamsR.Sobolev spaces.
New York:
Academic Press, 1975.
2.
BrennerSScottL.The mathematical theory of finite element methods.
New York:
Springer–Verlag, 1994.
3.
CiarletP.The finite element method for elliptic problems. North Holland, Amsterdam, 1978.
4.
LamichhaneBRobertsSHeglandM.A new multivariate spline based on mixed partial derivatives and its finite element approximation. Appl Math Lett2014;
35: 82–85.
5.
PreußerTRumpfM.An adaptive finite element method for large scale image processing. J Visual Commun Image Represent2000;
11: 183–195.
6.
FerrantMNabaviAMacqB, et al.
Registration of 3-d intraoperative MR images of the brain using a finite-element biomechanical model. IEEE Trans Med Imaging2001;
20: 1384–1397.
7.
BesdokE.Impulsive noise suppression from images by using Anfis interpolant and Lillietest. EURASIP J Appl Signal Process2004; 2423–2433.
8.
WangZQiFZhouF.2006. A discontinuous finite element method for image denoising. In: Image analysis and recognition, lecture notes in computer science. Vol. 4141. Berlin/Heidelberg: Springer, pp. 116–125.
9.
DemaretLIskeA.Adaptive image approximation by linear splines over locally optimal Delaunay triangulations. IEEE Signal Process Lett2006;
13: 281–284.
10.
LamichhaneB.Finite element techniques for removing the mixture of Gaussian and impulsive noise. IEEE Trans Signal Process2009;
57: 2538–2547.
11.
LamichhaneBP.Removing a mixture of Gaussian and impulsive noise using the total variation functional and split Bregman iterative method. In: Sharples J and Bunder J (eds) Proceedings of the 17th biennial computational techniques and applications conference, CTAC-2014, ANZIAM J, vol.
56, 2015, pp. C52–C67, http://journal.austms.org.au/ojs/index.php/ANZIAMJ/article/view/9316 (accessed 27 October 2015).
12.
QuarteroniAValliA.Numerical approximation of partial differential equations.
Berlin:
Springer–Verlag, 1994.
13.
GarckeJHeglandM.Fitting multidimensional data using gradient penalties and the sparse grid combination technique. Computing2009;
84: 1–25.
14.
RamsayT.Spline smoothing over difficult regions. J R Stat Soc Series B2002;
64: 307–319.
15.
LamichhaneB.A mixed finite element method for the biharmonic problem using biorthogonal or quasi-biorthogonal systems. J Sci Comput2011;
46: 379–396.
16.
SchmeisserHJTriebelH.Topics in Fourier analysis and function spaces. 1st edition.
Chichester:
Wiley, 1987.
17.
WahbaG.Spline models for observational data. Series in applied mathematics. Vol.
59, 1st ed.Philadelphia:
SIAM, 1990.
18.
HutchinsonM.A stochastic estimator of the trace of the influence matrix for laplacian smoothing splines. Commun Statis Simul Comput1989;
18: 1059–1076.