# Neighboorod filters

### Introduction

We focus in this section on neighborood filters. Those filters, starting from linear filters, and going to Yaroslavsky filter or the Bilateral filter, have been popularized in the 2000's by the introduction of the Non Local Means (NLM). Here we give some new insights on those methods, focusing on several simpler variants.

### Noise Model


### The Yaroslavksy filter

In this paragraph we give some new insight on neighboor filters using only pixelwise information to compute image similarity. Let us remind what we mean by the Yaroslavsky filter. Here is the mathematical formulation: $$\label{eq2} \IYF(\boldx)=\frac{\sum_{\boldx'} K( [\inoisy(\boldx')-\inoisy(\boldx)]/g) \cdot L( [\boldx'-\boldx]/g) \cdot \inoisy(\boldx')}{\sum_{\boldx''} K([\inoisy(\boldx'')-\inoisy(\boldx)]/g) \cdot L([\boldx''- \boldx ]/h)} \:,$$ where $\boldx'$ runs in $\Omega$, $K,L$ are kernel functions, $g>0$ and $h>0$ are bandwidth parameters. For simplicity we usually use this filter with both the spatial kernel $L$ and the photometric kernel $K$ being box kernels.

### The preprocessed Yaroslavksy filter

The idea of the preprocessed Yaroslavsky filter (PYF), is to proposed a first estimate $\tilde{f}$ of out targeted image, and then to use this cleaner version of the image to compute the photometric distance, instead of using the original noisy version. Possible candidates for the first step could be wavelet denoising, curvelet denoising, linear filtering, etc. The PYF could be written in the following way: $$\label{eq3} \PYF(\boldx)=\frac{\sum_{\boldx'} K( [\tilde{f}(\boldx')-\tilde{f}(\boldx)]/g) \cdot L( [\boldx'-\boldx]/g) \cdot \inoisy(\boldx')}{\sum_{\boldx''} K([\tilde{f}(\boldx'')-\tilde{f}(\boldx)]/g) \cdot L([\boldx''- \boldx ]/h)} \:.$$

Papers:
"A two-stage denoising filter: the preprocessed Yaroslavsky filter"
J. Salmon, R. , E. , 2012, PDF.

Corresponding Matlab Demo and toolbox ZIP.

"Oracle inequalities and minimax rates for non-local means and related adaptive kernel-based methods"
E. , J. Salmon, R. , SIAM J. Imaging Sci., vol.5, pp. 944--992, 2012, PDF.

Corresponding Matlab Demo and toolbox ZIP.