[Math] What does the term $\nabla c \cdot \nabla I$ represent in the Perona-Malik anisotropic diffusion equation

computer visionimage processingpartial differential equations

In the paper Scale-space and edge detection using anisotropic diffusion, the Perona-Malik diffusion equation is defined as

$$I_t = c(x, y, t) \nabla^2I + \nabla c \cdot \nabla I$$

where $I_t$ is the partial derivative of the image $I$ with respect to time $t$, $c(x, y, t)$ is the diffusion function, $\nabla^2 I = \Delta I $ is the Laplacian of the image $I$, $\nabla c$ is the gradient of the diffusion function $c$ and $\nabla I$ is the gradient of the image $I$.

This PDE equation is used to perform anisotropic diffusion, that is, it perfoms bluring on background noise, while sharpening edges. This is useful for edge detection, where Gaussian bluring would blur out both background noise and edges.

Guassian bluring (that is, convolving the image with a Gaussian kernel $G$)

$$I * G$$

results from the heat equation

$$I_t = k \nabla ^2 I$$

where $k$ is a constant that determines the rate of heat diffusion.

The idea of Perona-Malik is to make this constant, $k$, a function, $c$, so that diffusion is not space invariant.

The paper suggests to use $c = g(\|I \|)$, where $g$ is some monotonically decreasing function such as

$$g(x) = \frac{1}{1 + \left(\frac{x}{K} \right)^2}$$

How does the $\nabla c \cdot \nabla I$ term in the Perona-Malik equation fit into all of this?

Best Answer

Notice the flux within any infinitesimal region inside your domain of interest is $$ F = -C\,\nabla I, $$ which measures the change of the density inside this infinitesimal region under the effect of the diffusion $C$. This is the called the flux, by divergence theorem, this actually is the amount of $I$ flowing into this infinitesimal region: $$ \nabla \cdot F := \frac{1}{\delta V}\iint_{\text{boundary of }\delta V} F\cdot (\text{outward normal})\,dS. $$ By conservation law, the diffusion equation is actually $$ I_t +\nabla \cdot F =0, $$ and this is $$ I_t = \nabla \cdot (C\nabla I) = \nabla C \cdot \nabla I + C\,\nabla \cdot (\nabla I) = \nabla C \cdot \nabla I + C\Delta I. $$ When it is constant diffusion $C=k$, first term is gone, that is why you have the heat equation. But now $C = g(\|I\|)$ and you can't do that.


Backstory of this: Non-constant diffusion causes convection. Thinking hot air (larger diffusion constant) vs cold air(smaller diffusion constant), you get blowing wind (convection).

Related Question