Abstract
The usual threenode approximations for the firstorder spatial derivatives in the radial basis functionsbased finite difference (RBFFD) scheme allows relatively smaller time step size than the standard scheme (forward difference in time and central difference in space) in obtaining stable results. In this paper, to better mimic the continuous model, we use nine nodal points in RBF–FD approximation of firstorder spatial derivatives. We then employ these approximations to solve a twodimensional nonlinear diffusion equation from image processing. The constructed numerical scheme is shown to be stable and allows up to obtain four times bigger time step size than the standard scheme.
Introduction
The method of radial basis functions (RBF) is an important tool for the interpolation of multidimensional scattered data. Franke [7] has tested the performance of various basis functions (multiquadric, Gaussian and splines) for the interpolation of scattered data and concluded that the multiquadric (MQ) basis produces the most accurate results when compared with other basis functions. This observation led to development of accurate numerical schemes for the partial differential equations [2, 9, 13,14,15,16, 21].
In most of the existing works on RBFFDbased numerical schemes, the spatial derivatives have been approximated with values of the underlying function at grid points on one principal direction, for example, \(u_x\) has been approximated with values of u at grid points on the Xaxis. This enables the user to employ efficient algorithms for solving the resulting system of equations. However, these three nodebased schemes, in general, suffer from heavy numerical dissipation which hinders their application in image processing [5, 10, 20].
To address this issue, in this paper, an RBF–FDbased scheme is employed to obtain the \(3\times {3}\) stencil approximations for the firstorder spatial derivatives. These stencils have been used to approximate the spatial derivatives in the nonlinear parabolic partial differential equation, and the time derivative is discretized using the forward difference approximation.
Further, we analyze the stability of the proposed scheme and show that it is stable under some restriction on the time step size. This restriction (bound) on the time step size is a function of the grid size and shape parameter of the radial basis functions.
The rest of the paper is organized as follows. In Sect. 2, the RBF–FD scheme for solving unsteady partial differential equations is presented. In Sect. 3, the stability analysis of the proposed scheme for twodimensional linear diffusion equation is carried out. Finally, Sect. 4 constitutes the concluding remarks.
An RBF–FD Scheme for Unsteady Problems
Consider a wellposed linear unsteady partial differential equation:
where u is an unknown function, \(\mathbf x \in \mathbb {R}^{d}\), \(\mathscr {L}\) is a linear partial differential operator, and \(\dfrac{\partial {u}}{\partial {n}}\) is a directional derivative of u in the outward normal direction n. To solve this equation, we employ RBF–FD scheme [4, 21], which is briefly described as follows.
Let N be the total number of centers in the computational domain, and let
be the local support of the center \(\mathbf x _{i}\) having \(n_i\) neighboring centers. Then \(\mathscr {L}u(\mathbf{x _{i}})\) is expressed approximately as a linear combination of u values at \(n_{i}(<< N)\) centers of the local support \(\mathbf {C}_{i}\). Symbolically, this is given by
The weights, \(\mathbf c = \{c_j \}^{n_i}_{j = 1}\) in (4), are obtained by solving the linear system,
The elements of the submatrix \(\varXi\) are given by
Michelli [11] showed that the choice of multiquadric basis produces a nonsingular interpolation matrix (A) in Eq. (5). The last row in the matrix A is used to have the zero sum of the coefficients.
Now, the discretized form of Eq. (1), with the obtained weights \(c_j\), reads as
The accuracy of this approximation depends on the choice of the underlying basis functions.
In this work, the computations are carried out with multiquadric and Gaussian basis functions, which are defined as \(\phi (r) = \sqrt{1+\epsilon ^2 r^2}\) and \(\phi (r) = e^{\epsilon ^2 r^2}\), respectively. Here, r is the Euclidean distance between the center \(\mathbf x\) and \(\mathbf x _{i}\), and \(\epsilon\) is the (scaling) shape parameter of the basis function. It has been realized that this parameter plays an important role in the accuracy of the numerical solution [1, 2].
Note that throughout this article, we take uniform distribution of the nodes to compare our scheme with the finite difference method, which can be easily applied as the structure of the underlying nodal points (pixels) is uniform.
Diffusion Filters in Image Processing
Linear Diffusion Filter
In this section, we demonstrate the performance of finite difference and RBF–FD schemes for a twodimensional heat equation with an application in image processing.
Consider a partial differential equation of the form
with initial condition \(u_{0}(\mathbf x )=u(\mathbf x ,t=0)\) and homogeneous Neumann boundary condition: \(\dfrac{\partial {u}}{\partial {n}}=0\) on \(\partial {\varOmega }\). Here, we evolve the noisy image \(u(\mathbf x ,0)\) according to this PDE to remove noise from it. The diffusion coefficient D is a function of the edge detector \(\nabla {u}\) which aims to accelerate the diffusion process in the homogeneous regions and slows down the diffusion in the nonuniform regions [12]. A typical D which possesses the required characteristics is
where \(\lambda\) is a contrast parameter used to distinguish the important features and the noise. We analyze the stability of multiquadricbased RBFFD, hereinafter abbreviated as MQ, and Gaussianbased RBF–FD [2, 6], hereinafter abbreviated as Gaussian, schemes for the linear filter, obtained with \(D=1\) in (8). For more denoising techniques, one may refer to [17,18,19, 22].
Stability of the RBF–FD Scheme
FiveNode Approximation
Approximating the time derivative with forward difference, and spatial derivatives with central differences using three nodal points in X and Y directions, we obtain the following scheme for (8)
where \(\varDelta {t}\) is the time step size and \(U_{i,j}^{n}\) denotes the approximation of u(x, y; t) at the pixel (i, j) at time \(n\varDelta {t}\). Here, the coefficients in Eq. (10) can be obtained by solving the local system (5) with \(n_i=5\). It can be observed that, in case of MQ, \(d_2=d_3=d_4=d_5=\dfrac{1}{h^2}+\dfrac{5}{6}\epsilon ^2\) and \(d_1=\dfrac{4}{h^2}\dfrac{10}{3}\epsilon ^2\), where h is the grid size in both X and Y directions [1]. Equation (10) can be rewritten as
The maximum–minimum principle will hold for (11) if each coefficient of U is nonnegative and the sum of all the coefficients of U on the right hand side of (11) is equal to 1. These conditions enforce the restriction on time step size given by
In similar lines, one can prove that the stability condition, in case of Gaussian, is
In Fig. (1), the time step size bound for (11) is plotted against the shape parameter \(\epsilon\) with \(h=\frac{1}{2}\). One can observe from this figure that the time step size bound for finite difference scheme dominates both the MQ and Gaussian scheme bounds for all the values of the shape parameter. Therefore, the RBF–FD schemes with fivenode approximation are relatively less efficient than the standard finite difference scheme.
NineNode Approximation
To improve the efficiency of the RBF–FD scheme, we consider nine nodes in the approximation of firstorder spatial derivatives. Considering \(n_{i}=9\) in (4) and solving the resulting system gives the following approximations, in stencil form, for the firstorder spatial derivatives
where \(\alpha\) and \(\beta\) are functions of the shape parameter \(\epsilon\).
Note that the explicit form of the approximation of \(u_x\) at a mesh point \((x_i,y_j)\), with the given stencil, is given by
Similarly, the approximation for \(u_y\) at \((x_i,y_j)\) is
The approximation of secondorder spatial derivatives can be obtained by consecutive application of firstorder stencils. For example, the approximating stencil for \(u_{xx}\) is
For \(u_{t}=u_{xx}\) in the twodimensional domain, the resulting explicit scheme will take the following form:
Here, the convolution \(L_{i,j}* U_{i,j}^{n}\) is a discretization of \(u_{xx}\) at the nth time level.
The columnwise arrangement of U, which can be obtained using single index \(l={(i1)N+j}\) with N being the number of grid points in a principal axis direction, enables us to rewrite (14) as
where I is the identity matrix and S is the sparse matrix representing the convolution of U with small convolution kernel of \(\varDelta {t}\times L\). The stability of (15) is guaranteed if spectral radius of the iteration matrix \((I+S)\) is less than 1 [3, 8]. One may note that this condition also ensures the stability of
We rewrite (16) as
The stability of (17) is guaranteed if \((2I+S)\) is diagonally dominant [8]. Considering the approximations in the inner part of the image domain (obtained by removing two boundary rows and two boundary columns), the nonzero matrix elements of S at each row are given in the following order:
Here, the diagonal entry of S is \(\varDelta {t}(4\alpha ^22\beta ^2)\). Therefore, the diagonal dominant condition will be satisfied if
By simplifying this inequality, one can see that the nonnegative bound on \(\varDelta {t}\) as
Note that, in general, the bound on \(\varDelta {t}\) is bigger for the rows corresponding to boundary nodal points than the internal nodal points [8].
It is easy to extend these ideas to twodimensional linear diffusion equation, and one can obtain the time step size bound on \(\varDelta {t}\) as
The plot of the time step size bound against the shape parameter for multiquadric and Gaussian RBFs has been provided in Fig. 1.b. In case of multiquadric, for \(\epsilon \ge 1\), the \(\varDelta {t}\) bound increases up to 3; see Fig. 2. In case of Gaussian RBF, it has been observed that the stencil weights \(\alpha\) and \(\beta\) tend to zero as the shape parameter \(\epsilon\) increases, which makes the time step size bound increase rapidly.
Validation
In Fig. 3, we considered a cameraman image and corrupted it with Gaussian noise of mean zero and variance 0.05. This noisy image is evolved under (8), with various values for D, to get a noisefree image. The parameters used in this process are \(\varDelta {t}=0.2\), \(\varDelta {x}=\varDelta {y}=1\), and the number of iterations is 2, where the highquality filtered image is obtained. One can see from this figure that MQ is more stable, for larger D, than the finite difference and Gaussian schemes.
The quantitative performance of this linear diffusion filter with finite difference and RBF (MQ, Gaussian) schemes is illustrated in Fig. 4. It is clear from this figure that the RBF (MQ) scheme produces relatively highquality filtered image, when \(\epsilon =0.4\), than the finite difference and RBF (Gaussian) schemes. One can also observe that the relative error, defined in this case as \(\dfrac{{uu_0}_{2}}{{u_0}_{2}}\) with u being the filtered image and \(u_0\) being the reference image, is minimum when \(\epsilon =0.4\). These simulations show that RBFbased approximations may produce relatively high accurate solutions than with the standard finite difference scheme. This result encourages us to employ RBFbased schemes for the approximation of nonlinear diffusion filters.
Nonlinear Diffusion Filter
Algorithm
Here, we provide the algorithm to find the numerical solution, U, of (8). We can rewrite (8) as
Now, we employ forward difference for time derivative, and \(3\times {3}\) stencils (13) for firstorder spatial derivatives. The rest of the steps of the algorithm are as follows.

