Perona-Malik diffusion
/ puh-ROH-nah MAH-lik /
You want to clean up a grainy photo by blurring out the noise — but ordinary blurring also smears the edges, turning a sharp portrait into mush. Could you smooth the flat regions while leaving the edges crisp? Perona-Malik diffusion is the clever PDE that does exactly this, and it is the founding idea of treating image processing as solving a diffusion equation.
The starting observation is that linear blurring is just running the heat equation: u_t = c Laplacian u smooths an image u, but with a constant diffusivity c it smooths everything equally, edges included. Perona and Malik's idea (1990) was to make the diffusion coefficient depend on the local image gradient: u_t = div( g(|grad u|) grad u ), where g is a function that is near 1 where the image is flat (small gradient — diffuse freely) and near 0 at edges (large gradient — stop diffusing). The result is a nonlinear, anisotropic diffusion: it smooths within regions but refuses to smooth across edges, so noise vanishes while boundaries survive. A close cousin, total-variation denoising, achieves a similar edge-preserving effect by minimizing a different functional.
This launched a whole field — PDE-based image processing and computer vision — where denoising, inpainting (filling in holes), and segmentation are all posed as evolving PDEs. The honest catch is real and instructive: the Perona-Malik equation can be locally backward-parabolic (it can run diffusion in reverse to sharpen edges), and backward diffusion is ill-posed. In its pure continuous form the problem is mathematically ill-posed; what makes it work in practice is the regularizing effect of discretization and small smoothing tweaks — a vivid case where a numerically useful method sits on delicate theoretical ground.
A common choice is g(s) = 1 / (1 + (s/K)^2) with a threshold K. Where the gradient |grad u| is well below K (smooth region), g is near 1 and the image diffuses like the ordinary heat equation; where the gradient exceeds K (an edge), g collapses toward 0 and diffusion is switched off, so the edge is left sharp while the noise around it is rubbed away.
Diffusion that stops at edges: nonlinear, anisotropic, edge-preserving smoothing.
Pure Perona-Malik is mathematically ill-posed (it can act as backward diffusion at edges); it works only because discretization and a little regularization tame it. Treat it as an effective recipe, not a theoretically clean PDE.