Keywords

1 Introduction

Image processing requires quick and efficient processing of large amounts of data. The most important factor here is the speed of processing, which can be generally in conflict with quality. For this reason, the classical metric spaces are gradually being replaced by more general spaces based on the notion of proximity. The direction of research is moving towards nonlocal differential operators defined on these spaces.

Methods based on nonlocal Laplace operator have become widely used in many application fields. Dimensionality reduction (extracting low dimensional structure from high dimensional data) [1] or clustering (automatic identification of groups of similar objects) [2] can be mentioned. This approach also turned out to be successful for image colorization [3], image denoising or segmentation [4].

In our approach we try to extend the theory of fuzzy transforms, that was proved to be useful in image processing. The purpose is to focus on similarities between approach based on the theory of fuzzy transform and framework based on nonlocal Laplace operator, mentioned above. We assume, that the use of nonlocal operators-based methods in spaces determined by fuzzy partition can somehow enhance the research in this direction.

Let f be a real function, \(f:\varOmega \rightarrow \mathbb {R}, \quad \varOmega \subset \mathbb {R}^n\). Laplace operator is a second order differential operator in the n-dimensional Euclidean space, given by the divergence of the gradient of a function f. Equivalently it can be defined by the sum of all the unmixed second partial derivatives of function f in the Cartesian coordinates \(x_i\), \(\varDelta f=\sum _{i=1}^n \frac{\partial ^2 f}{\partial x_i^2}\). This formula incorporates the partial derivatives, that should fulfill certain well-known conditions. However, this puts limitations on sets of functions, that can be differentiated as required.

For this reason, the notion of derivative was extended to a nonlocal version by defining [5]:

$$\begin{aligned} \partial _y f(x)=\frac{f(y)-f(x)}{\tilde{d}(x,y)}, \quad \forall \, x,y\in \varOmega \end{aligned}$$
(1)

where \(\tilde{d}\), \(0< \tilde{d}(x,y) \le \infty \), defines a positive distance measure between x and y.

Definition 1

Let function \(w:\varOmega \times \varOmega \rightarrow \mathbb {R}\) be non-negative \((0\le w(x,y)<\infty )\) and symmetrical \((w(x,y)=w(y,x))\), then w is called a measure of proximity. A pair \((\varOmega ,w)\) defines a proximity space.

Remark 1

A proximity space \((\varOmega ,w)\) can be also introduced with the reference to a distance measure, e.g. defining

$$\begin{aligned} w(x,y)=\tilde{d}^{-2}(x,y). \end{aligned}$$
(2)

In \((\varOmega ,w)\), a nonlocal derivative can be defined as follows [5]:

$$\begin{aligned} \partial _y f(x)=\left( f(y)-f(x)\right) \sqrt{w(x,y)}. \end{aligned}$$
(3)

This notion can be extended for functions of several real variables. In a similar way, other operators of vector field can be defined in a nonlocal form.

The nonlocal gradient \(\nabla _w f(x): \varOmega \rightarrow \varOmega \times \varOmega \), which is defined as a vector of all partial derivatives, has a form [5]:

$$\begin{aligned} (\nabla _w f)(x,y)=(f(y)-f(x))\sqrt{w(x,y)}, \quad \forall x,y\in \varOmega . \end{aligned}$$
(4)

Assume vector \(\mathbf {v}=v(x,y)\in \varOmega \times \varOmega \), then nonlocal divergence

\(div_w\mathbf {v}(x):\varOmega \times \varOmega \rightarrow \varOmega \) can be written as follows [5]:

$$\begin{aligned} (div_w\mathbf {v})(x)=\int _\varOmega (v(x,y)-v(y,x))\sqrt{w(x,y)}dy. \end{aligned}$$
(5)

It is well known that the Laplace operator can be defined by the divergence of the gradient up to a constant multiplication, therefore with the notions mentioned above we can define nonlocal Laplace operator in this case by:

$$\begin{aligned} \varDelta _w f(x)=\int _a^b (f(y)-f(x))w(x,y)dy, \end{aligned}$$
(6)

for each function \(f: \varOmega \rightarrow \mathbb {R}\) and \([a,b]\subset \varOmega \).

2 Fuzzy Partition

The choice of proper proximity function is extremely important. In this article we proposed one, where proximity is determined by fuzzy partition \(A_1, \dots , A_n\).

Definition 2

Fuzzy sets \(A_1, \dots , A_n\), establish a fuzzy partition of a real interval [ab] with nodes \(x_1< \dots <x_n\) if for \(k=1, \dots , n\) holds [6]:

  1. 1.

    \(A_k: [a,b] \rightarrow [0,1], \quad A_k(x_k)=1, \quad A_k(x)>0 \,\,\) if \(\, x\in (x_{k-1}, x_{k+1})\)

  2. 2.

    \(A_k(x)=0\) if \(x \not \in (x_{k-1}, x_{k+1})\), where \(x_0=a\) and \(x_{n+1}=b\)

  3. 3.

    \(A_k(x)\) is continuous

  4. 4.

    \(A_k(x), \,\) for \(\, k=2, \dots , n\), strictly increases on \([x_{k-1}, x_k]\) and \(A_k(x)\) strictly decreases on \([x_{k}, x_{k+1}]\) for \(k=1, \dots , n-1\),

  5. 5.

    \(\forall x\in [a,b]\)

    $$\begin{aligned} \sum _{k=1}^n A_k(x)=1. \end{aligned}$$
    (7)

The membership functions \(A_1, \dots , A_n\) are called basic functions.

Definition 3

The fuzzy partition \(A_1, \dots , A_n, \, \) for \(\, n\ge 2\) is h-uniform [6] if nodes \(x_0< \dots <x_{n+1}\) are h-equidistant, i.e. for all \(k=1, \dots , n+1\), \(x_k=x_{k-1}+h\), where \(h=(b-a)/(n+1)\) and the following additional properties are fulfilled:

  1. 1.

    for all \(k=1,\dots , n\) and for all \(x\in [0,h]\), \(A_k(x_k-x)=A_k(x_k+x)\),

  2. 2.

    for all \(k=2, \dots , n\) and for all \(x\in [x_{k-1}, x_{k+1}]\), \(A_k(x)=A_{k-1}(x-h)\).

Definition 4

If the fuzzy partition \(A_1, \dots , A_n\) of [ab] is h-uniform, then there exists [7] an even function \(A_0: [-1,1] \rightarrow [0,1]\), such that for all \(k=1, \dots , n\):

$$A_k(x)=A_0\left( \frac{x-x_k}{h}\right) , \quad x\in [x_{k-1},x_{k+1}].$$

\(A_0\) is called a generating function of uniform fuzzy partition.

Corollary 1

Generating function \(A_0\) produces infinitely many rescaled functions [8] \(A_H: \mathbb {R} \rightarrow [0,1]\) with the scale factor \(H>0\), so that:

$$A_H(x)=A_0\left( \frac{x}{H}\right) .$$

A (h,H)-uniform partition of \(\mathbb {R}\) is then a collection of translations

\(\{A_H(x-k\cdot h), k\in \mathbb {Z}\}.\)

3 Fuzzy Transform

Direct Fuzzy transform or F-transform is a result of weighted linear integral transformation of a continuous function with weights determined by basic functions.

Definition 5

Let \(A_1, \dots , A_n\) be basic functions which form a fuzzy partition of [ab] and f be any function from C([ab]). We say that n-tuple of real numbers \(F[f]=(F_1, \dots , F_n)\) given by [6]

$$\begin{aligned} F_k= {\frac{\int _a^b f(x)A_k(x)dx}{\int _a^b A_k(x)dx}}, \quad k=1, \dots , n, \end{aligned}$$
(8)

is the direct integral F-transform of f with respect to \(A_1, \dots , A_n\).