(i)
Calculate \(f^{n}_1:=(D u_{x})^{n}\), \(f_2:=(D u_{y})^{n}\) by using the firstorder derivate approximating stencils, for a given \(\epsilon\). Here, \((D u_{x})^{n}\) denotes the approximation of \((D u_{x})\) at the nth time level.

(ii)
Calculate \(g^{n}:=\partial _{x}f_1^{n}+\partial _{y}f_2^{n}\) by applying the same stencils for \(f_1^{n}\) and \(f_2^{n}\).

(iii)
Update U: \(U^{n+1}=U^{n}+\varDelta {t} g^{n}\), where \(U^n\) denotes the numerical solution at the nth time level.
Since we are applying \(3\times {3}\) stencils consecutively in the approximation, the final scheme involves \(5\times {5}\) stencil.
It can be easily seen, by assuming D is nonnegative and bounded above by 1, that the stability of this new scheme is guaranteed if (20) is satisfied.
The performance of the nonlinear diffusion filter with standard finite difference scheme, Gaussian and MQ schemes is shown in Fig. 5.
It is worth noting here that the new 25 node scheme, obtained using (13) which is generated through (12), gives a modest quality filtered image in much shorter number of iterations with a larger time step size than the finite difference scheme. The quantitative results regarding the filtered image quality in terms of PSNR and relative error have been presented in Fig. 6. This figure justifies the use of RBF (MQ) scheme in obtaining reasonable quality processed image. To further assess the performance of the RBF scheme, with both MQ and Gaussian basis functions, we conduct several numerical experiments on various images with different noise levels; see Table 1. In this table, the shape parameter (\(\epsilon\)) is chosen so that the the obtained filtered image, using (8) with (9), has maximum PSNR. \(\varDelta {t}_{\max }\) denotes the maximum possible step size for the given \(\epsilon\). PSNR index represents the iteration number at which maximum PSNR is obtained for the chosen \(\epsilon\) with step size \(\varDelta {t}=0.25\). \(T_{\varDelta {t}}\) denotes the time required to obtain the filtered image with maximum PSNR. This is obtained by multiplying PSNR index with \(\varDelta {t}\). The last column of the table denotes the required number of iterations with the improved time step size \(\varDelta {t}_{max}\): \(\displaystyle \textit{Number of Iterations}=\lceil {\frac{ T_{\varDelta {t}}}{\varDelta {t}_{max}}}\rceil\), where \(\lceil \rceil\) denotes the ceiling function. One can infer from this table that the RBF (Gaussian) with \(\epsilon \in {(0.8,1)}\) is up to two times more efficient than the finite difference and RBF (MQ) schemes, since RBF (Gaussian) requires up to half the number of iterations as that of FD scheme. However, this scheme is inaccurate for larger values of \(\epsilon\) as the stencil weights tend to zero as \(\epsilon\) increases. To check the efficiency of RBF (MQ), for \(\epsilon >1\), we performed simulations on Lena image for various noise levels; see Table 2. One can infer from this table that the RBF (MQ) is more stable as it allows up to 12 times bigger time step size than FD. Moreover, from the last column one can see that the RBF (MQ) is up to four times more efficient than FD, with a reasonable quality processed image. It is important to note here that the higher \(\epsilon\) improves efficiency while compromising the image quality; see Fig. 7.
Conclusions
In this paper, we have analyzed multiquadric and Gaussianbased RBF–FD schemes for twodimensional linear and nonlinear diffusion equations. It has been shown that the stability of RBF–FD scheme, derived using threenode approximation for firstorder spatial derivatives, is guaranteed for a relatively smaller time step size than that of the standard finite difference scheme.
We have improved the time step size bound for RBF–FD scheme by considering nine nodes in the approximation of firstorder spatial derivatives. We then analyzed the stability of the resulting \(5\times {5}\) stencil scheme for twodimensional parabolic equations, and shown that this scheme allows up to four times larger time step size than the standard finite difference scheme.
To analyze the practical applicability of the proposed RBF–FD scheme, we have considered a secondorder nonlinear partial differential equation from image processing. We showed that the Gaussianbased RBF–FD scheme for \(\epsilon \in {(0.8,1)}\) is twice efficient than multiquadric and finite difference schemes. Further, for larger values of the shape parameter \(\epsilon\), we demonstrated that the MQ scheme is up to four times more efficient than the standard finite difference scheme. We emphasize here that this gain in efficiency with MQ scheme comes at the expense of filtered image quality. Therefore one should be cautious about tradeoff between efficiency and the processed image quality while employing the MQbased RBF–FD scheme for a nonlinear diffusion filter.
In future, we wish to work on the selection of optimal shape parameter for multiquadric and Gaussianbased RBF–FD schemes to solve the timedependent higherorder nonlinear partial differential equations.
References
 1.
