A Fully Conservative Parallel Numerical Algorithm with Adaptive Spatial Grid for Solving Nonlinear Diﬀusion Equations in Image Processing

In this paper we present simple yet eﬃcient parallel program implementation of grid-diﬀerence method for solving nonlinear parabolic equations, which satisﬁes both fully conservative property and second order of approximation on non-uniform spatial grid according to geometrical sanity of a task. The proposed algorithm was tested on Perona–Malik method for image noise ﬁltering task based on diﬀerential equations. Also in this work we propose generalization of the Perona– Malik equation, which is a one of diﬀusion in complex-valued region type. This corresponds to the conversion to such types of nonlinear equations like Leontovich–Fock equation with a dependent on the gradient ﬁeld according to the nonlinear law coeﬃcient of diﬀraction. This is a special case of generalization of the Perona–Malik equation to the multicomponent case. This approach makes noise removal process more ﬂexible by increasing its capabilities, which allows achieving better results for the task of image denoising.


Introduction
In recent years applications of mathematical physics methods in image processing have been of great interest.One of such state-of-the-art approaches is Perona-Malik method used for image denoising as numerical solution of partial differential equations (PDEs) [1].This method was further developed in many works, e.g.[2][3][4].The idea of this method is relatively simple: authors suggest to numerically solve PDE (for instance stationary diffusion equation) with image being denoised as initial conditions.This is equivalent to image blurring with Gaussian filter and has deep connection with other methods of denoising filters constructions based on application of Green function for PDEs [5].For example, Gaussian filter is a Green function for diffusion equation.Thus, we can say that usage of diffusion equation in Perona-Malik approach for given image is equivalent to convolution of this image with Gaussian filter.It should be mentioned that application field of PDEs in image processing is not only denoising, but also broken image restoration, known as inpainting process [6].Development of denoising methods based on solution of PDEs is troublesome because of heavy computational load.But usage of clusters and graphical processor units (GPUs) can overcome this shortage.That is why parallel implementation of algorithms based on Perona-Malik approach is very promising.In this paper we propose an algorithm for image denoising based on non-linear diffusion equation.Parallel implementation was done on FORTRAN 90 with MPI (Message Passing Interface) and Intel Fortran compiler.The solution of the given equation is based on implicit finite difference scheme of the second order.

Generalized Perona-Malik Approach
Let us consider the following PDE of the given form: (1) Here ψ(x, y) is a field (generally speaking -complex numbered) corresponding to processed image being denoised.Parameter t is evolutional one.In general case coefficient D(∇ψ) is complex numbered function [7].Let as analyze specific form of D(∇ψ): Here varph is a phase, tunable parameter whose inference on efficiency of generalized Perona-Malik approach is a subject of interest.With ϕ = 0 we get ordinal case of non-linear diffusion equation.With ϕ = π/2 we get non-linear Schrödinger equation (in generalized sense, because non-linear Schrödinger equation assumes non-linearity of third order of field).

Numerical Scheme
According to the given initial conditions we construct non-uniform grid with symmetry to the origin: .N , N is the number of grid nodes.In the case of axially symmetric x N/2+1 = h 0 /2 and h N/2+1 = h 0 .The symbol is entered here ≤ 1 mesh heterogeneity parameter of the grid.
Similarly, we perform a partition of the orthogonal coordinate: y I .For the simplicity let us assume, that there are equal number of points on each computational node.
We solve this task with alternative directions method [8], which allows to solve onedimensional diffusion task on each half-step: The given equation is a non-linear one, and we solve it by Newton-Raphson method [8].This leads to the necessity of solving a linear system of differential equations on each step.Condition of second order approximation of diffusion operator for scheme on non-uniform grid can be deduced from the condition of the following equations coherence: Again, for simplicity, let each processor have the same number of points m l = N/M , where M is the number of processors.
Global index J relates to local index j on processor with number q as follows: J = (q − 1) * m l + j.The numerical implementation of the diffraction step will be implemented on a threepoint "cross" scheme with a vory order of accuracy of approximation of the Laplace operator on a non-uniform grid.Numerical implementation of diffraction step will be performed by three point "cross" scheme with second order approximation of Laplace operator on non-uniform grid.In this case we need to solve a system of equation of the kind: . To solve this system of algebraic equations, we will use generalized method of fast parallelization in complex case [9].

Results of Numerical Calculations
The following are examples (Fig. 1) of the original image of a noisy image and an example of the result of a partially noise-free image:  From the presented pictures it can be seen, that efficiency of image denoising significantly depends on parameter ϕ, and for the case under study value ϕ = 2π/3 is optimal.

Conclusion
In this paper we present fully conservative numerical scheme (in a weak sense), which allows to control correctness of the equation solution by tracing motion integrals and using this to correct evolution variable step.This numerical scheme was parallely implemented for complex generalization of Perona-Malik equation.It was shown, that this approach extends denoising abilities of the method, which allows to achieve better results for the image noise removal task.Thus, in particular, in the present study we show that complex parameter equals one is optimal for image denoising task when phase is equal ϕ = 2π/3.

Figure 1 .
Figure 1.Examples of images