Non-Local Means Denoising by IPOL

  • We want to denoise by replacing a pixel with an average of similar pixels.
  • This method works because of the variance law in probability theory.
    • If 9 similar pixels are averaged, then the noise standard deviation of the average will be divided by 3.

 

How these similar pixels can be founded?

 

Motivation

For a pixel \(p = (x,y)\) of the image \(\bold{I}\), we compute the value of pixel \(p\) as follows:

$$\bold{I}[p] = \frac{1}{C(p)} \sum_{q \in B(p,r)} \bold{I}[p] \cdot w(p,q), \qquad C(p) = \sum_{q \in B(p,r)} w(p,q),$$

where \(B(p,r)\) is a search window centered at \(p\) with size \((2r+1)\times(2r+1)\) pixels. The value of search size, \(r\), is determined by the standard deviation of noise \(\sigma\).

 

Pixelwise Implementation

The weight \(w(p,q)\) is computed by using an exponential kernel

$$w(p,q) = e^{-\frac{\max(d^2(p,q)-2\sigma^2,0)}{h^2}},$$

where \(d^2(p,q)\) is the squared Euclidean distance between two patches of size \((2f+1) \times (2f+1)\) centered at \(p\) and \(q\)

$$d^2(p,q) = \frac{1}{(2f+1)^2} \sum_{j \in B(0,f)} (\bold{I}[p+j]-\bold{I}[q+j])^2$$

and \(h\) is the filtering parameter defined as

$$h = k \sigma.$$

The value of \(k\) decreases as the search size, \(r\), increases.

Pixelwise Implementation

For a patch \(B=B(p,f)\) centered at \(p=(x,y)\) with size \((2f+1) \times (2f+1)\) of the image \(\bold{I}\), we compute the value of pixel \(p\) as follows:

$$\bold{I}[p]=\frac{1}{(2f+1)^2} \sum_{Q(q,f) | q \in B(p,f)} \hat{Q}[p],$$

$$\hat{Q} = \frac{1}{C} \sum_{Q(q,f) \in B(p,r)} Q \cdot w(B,Q), \qquad C = \sum_{Q(q,f) \in B(p,r)} w(B,Q),$$

where \(B(p,r)\) is a search window centered at \(p\) with size \((2r+1)\times(2r+1)\) pixels. The value of search size, \(r\), is determined by the standard deviation of noise \(\sigma\).

 

Patchwise Implementation

The weight \(w(p,q)\) is computed by using an exponential kernel

$$w(p,q) = e^{-\frac{\max(d^2-2\sigma^2,0)}{h^2}},$$

where \(d^2\) is defined to be the squared Euclidean distance 

$$d^2(p,q) = \frac{1}{(2f+1)^2} \sum_{j \in B(0,f)} (\bold{I}[p+j]-\bold{I}[q+j])^2$$

and \(h\) is the filtering parameter defined as

$$h = k \sigma.$$

The value of \(k\) decreases as the search size, \(r\), increases.

Patchwise Implementation

Examples

Copy of MATH386 Final Project

By Zhengming Song

Copy of MATH386 Final Project

  • 43