# Is the Bilateral Filter a Solution of Some Variational Method?

I've been watching these video lectures about variational methods in computer vision.
In one of such video lectures a it is explained for example that the Gaussian filtering is a solution of the diffuse equation (so Gaussian filtering is a specific class of diffuse filtering). I do wonder if the same applies to the bilateral filter, because if so it can means that all such filters can be derived by some functional to be minimized. This is because the diffusion equation is a solution of a variational problem like

$$E(u) = \int_{\Omega} \left[(u-f)^2 + \lambda\lVert \nabla u\rVert^2 \right]d\Omega$$

Again, is the bileteral filter a similar case?

Yes indeed.

You may have a look on work (Paper) by Michael Elad which is called On the Origin of the Bilateral Filter and Ways to Improve It or Analysis of the Bilateral Filter.

You may have a look on the way he derives the Bilateral Filter from a Least Squares problem with weighted regularization on the Gradient of the image in the form of:

$$\arg \min_{x} \frac{1}{2} {\left\| x - y \right\|}_{2}^{2} + \frac{\lambda}{2} \sum_{n = 1}^{N} { \left( x - {D}^{n} x \right) }^{T} W \left( y, n \right) \left( x - {D}^{n} x \right)$$

Where $${D}^{n}$$ is Image Gradient Operator (Raising by $$n$$ simply shifts it) and $$W$$ is the weights matrix of the Regularized Least Squares.

• Can you explain what all the parameters mean? ($W$ is a window function I assume, what about $D^n$?) Jul 6 '18 at 22:06
• I updated the answer. Though you should read the articles to grasp the whole picture.
– Royi
Jul 6 '18 at 22:08