Implementation of the “ non-local Bayes ” image denoising algorithm

Image denoising is the first step of any image processing chain. If the digital image were completely noise-free, we would have access to an infinity amount of information. Thus, every means to increase the signal to noise ratio must be explored. Early studies applied linear Wiener filters equivalent to a frequency reduction of the Fourier transform. These filters are more efficient when applied locally on the DCT (Yaroslavsky et al. [19], [18]). More recently studies proposed nonlinear variational methods like the total variation minimization, Rudin et al. [17]. Still more recently several methods have gone back to the idea of a Wiener filtering but with other linear transforms, and propose thresholding the wavelet transform, Donoho et al. [8]. In 2005 have appeared the so-called patch-based methods. The Nonlocal-means method, Buades et al. [2], [3] seems to be one of the first of this kind, followed by other many. Patch-based denoising methods have been understood as parsimonious but redundant representations on patches dictionaries, as proposed by Elad et al. [10], Mairal et al. [14], [15], Yu et al. [20]. This parsimonious decomposition method has become a paradigm for all images restoration tools, including also de-blurring or in-painting. The BM3D method (Dabov et al. [6]) is probably the most efficient patch-based current method. It merges the local DCT thresholding-based method and the non-local means method based on patches comparison. Indeed, BM3D creates a 3D block with all patches similar to a reference patch, on which a 3D transform thresholding is applied. A more recent NL-means variant shares with BM3D the idea of applying a transform threshold to the 3D block. This method, due to Zhang et al. [21], replaces the DCT by an adaptive local linear transform, the principal component analysis (PCA). The method proceeds in two identical steps which can only be distinguished by the noise parameter that is used. Like BM3D the method creates an array of vectors with all patches similar to a reference patch. A linear minimum mean square error (LMMSE) method is applied on the obtained coefficients before applying the inverse transform. Unlike for BM3D, only the estimate obtained for the reference pixel is kept. The second step attempts to remove the noise left by the first step. A similar enhancement for the BM3D method replacing the DCT by a local PCA on similar blocks (with adaptive shape) has also been considered in [7]. Nevertheless, according to this paper, the performance gain with respect to BM3D is very modest. Nevertheless, there is another way of thinking about denoising, based on the Bayesian approach. These Bayesian approaches have been proposed as early as 1972 in [16]. Being first parametric and limited to rather restrictive Markov random field models [11], the Bayesian method has also expanded recently to non-parametric methods. The seed for the recent non parametric estimation methods is a now famous algorithm to synthesize textures from examples [9]. The underlying Markovian assumption is that, in a textured image, the stochastic model for a given pixel i can predicted from a local image neighbourhood P of i, which we shall call “patch”. As we will see in this paper, the Bayesian approach can be merged with Fourier methods like BM3D, in a new method called NL-Bayes. A natural extension of this method, called NL-PCA in the following, can be seen as we described it as a fusion of BM3D and TSID, where NL-PCA begins and ends like BM3D, the only change being the use of the PCA instead of the DCT or