Bayona V, Moscoso M, Carretero M, Kindein M. RBFFD formulas and convergence properties. J. Comput. Phys. 2010;229:8281–95.
 2.
Bayona V, Moscoso M, Kindelan M. Gaussian RBFFD weights and its corresponding local truncation errors. Engineering Analysis with Boundary Elements. 2012;36(9):1361–9. http://www.sciencedirect.com/science/article/pii/S0955799712000720.
 3.
Bulirsch R, Stoer J. Introduction to numerical analysis. Heidelberg: Springer; 2002.
 4.
Chandhini G, Sanyasiraju YVSS. Local RBFFD solutions for steady convectiondiffusion problems. Int J Num Methods Eng. 2007;72(3):352–78. https://onlinelibrary.wiley.com/doi/abs/10.1002/nme.2024.
 5.
Chen D, MacLachlan S, Kilmer M. Iterative parameterchoice and multigrid methods for anisotropic diffusion denoising. SIAM J Sci Comput. 2011;33(5):2972–94. https://doi.org/10.1137/100796066.
 6.
Fornberg B, Lehto E, Powell C. Stable calculation of gaussianbased RBFFD stencils. Comput Math Appl. 2013;65(4):627–37. http://www.sciencedirect.com/science/article/pii/S0898122112006529.
 7.