F-transform establishes a correspondence between a set of continuous functions on [ab] and the set of n-dimensional vectors. Inverse F-transform then converts an n-dimensional vector of components \((F_1, \dots , F_n)\) into another continuous function:

$$\begin{aligned} \hat{f}(x)=\sum _{k=1}^n F_kA_k(x), \end{aligned}$$
(9)

which approximates the original one.

4 Proximity Function Determined by Fuzzy Partition

Let \([a,b] \subset \mathbb {R}\), \(f \in L^2([a,b]), \, h>0\) and \(A_h\) be a h-rescaled generating function. Assume the measure of proximity as follows:

$$\begin{aligned} w(x,y)=\frac{1}{h}A_h(x-y). \end{aligned}$$
(10)

Proposition 1

Let a generalized h-uniform fuzzy partition of [ab] be given by the infinite set of basic functions \(\{A_y(x)|y\in [a,b]\}\), where \(A_y(x)=A_h(x-y)\). Then for all \(x \in [a,b]\):

$$\begin{aligned} \varDelta _w^{FT}f(x)=F_x-f(x), \end{aligned}$$
(11)

defines nonlocal Laplace operator. \(F_x\) denotes the particular \(x^{th}\) F-transform component of F-transform F[f] of function f.

Proof

$$\begin{aligned} \varDelta _w^{FT}f(x)= & {} \int _\varOmega \!\!\,\,(f(y)-f(x))\omega (x,y)\,\mathrm{d}y\\= & {} \int _a^b\!\!\,\,(f(y)-f(x))\frac{1}{h}A_h(x-y)\,\mathrm{d}y\\= & {} \frac{\int _a^b\!\!\,\,f(y)A_h(x-y)\,\mathrm{d}y}{h}-\frac{f(x)}{h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y\\= & {} F_x-f(x). \end{aligned}$$

   \(\square \)

5 Properties of FT-Laplace Operator \(\varDelta _w^{FT}\)

In this section we propose several properties of the operator \(\varDelta _w^{FT}\).

Proposition 2

For all \(x,y \in [a,b]\), the operator \(\varDelta _w^{FT}\) admits following properties:

  1. 1.

    If \(f(x)=\mathrm {const}\), then \(\varDelta _w^{FT}f(x)=0\).

  2. 2.

    For \(w(x,y)>0\), if \(\varDelta _w^{FT}f(x)=0\), then \(f(x)=\mathrm {const}\).

  3. 3.

    If \(f(x_0) \ge f(x)\), then \(\varDelta _w^{FT}f(x)\le 0\).

  4. 4.

    Similarly for a minimum, if \(f(x_1) \le f(x)\), then \(\varDelta _w^{FT}f(x_1) \ge 0\).

  5. 5.

    \(\varDelta _w^{FT}\) is a positive semi-definite operator, i.e.

    $$\begin{aligned} \langle -\varDelta _w^{FT}f(x),f(x)\rangle \, \ge 0, \end{aligned}$$
    (12)

    where \(\langle \cdot ,\cdot \rangle \) denotes inner product on \(L^2\), defined as \(\langle f,g\rangle =\int _a^b\!\!\,\,f(x)g(x)\,\mathrm{d}x\).

  6. 6.

    The following equation holds:

    $$\begin{aligned} \int _a^b\!\!\,\,\varDelta _w^{FT}f(x)\,\mathrm{d}x=0. \end{aligned}$$
    (13)

Proof

Property 1:

$$\begin{aligned} \varDelta _w^{FT}f(x)= & {} \int _a^b\!\!\,\,(f(y)-f(x))\frac{1}{h}A_h(x-y)\,\mathrm{d}y\\= & {} {f(x)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y-f(x)=0. \end{aligned}$$

Property 2:

$$\begin{aligned} \varDelta _w^{FT}f(x)= & {} {1\over h}\int _a^b\!\!\,\,f(y)A_h(x-y)\,\mathrm{d}y-f(x)\\= & {} {f(c)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y-f(x)\\= & {} f(c)-f(x)=0\\ \quad \Rightarrow \quad f(x)= & {} \mathrm {const.} \quad \forall x \in [a,b]. \end{aligned}$$

Property 3:

$$\begin{aligned} \varDelta _w^{FT}f(x_0)= & {} {1\over h}\int _a^b\!\!\,\,(f(y)-f(x_0))A_h(x-y)\,\mathrm{d}y\\= & {} {1\over h}\int _a^b\!\!\,\,f(y)A_h(x-y)\,\mathrm{d}y-{f(x_0)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y \\\le & {} {f(x_0)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y-{f(x_0)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y=0\\ \Rightarrow \varDelta _w^{FT}f(x_0)\le & {} 0. \end{aligned}$$

Property 4:

$$\begin{aligned} \varDelta _w^{FT}f(x_1)= & {} {1\over h}\int _a^b\!\!\,\,(f(y)-f(x_1))A_h(x-y)\,\mathrm{d}y\\= & {} {1\over h}\int _a^b\!\!\,\,f(y)A_h(x-y)\,\mathrm{d}y-{f(x_1)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y \\\ge & {} {f(x_1)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y-{f(x_1)\over h}\int _a^b\!\!\,\,A_h(x-y)\,\mathrm{d}y=0\\ \Rightarrow \varDelta _w^{FT}f(x_1)\ge & {} 0. \end{aligned}$$

Property 5:

$$\begin{aligned} \langle -\varDelta _w^{FT}f(x),f(x)\rangle= & {} \langle f(x)-{1\over h}\int _a^b\!\!\,\,f(y)A_h(x-y)\,\mathrm{d}y,f(x)\rangle \\= & {} {1\over h}\int _a^b\int _a^b\!\!\,\,(f^2(x)-f(x)f(y))A_h(x-y)\,\mathrm{d}y\mathrm{d}x\\= & {} \!{1\over 2h}\int _a^b\!\!\!\int _a^b[\!\!\,\,(f^2(x)-f(x)f(y))A_h(x-y)\\+ & {} (f^2(x)-f(x)f(y))A_h(x-y)]\,\mathrm{d}y\mathrm{d}x\\= & {} \!{1\over 2h}\!\int _a^b\!\!\!\int _a^b[\!\!\,\,(f^2(x)-f(x)f(y))A_h(x-y)\\+ & {} (f^2(y)-f(y)f(x))A_h(x-y)]\,\mathrm{d}y\mathrm{d}x\\= & {} {1\over 2h}\int _a^b\!\!\!\int _a^b\!\!\,\,(f(x)-f(y))^2A_h(x-y)\,\mathrm{d}y\mathrm{d}x \ge 0\\ \Rightarrow \langle -\varDelta _w^{FT}f(x),f(x)\rangle\ge & {} 0. \end{aligned}$$

Property 6:

$$\begin{aligned}&\int _a^b\!\!\,\,\varDelta _w^{FT}f(x)\,\mathrm{d}x\\&\qquad =\!{1\over 2}\!\!\int _a^b\!\!\!\int _a^b\!\!\,\,\left[ (f(y)-f(x))A_h(x-y)+(f(y)-f(x))A_h(x-y)\right] \,\mathrm{d}x\mathrm{d}y\\&\qquad =\!{1\over 2}\!\!\left[ \int _a^b\!\!\!\int _a^b\!\!((f(y)-f(x))A_h(x-y)\mathrm{d}x\mathrm{d}y\!-\!\!\!\int _a^b\!\!\!\int _a^b\!\!((f(x)-f(y))A_h(x-y)\mathrm{d}x\mathrm{d}y\!\right] \!\!\\&\qquad =0. \end{aligned}$$

   \(\square \)

6 Application to Image Processing

Image regularization that uses the nonlocal Laplace operator is proved to be very efficient [9]. The regularization of an image function \(f^0\) corresponds to an optimization problem, which can be formalized by the minimization of a weighted sum of two energy terms [9]:

$$\begin{aligned} \min _{f} \left\{ E_w^p(f,f^0,\lambda )=R_w^p(f)+\frac{\lambda }{2}\Vert f-f^0\Vert _2^2\right\} , \end{aligned}$$
(14)

where \(R_w^p(f)=\frac{1}{p}\sum _{u\in V}|\nabla _w f(u)|^p\) (details can be found in [9]). When assuming \(p=2\), this problem has a unique solution.

In [9], linearized Gauss-Jacobi iterative method was used to solve this problem. Let t be an iteration step, and let \(f^{(t)}\) be the solution at the step t. The method is given by the following algorithm:

$$\begin{aligned} f^{(0)}= & {} f^0 \end{aligned}$$
(15)
$$\begin{aligned} f^{(t+1)}(u)= & {} \frac{\lambda f^0(u)+\sum _{v \sim u}\gamma _w^{f^{(t)}}(u,v)f^{(t)}(v)}{\lambda +\sum _{v \sim u}\gamma _w^{f^{(t)}}(u,v)}, \quad \forall u \in V. \end{aligned}$$
(16)

It describes a family of discrete diffusion processes, which is parametrized by the structure of the graph, the edge weights, the parameter \(\lambda \) and the parameter p.

In our case, \(p=2\), the equation of the \((t+1)\)th step is simplified to:

$$\begin{aligned} f^{(t+1)}(u)=\frac{\lambda f^0(u)+2\sum _{v\sim u} w(u,v)f^{(t)}(v)}{\lambda +2\sum _{v\sim u} w(u,v)}. \end{aligned}$$
(17)

The minimization problem and the discrete diffusion processes can be used to regularize any function defined on a finite set of discrete data. This is realized by constructing a weighted graph \(G=(V,E,w)\), and by selecting the function to be regularized as a function \(f^0\), defined on the vertices of the graph.

Graph is produced as follows. Each pixel is identified with one vertex and semantically related pixels are connected by edges. The edges weights are computed according to a symmetric similarity function \(m:V\times V\rightarrow \mathbb {R}\). If between vertices u and v does not exist an edge, then \(w(u,v)=0\), otherwise \(w(u,v)=m(u,v)\).

Every data \(u\in V\) is assigned with a feature vector \(F(f^0,u)\in \mathbb {R}^q\). In the simplest case, one can consider \(F(f^0,u)=f^0(u)\).

Also the choice of graph topology plays an important role, because different types of graphs are suitable to use for different types of problems.

6.1 Image Denoising

Consider an image damaged by additional noise and the goal of this method is to restore the initial uncorrupted image. In our case RGB noise was added. We analyzed the case of weight function depending on the fuzzy partition for a fixed value of parameter p. The scalar feature vector was used, \(F(f^0,u)=f(u)\). And for this configuration, we considered a standard 4-adjacency grid graph. Various values of parameter \(\lambda \) were tested. For illustration we selected the one best output after 15 iterations of regularization process. Figure 1 shows, that the noise was partly removed and this process caused minimal damage to geometric features.

Fig. 1.
figure 1

Image denoising illustration, original image (first), image corrupted by a noise (second) and recovered image (third). Parameters: RGB noise (noise level 0.4 in each channel, random seed set to 222), 4-adjacency grid graph, \(F(f^0,u)=f(u)\), weight function based on fuzzy partition, \(\lambda =2\).

7 Conclusion

A new representation of nonlocal Laplace operator in a space with a fuzzy partition is proposed and analysed. It stems from the theory of fuzzy transform, where the weight assignment is based on a generating function of a fuzzy partition and represents proximity between points. We proved validity of all important properties of this operator and illustrated its usefulness in image denoising.

In the future work, we would like to continue in this direction, we are now focusing on how a new expression of nonlocal Laplace operator can be applied to image processing tasks, specifically we would like to turn the attention to image segmentation and filtering, that are connected to the regularization. This nonlocal approach is significantly computationally simpler, so we expect that compared to classical methods it will be a significantly lower time consuming, which is one of the main priorities in this field.