• Ei tuloksia

2.3 Path to collaborative denoising

2.3.4 Shrinkage

The core of transform-domain filters is shrinkage in the chosen transform do-main. The shrinkage operator is a non-linear filter applied separately on each transform coefficient, leveraging the enhanced sparsity of the domain to atten-uate noise. Denoting by TdD andQdD thed-dimensional forward and inverse transforms, respectively, shrinkage of a patch4 at a coordinatexinTdD trans-form domain can be expressed as

y

ˆx =QdD(Υ(TdD(zx))), (2.6) where yˆx is the resulting patch estimate, and Υ is the non-linear shrinkage operator. We denote by sxi =⟨︁

zx, bdDi ⟩︁

,i= 1, . . . , N, whereN is the total pixel count of the patch and bdDi is the i-th basis function of TdD, a coefficient ofzx in the TdD domain; a generic shrinkage operator can then be expressed by

Υ :sxi ↦−→αisxi, (2.7) where αi ∈ [0,1] is a shrinkage attenuation factor which depends on sxi, the noise statistics, and possible other priors. Coefficients small in relation to the corresponding transform-domain noise variance vi are commonly assumed to be mostly noise (as they are likely to arise fromN(0, vi)), and as such assigned a small αi.

2.3.4.1 Denoising by thresholding

Hard-thresholding is a simple yet effective shrinkage operation performed by setting spectrum coefficients smaller than a threshold √viλto zero:

αHTi =

⎧⎨

1 if |sxi| ≥√viλ 0 otherwise,

(2.8)

4In case of filters which consider the full image at once, this patch is simply of the image size.

whereλ≥0 is a fixed constant andviis the noise variance ofsxi, which for white noise is equal to ∑︁N

i=1∥bdDi22var{η}. Hard-thresholding can offer very good performance when the signal is concentrated to only few coefficients, as any coefficient not exceeding the threshold will be completely eliminated. However, no noise will be attenuated from the coefficients with significant signal, meaning that noise in such coefficients will be preserved.

Another thresholding function is soft-thresholding, where, on top of setting to zero coefficients smaller than the threshold, all larger coefficients are shrunk by the threshold magnitude. As such, some noise is eliminated even from large coefficients. Although soft-thresholding commonly achieves a smoother appear-ance, the average error tends to be greater than that of the hard threshold, making hard-thresholding a common choice despite its simplicity (Johnstone 2019).

Considering an orthonormal TdD, the thresholding functions can be seen as an optimization of quadratic fidelity and an ℓp-penalty promoting sparsity, where smaller pcorresponds to higher sparsity (Johnstone 2019):

y

ˆx = argmin

yx

(∥zx−yx22+c∥TdD(yx)∥p),

where cis a constant scaling the penalty, relating to the threshold value. Set-ting p = 1 yields a soft-thresholding in (2.6), whereas p = 0 (with ℓ0 defined as the number of non-zero elements) yields hard-thresholding.

Choice of threshold

For ideal noise attenuation, the threshold should be large enough to cover all noise extremes. However, if the signal is nonzero in the thresholded coefficient, too large a threshold will also attenuate significant amounts of signal. For this reason, the preferred threshold is commonly just above the expected max-imum of noise (Mallat 1999), which is proportional to the transform-domain noise standard deviation √vi. An optimized threshold can also be estimated through minimizing an expected risk (e.g., the expected squared error) based on the noisy data itself, as used in Donoho and Johnstone (1995) through the Stein unbiased risk estimate (Stein 1981). Adaptive estimation for sub-band thresholding is further developed in Chang et al. (2000).

Universal threshold

A commonly used approximation of the expected maximum of white Gaus-sian noise, the so-called universal threshold (Donoho and Johnstone 1994), is

√vi√︁

2ln(N); this leads to a natural choice λ = √︁

2ln(N). The curious de-pendence on the sample size arises from the tail of the Gaussian distribution, raising the likelihood of increasingly large coefficients as the sample size in-creases. The universal threshold gives only the upper bound for the expected maximum for white Gaussian noise; it is nevertheless commonly employed due to its simplicity (Johnstone 2019). The universal threshold is not optimal in terms of risk; in general, a lower threshold reduces this expected error, and is commonly preferred in practical applications (Johnstone 2019; Mallat 1999).

Thresholding for correlated noise

Hard-thresholding (2.8) is directly applicable to correlated noise denoising.

In such case, the noise variance of each transform-domain coefficient depends on the power spectrum of the noise. The theoretical basis of the universal threshold √vi√︁

2ln(N) considers only white noise, although it is also used in thresholding correlated noise. In practice, it indicates only an upper bound (of an upper bound) for correlated noise, noting that the probability of the sample maximum to exceed a given threshold is highest when standardized samples are independent (Johnstone and Silverman 1997).

2.3.4.2 Wiener filter

Wiener filter is a filter defined through minimization of the mean squared error between the estimate and an oraclereference signal representing the underlying noise-free data. The mean squared error of an estimateˆ of a noise-free signalr r can be written as a sum of bias and variance as

MSE(r,rˆ) = E{(rˆ−r)2}= var{rˆ}+ Biasr{rˆ}2. (2.9) Considering a noisy coefficient sxi =rxi +nxi, where rix is the underlying noise-free coefficient and nxi is the zero-mean noise component, the shrinkage

oper-ation in (2.7) with a factorαi gives rˆxiisxiirixinxi. Then, argmin

αi[0,1]

(var{rˆxi}+ Biasrxi {rˆxi}2) = argmin

αi[0,1]

(var{αinxi}+ (E{αirix} −rxi)2)

= argmin

αi[0,1]

2ivi+ (αirix−rix)2), which yields the attenuation factor

αwiei = |rix|2

|rxi|2+vi. (2.10) Instead of using directly the mean squared error, adding scaling factors to the bias or variance of (2.9) can be used to adjust the balance between minimization of the two sources of error. In practical applications, an oracle signal is not available; in such cases, an image estimate from another filter, e.g., hard-thresholding, can be used as the reference signal (Ghael et al. 1997).

An example of a simple transform-domain filter utilizing patch shrinkage is the sliding patch filter (Oktem et al. 1998; Yaroslavsky et al. 2001), in which a patchzx is extracted from the image at each coordinatex. Each patch is then filtered as in (2.6); commonly, the full resulting patch-estimates yˆx are aggre-gated to form the image estimate. The basic model uses rectangular blocks as patches; shape-adaptive alternatives have also been proposed to improve denoising performance (Foi et al. 2006; Foi et al. 2007). A particularly success-ful approach for denoising of white as well as correlated noise is to model the transform-domain coefficient neighborhoods through multiscale Gaussian scale mixtures, where clusters of coefficients are modeled as a product of a Gaussian vector and a positive scaling variable; from this model, the noise-free coeffi-cients can be effectively estimated through Bayesian least-squares (Portilla et al. 2003).

2.3.4.3 Transform-domain noise power spectrum

To calculate the noise variance vi of the TdD spectrum coefficients needed for accurate shrinkage, we note thatsxi =⟨︁

zx, bdDi ⟩︁

=(︁

z⊛bidD)︁

(x), where the

decoration denotes the reflection about the origin of Zd. Thus var{sxi}= var{︂(︂

ν⊛g⊛bidD)︂

(x)}︂

= var{ν}⃦⃦⃦g⊛bidD⃦⃦⃦2