Franke R. Scattered data interpolation: tests of some method. Math Comput. 1982;38(157):181–200. http://www.jstor.org/stable/2007474.
 8.
Hajiaboli MR. An anisotropic fourthorder diffusion filter for image noise removal. Int J Comput Vis. 2011;92(2):177–91.
 9.
Kansa EJ. Multiquadrics a scattered data approximation scheme with applications to computational fluiddynamicsii: Solutions to parabolic, hyperbolic and elliptic partial differential equations. Comput Math Appl. 1990;19:147–61.
 10.
Mahipal J, Sharma SK, Sundar S. On a generalized \(5\times {5}\) stencil scheme for nonlinear diffusion filtering. Int J Adv Eng Sci Appl Math. 2016;8(3):194–206. https://doi.org/10.1007/s1257201601634.
 11.
Michelli CA. Interpolation of scattered data: distance matrices and conditionally positive definite functions. Construct Approx. 1986;2:11–22.
 12.
Perona P, Malik J. Scalespace and edge detection using anisotropic diffusion. IEEE Trans Pattern Anal Mach Intell. 1990;12(7):629–39.
 13.
Petras A, Ling L, Ruuth S. An RBFFD closest point method for solving pdes on surfaces. J Comput Phys. 2018;370:43–57. http://www.sciencedirect.com/science/article/pii/S002199911830322X.
 14.
