Introduction
There are many imaging applications where more than one piece of information is given at one single point in space. A well known example is an RGB color image where at any point three numbers are given which encode the amount of red, green and blue color. On the one hand you can think of an RGB image as three scalar-valued images or you can think of it as a single vector-valued image. Another example is given in medical imaging where different scanners measure different properties for the same spatial point—for instance a computed tomography (CT) scanner measures the absorption of X-rays by the body or a magnetic resonance tomography (MR) scanner can measure the response of water molecules to a magnetic field. Beside these a positron emission tomography (PET) or a single photon emission computed tomography (SPECT) scanner can obtain functional properties like blood flow or metabolic activity. Modern scanners, like SPECT/CT or PET/MR, combine these in one device and can obtain so a vector-valued image where the different channels of the vector correspond to different properties of the tissue [1], [2].
In such cases the channels can be but do not have to be correlated. Fig. 1 shows the color channels of the test image “pyramid.” It is clearly visible that the objects in this figure are encoded in all three colors. The correlation of the color channels especially for the edges in natural images was also observed by [3]. “All three channels are very likely to have the same texture and edge locations.” Likewise, in medical imaging the channels of a PET/MR scanner are likely to be correlated as different tissue types have properties that are interdependent. This dependency is what we want to exploit in this paper.
Most image processing tools are designed for scalar-valued images or when applied to vector-valued images they process these independently channel by channel, which fails to exploit the information expressed in the correlation between channels. One prominent example of using information between channels is color total variation [4]. This extension of the scalar-valued version [5] leads to a non-linear diffusion scheme where the diffusivity depends on all channels. This approach is extended by [6] where several variational methods in image processing of vector-valued images are combined using the concept of Polyakov action which yields the so called Nambu functional. An approach to vector-valued diffusion based on statistical correlation, but still channel-wise was developed in [7]. In this paper we propose a new approach emphasising the geometric correlation between channels by considering the degree of parallelism between the level sets of each channel.
In our approach we assume that the components of the vector-valued image are not independent. Therefore, we try to align their gradients which leads to parallel level sets and hence to similar structures. We will see that this approach of enhancing common structures can be used in image processing applications like denoising or demosaicking of color images [3], [8].
We distinguish this usage of the term “level sets” from its usage in applications that evolve a
The rest of this paper is organized as follows. First of all, we give a brief overview about variational approaches in image processing and discuss diffusion equations which naturally arise from gradient based cost functionals. In Section II we introduce the basic concepts how to handle parallel level sets and propose a variational approach to obtain these. Its Gâteaux derivative is then computed in Section III. Finally, in Section IV we present a simple example which illustrates the behaviour of the levels sets and their trend towards parallelism. Moreover, we present results of denoising and demosaicking of color images and compare it to other approaches used for image enhancement. Conclusions and discussions are presented in Section V.
A. Overview
As in the case of scalar-valued images, problems such as denoising, inpainting, demosaicking, or deblurring for vector-valued images can be cast into the form of an inverse problem by seeking a minimum of the functional \Phi (z)\buildrel{\rm def}\over{=}{{1}\over{2}}\left\Vert Az-g\right\Vert^{2}+\alpha{\cal R}(z)\eqno{\hbox{(1)}}
As we will show in Section III, for some choices of \partial_{t}\Phi=-D\Phi_{z}=-A^{\ast}(Az-g)+\alpha\mathop{\rm div}[{\cal K}\nabla z]\eqno{\hbox{(2)}}
{\cal K}=\left(\matrix{{\cal K}_{1}&{\cal T}_{1,2}&\ldots&{\cal T}_{1,K}\cr{\cal T}_{2,1}&\ddots &\ddots &\vdots\cr\vdots &\ddots &\ddots &{\cal T}_{K-1,K}\cr{\cal T}_{K,1}&\ldots &{\cal T}_{K,K-1}&{\cal K}_{K}}\right),
As mentioned above, the idea in this paper is to consider a particular form of isotropic, non-linear, cross-channel diffusion, in which the penalty term
Modelling a Variational Approach to Enforce Parallel Level Sets
A. Parallel Level Sets
Consider vector-valued images
We now restrict ourselves to the case of two channels, i.e.,
It is common knowledge that \eqalignno{\vert\left\langle\nabla u(x),\nabla v(x)\right\rangle\vert=&\,\vert\cos (\theta(x))\vert\left\Vert\nabla u(x)\right\Vert\left\Vert\nabla v(x)\right\Vert\cr\leq &\,\left\Vert\nabla u(x)\right\Vert\left\Vert\nabla v(x)\right\Vert,}
\left\Vert\nabla u(x)\right\Vert\left\Vert\nabla v(x)\right\Vert-\vert\left\langle\nabla u(x),\nabla v(x)\right\rangle\vert\eqno{\hbox{(3)}}
\varphi (\psi [\left\Vert\nabla u(x)\right\Vert\left\Vert\nabla v(x)\right\Vert]-\psi [\vert\left\langle\nabla u(x),\nabla v(x)\right\rangle\vert]).\eqno{\hbox{(4)}}
To obtain a global measure we integrate over the whole domain, i.e.,{\cal R}(u, v)\buildrel{\rm def}\over{=}\int_{\Omega}f(\nabla u(x),\nabla v(x))\;{\rm d}x.\eqno{\hbox{(5)}}
The proposed model is minimized when the gradients are parallel or zero. Therefore we implicitly penalize non-zero gradients as well. Another choice to measure parallelism of level sets would be to normalize (4) by the norm of the gradients. This measure is more natural as the level sets do not depend on the magnitudes of the gradients but bears two disadvantages. First, we would need to assume that the gradients do not vanish or need to find a solution in this case. Second, our numerical experiments have shown that a normalized version leads to instabilities as gradients of arbitrary magnitude are equally likely solutions. The normalized version with the choices
B. Arbitrary Vector-Valued Images
As we have seen the stated approach is made for just two channels. One way to extend this approach to arbitrary dimensional vector-valued images is to define the functional pairwise, i.e., for any image {\cal R}(z)\buildrel{\rm def}\over{=}\sum_{k<l}{\cal R}(z_{k}, z_{l}).\eqno{\hbox{(6)}}
Gâteaux Derivatives
This section is dedicated to the Gâteaux derivatives [15, p. 135] of the functional
If we fix
Proposition 3.1:
Let D{\cal R}_{u}(h)=-\int_{\Omega}h\mathop{\rm div}[\nabla f(\nabla u)]\;{\rm d}x+\int_{\partial\Omega}h\left\langle\nabla f(\nabla u), n\right\rangle{\rm d}x
Proof:
Let \eqalignno{{\cal R}(u+\varepsilon h)=&\,\int_{\Omega}f(\nabla u+\varepsilon\nabla h){\rm d}x\cr=&\,\int_{\Omega}f(\nabla u)+\varepsilon\left\langle\nabla f(\nabla u),\nabla h\right\rangle{\rm d}x+{\cal O}(\varepsilon^{2})}
\eqalignno{D{\cal R}_{u}(h)\buildrel{\rm def}\over{=}&\lim_{\varepsilon\rightarrow0}{{1}\over{\varepsilon}}\left\{{\cal R}(u+\varepsilon h)-{\cal R}(u)\right\}\cr=&\,\lim_{\varepsilon\rightarrow 0}{{1}\over{\varepsilon}}\Biggl\{\int_{\Omega}f(\nabla u)+\varepsilon\left\langle\nabla f(\nabla u),\nabla h\right\rangle\cr\noalign{\vskip -3pt}&\qquad\qquad-f(\nabla u){\rm d}x+{\cal O}(\varepsilon^{2})\Biggr\}\cr\noalign{\vskip-3pt}=&\,\int_{\Omega}\left\langle\nabla f(\nabla u),\nabla h\right\rangle{\rm d}x\cr\noalign{\vskip -3pt}=&\,-\int_{\Omega}h\mathop{\rm div}[\nabla f(\nabla u)]{\rm d}x+\int_{\partial\Omega}h\left\langle\nabla f(\nabla u), n\right\rangle{\rm d}x.}
We note that the assumption that
To obtain the Gâteaux derivative of the proposed method we have to approximate the Euclidean norm smoothly. For a parameter f(\nabla u,\nabla v)\buildrel{\rm def}\over{=}\varphi(\psi [\Vert\nabla u\Vert_{\beta}\Vert\nabla v\Vert_{\beta}]-\psi [\vert\left\langle\nabla u,\nabla v\right\rangle\vert_{\beta^{2}}]).\eqno{\hbox{(7)}}
Lemma 3.2:
Let \nabla f(\nabla u)=\kappa (u,v)\nabla u+\tau (u,v)\nabla v
\eqalignno{\kappa (u,v)\buildrel{\rm def}\over{=}&{{\psi^{\prime}\left[\Vert\nabla u\Vert_{\beta}\Vert\nabla v\Vert_{\beta}\right]\Vert\nabla v\Vert_{\beta}}\over{\Vert\nabla u\Vert_{\beta}}}\rho (u, v)\cr\tau (u,v)\buildrel{\rm def}\over{=}&-{{\psi^{\prime}\left[\vert\left\langle\nabla u,\nabla v\right\rangle\vert_{\beta^{2}}\right]\left\langle\nabla u,\nabla v\right\rangle}\over{\vert\left\langle\nabla u,\nabla v\right\rangle\vert_{\beta^{2}}}}\rho (u, v)\cr\rho(u,v)\buildrel{\rm def}\over{=}&\varphi^{\prime}\left(\psi\left[\Vert\nabla u\Vert_{\beta}\Vert\nabla v\Vert_{\beta}\right]-\psi\left[\vert\left\langle\nabla u,\nabla v\right\rangle\vert_{\beta^{2}}\right]\right).&{\hbox{(8)}}}
Proof:
These results can be easily obtained by using the multi-dimensional chain rule [16, p. 51].
As the functional
Theorem 3.3:
The Gâteaux derivative of D{\cal R}_{(u,v)}=-\mathop{\rm div}\left[\left(\matrix{\kappa (u,v) &\tau (u,v)\cr\tau (u,v) &\kappa (v,u)}\right)\nabla\left(\matrix{u\cr v}\right)\right]\eqno{\hbox{(9)}}
It is important to note that taking the divergence, gradient and matrix-vector product are defined channel-wise.
Proof:
As the functional
It is straightforward to extend Theorem 3.3 for the three (or even arbitrary) channel case, e.g., RGB images.
Corollary 3.4:
The Gâteaux derivative of D{\cal R}_{z}=-\mathop{\rm div}\left[\left(\matrix{\kappa_{1}&\tau_{1,2}&\tau_{1,3}\cr\tau_{1,2}&\kappa_{2}&\tau_{2,3}\cr\tau_{1,3}&\tau_{2,3}&\kappa_{3}}\right)\nabla\left(\matrix{z_{1}\cr z_{2}\cr z_{3}}\right)\right]\eqno{\hbox{(10)}}
Asymptotics of the Diffusivities
We now turn to the asymptotics of the diffusivities. Without loss of generality we will just discuss the diffusivities for
Proposition 3.5:
Let \kappa (u,v)\rightarrow{{\beta}\over{\Vert\nabla u\Vert_{\beta}}}\qquad\tau (u,v)\rightarrow 0
Proof:
With the assumptions on the derivatives of \kappa (u,v)={{\Vert\nabla v\Vert_{\beta}}\over{\Vert\nabla u\Vert_{\beta}}}\quad{\rm and}\quad\tau (u,v)=-{{\left\langle\nabla u,\nabla v\right\rangle}\over{\vert\left\langle\nabla u,\nabla v\right\rangle\vert_{\beta^{2}}}}.
Due to the desired asymptotics we only considered the case
B. Color Total Variation and Nambu Functional
As we will compare our method with color total variation and the Nambu functional we will state them and their Gâteaux derivatives here.
Color total variation [4], i.e., \kappa_{i}\buildrel{\rm def}\over{=}{{\vert z_{i}\vert_{\rm TV}}\over{\vert z\vert_{\rm CTV}}}{{1}\over{\left\Vert\nabla z_{i}\right\Vert}},\quad\tau_{i,j}\buildrel{\rm def}\over{=}0.\eqno{\hbox{(11)}}
\eqalignno{&\eta (z)\buildrel{\rm def}\over{=}\cr&\qquad\sqrt{1+\sum_{i}\left\Vert\nabla z_{i}\right\Vert^{2}+\sum_{i<j}\left\Vert\nabla z_{i}\right\Vert^{2}\Vert{\nabla z_{j}}\Vert^{2}-\left\langle\nabla z_{i},\nabla z_{j}\right\rangle^{2}}.}
\eqalignno{\kappa_{i}\buildrel{\rm def}\over{=}&\,\left(1+\sum_{j\ne i}\left\Vert\nabla z_{j}\right\Vert\right)\eta(z)^{-1}\cr\tau_{i,j}\buildrel{\rm def}\over{=}&\,-\left\langle\nabla z_{i},\nabla z_{j}\right\rangle\eta(z)^{-1}.&{\hbox{(12)}}}
Numerical Experiments
A. Implementation
The task at hand is to minimize (1) for our parallel level set cost functional. As this functional is differentiable we use tools from optimization to solve it [18]. A suitable choice for large scale optimization with information about the first but not the second derivative is the large scale version of BFGS [18, p. 226]. This is a Quasi-Newton method where the Hessian is approximated by a low rank matrix based only on first derivative information. The line search algorithm is also taken from [18, p. 59].
To complete the implementation details we will describe how we discretized our Gâteaux derivative, see (10). We use an image extension so as to satisfy the vanishing normal derivatives as required by the assumptions in Theorem 3.4. It is sufficient to have a look at the discretization of \eqalignno{&\mathop{\rm div}(\kappa\nabla u)_{i,j}\approx{{1}\over{2}}\Biggl\{\sum_{(k,l)\in{\cal N}(i,j)}[\kappa_{k,l}+\kappa_{i,j}] u_{k,l}\cr&\qquad\qquad\qquad\quad\quad-[\overline{\kappa}_{i,j}+4\kappa_{i,j}] u_{i,j}\Biggr\}&{\hbox{(13)}}}
It is very important to note that we are not proposing an algorithm but a cost functional which can be used in a variational formulation. This is independent of the actual algorithm which is used to minimize the corresponding objective function.
As we know the ground truth in our numerical simulations the parameters
The MATLAB implementation of the method can be found on the authors' homepage [19].
B. Measuring Similarities of Images
To evaluate our results we define some objective criteria measuring the denoising and demosaicking performance. We decided to use the peak signal-to-noise ratio (PSNR) which is probably the most common measure to evaluate image enhancement performance. It is defined as
C. A Simple Example
Let us start with a simple example which illustrates the properties of our method and is shown in Fig. 2. The top two rows (a), (b) show the evolutions of the start images
We can see in detail how these shapes evolve to the steady state. Looking at the top row, at first the shape evolves at all eight common corners. At its own corners we can clearly see the diffusing nature of this method (fourth image from the left hand side). But after this usual diffusion these “shadows” move back to a sharp image. At first sight it might appear that this diffusion in the “wrong direction” could be explained by shock filtering of Osher and Rudin [23] but as the corresponding diffusivities
D. Denoising of Color Images
Next, we want to show that this method can be used very well to denoise color images. As test data we have chosen some color images of the Berkeley Segmentation Database [24], [25]. For better comparison we used publicly available noisy versions of those which are degraded by additive, uncorrelated Gaussian noise of standard deviations of 5, 10, 15, 25 and 35 [26].
For the denoising case we compare our results with non-local means [27], Nambu functional [6] and color total variation (CTV) [4]. For non-local means we used the implementation available at [28]. As the others are variational methods we implemented these for better comparison in the same manner as we implemented the proposed parallel level set method. This means (1) with the operator being the identity is minimized by using a Quasi-Newton method described above with the gradient (10) and diffusivities given by (11) and (12).
The results for one test image are shown in Fig. 3. All methods perform very well for a small noise level. When the noise level increases non-local means shows unpleasant color fluctuations. While the Nambu functional smooths the images a lot to get rid of the noise the proposed method yields sharper images. Fig. 4 shows the PSNR and SSIM with respect to the noise level. Non-local means and color total variation are clearly worse than the Nambu functional and the proposed parallel level sets functional. The performance of these are very similar with the proposed functional most of the time ahead of the Nambu functional.
In Fig. 5 the choices of parameters are plotted against the noise level with the solid line indicating the mean and the dotted lines the minimum and maximum over the five data sets. It can be seen that the optimal parameters vary a lot between different images. As expected there is an overall trend in the regularization parameter
E. Demosaicking of Color Images
Demosaicking is the reconstruction of a color image which is obtained by acquiring image data only at positions described by the Bayer filter shown in Fig. 6. This means that at each position either the intensity for red, green or blue is acquired. This technique enables either to acquire a lot less data for a given resolution or to enhance the resolution by using the same amount of data. A detailed discussion of demosaicking is given in [3] and [8]. A typical data set for demosaicking is given in Fig. 6.
The same data sets for demosaicking as for denoising is used. These data sets are then degraded by the Bayer filter. To compare our results we used only the variational methods as it is straightforward to state the demosaicking problem as an optimization problem (1) with the operator
Some results are given in Figs. 7 and 10. Fig. 7 shows that the proposed parallel level set cost functional can be used to fully recover Bayer filtered images with low noise levels. The difference between the reconstructed images and the original images are hardly visible. A comparison with the Nambu functional and color total variation can be obtained from Fig. 10. While color total variation gives blurry results with many color artefacts the Nambu functional is capable of eliminating most of these. It is clear that the proposed method gives the sharpest images with only a few color artefacts in high noise levels.
Overall, we can see from Fig. 8 that color total variation performs much worse than the proposed parallel level set functional and the Nambu functional. While the PSNR indicates that the Nambu functional is slightly better the SSIM states the opposite. For high noise levels they show that the proposed method performs clearly better than the Nambu functional.
The parameters are plotted against the noise level in Fig. 9 where in all cases and for both parameters a trend towards zero for decreasing noise level is visible. While the variation of
Conclusion
We propose a new framework based on parallel level sets which can be used for image enhancement of vector-valued images. In this approach we exploit the interchannel correlation which is inherent in many vector-valued images such as RGB images. The examples presented in this paper indicate that exploiting this correlation leads to better, sharper reconstructions with less artefacts. The results show that the notion of parallel level sets is a promising tool for vector-valued image processing tasks.
While we showed the usage for denoising and demosaicking it is easily extendible to other applications where more complicated operators are involved. This includes for instance simultaneous reconstruction of multi-modal medical imaging. Such applications will be the subject of future research.
ACKNOWLEDGEMENT
The authors would like to thank the two anonymous reviewers for their comments. M. J. Ehrhardt would like to acknowledge support from an Individual Framework Collaboration Agreement with Siemens Ltd.