priors.rof

Contents

priors.rof#

bartorch.priors.rof()#

Total-variation (Rudin-Osher-Fatemi) denoising along axes, BART’s rof.

Approximates

\[\min_x \; \tfrac12 \| x - y \|_2^2 + \lambda \sum_r \| (D x)_r \|_2\]

with \(D\) the periodic first differences along axes and the inner norm over the derivative directions (isotropic total variation). BART runs 50 ADMM iterations with \(\rho = 0.1\), so a large \(\lambda\) does not reach the constant minimizer; the mean of input is preserved.

Parameters:
  • input (torch.Tensor) – Image \(y\).

  • lamda (float) – \(\lambda\), in the units of input’s values.

  • axes (int or tuple of int) – Axes along which differences are taken.

Returns:

Denoised image, of input’s shape.

Return type:

torch.Tensor