gaussian_blur

deepinv.physics.blur.gaussian_blur(sigma=(1, 1), angle=0)[source]

Gaussian blur filter.

Defined as

\[\begin{equation*} G(x, y) = \frac{1}{2\pi\sigma_x\sigma_y} \exp{\left(-\frac{x'^2}{2\sigma_x^2} - \frac{y'^2}{2\sigma_y^2}\right)} \end{equation*}\]

where \(x'\) and \(y'\) are the rotated coordinates obtained by rotating $(x, y)$ around the origin by an angle \(\theta\):

\[\begin{split}\begin{align*} x' &= x \cos(\theta) - y \sin(\theta) \\ y' &= x \sin(\theta) + y \cos(\theta) \end{align*}\end{split}\]

with \(\sigma_x\) and \(\sigma_y\) the standard deviations along the \(x'\) and \(y'\) axes.

Parameters:
  • sigma (float, tuple[float]) – standard deviation of the gaussian filter. If sigma is a float the filter is isotropic, whereas if sigma is a tuple of floats (sigma_x, sigma_y) the filter is anisotropic.

  • angle (float) – rotation angle of the filter in degrees (only useful for anisotropic filters)

Examples using gaussian_blur:

A tour of forward sensing operators

A tour of forward sensing operators

Image deblurring with custom deep explicit prior.

Image deblurring with custom deep explicit prior.

A tour of blur operators

A tour of blur operators

Deep Equilibrium (DEQ) algorithms for image deblurring

Deep Equilibrium (DEQ) algorithms for image deblurring