  A spatially varying blur kernel $h(\mathbf{x},\mathbf{u})$ is specified by an
input coordinate $\mathbf{u} \in \mathbb{R}^2$ and an output coordinate
$\mathbf{x} \in \mathbb{R}^2$. For computational efficiency, we sometimes write
$h(\mathbf{x},\mathbf{u})$ as a linear combination of spatially invariant basis
functions. The associated pixelwise coefficients, however, can be indexed by
either the input coordinate or the output coordinate. While appearing subtle,
the two indexing schemes will lead to two different forms of convolutions known
as scattering and gathering, respectively. We discuss the origin of the
operations. We discuss conditions under which the two operations are identical.
We show that scattering is more suitable for simulating how light propagates
and gathering is more suitable for image filtering such as denoising.