Sanyasiraju Y, Chandhini G. Local radial basis function based gridfree scheme for unsteady incompressible viscous flows. J Comput Phys. 2008;227(20):8922–48. http://www.sciencedirect.com/science/article/pii/S0021999108003690.
 15.
Shankar V, Wright GB, Kirby RM, Fogelson AL. A radial basis function (RBF)finite difference (FD) method for diffusion and reactiondiffusion equations on surfaces. J Sci Comput. 2015;63(3):745–68. https://doi.org/10.1007/s1091501499141.
 16.
Slak J, Kosec G. Refined rbffd solution of linear elasticity problem. In: 2018 3rd International Conference on Smart and Sustainable Technologies (SpliTech). pp. 1–6 (2018).
 17.
Wang W, Wang Y, Wu Y, Lin T, Li S, Chen B. Quantification of full left ventricular metrics via deep regression learning with contourguidance. IEEE Access. 2019;7:47918–28.
 18.
Wang Y, Chen W, Zhou S, Yu T, Zhang Y. Mtv: modified total variation model for image noise removal. Electron Lett. 2011;47(10):592–4.
 19.
Wang YQ, Guo J, Chen W, Zhang W. Fast communication: Image denoising using modified perona malik model based on directional laplacian. Signal Process. 2013;93(9):2548–58. https://doi.org/10.1016/j.sigpro.2013.02.020.
 20.
Weickert J, Scharr H. A scheme for coherenceenhancing diffusion filtering with optimized rotation invariance. J Vis Commun Image Rep. 2002;13(1):103–18.
 21.
Wright G, Fornberg B. Scattered node compact finite differencetype formulas generated from radial basis functions. J Comput Phys. 2006;212:99–123.
 22.
Zhou S, Lu Y, Li N, Wang Y. Extension of the virtual electric field model using bilaterallike filter for active contours. Signal Image Video Process. 2019. https://doi.org/10.1007/s1176001901456x.
Acknowledgements
The authors would like to thank the anonymous reviewers for their valuable suggestions and comments for improving the quality of the paper.
Author information
Ethics declarations
Conflicts of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Jetta, M., Chirala, S. On MultiQuadric Based RBF–FD Method for SecondOrder Diffusion Filters. SN COMPUT. SCI. 1, 39 (2020) doi:10.1007/s4297901900464
Received:
Accepted:
Published:
Keywords
 Multiquadric RBF
 Stability
 Nonlinear diffusion filter
 Image processing
 Finite difference method