mrpro.algorithms.denoiser.conv_analysis_dictionary_denoising

mrpro.algorithms.denoiser.conv_analysis_dictionary_denoising(idata: IData, kernel: Tensor, regularization_weight: float | Tensor, initial_image: Tensor | None = None, max_iterations_pdhg: int = 96, tolerance_pdhg: float = 0.0001) → IData
mrpro.algorithms.denoiser.conv_analysis_dictionary_denoising(idata: Tensor, kernel: Tensor, regularization_weight: float | Tensor, initial_image: Tensor | None = None, max_iterations_pdhg: int = 96, tolerance_pdhg: float = 0.0001) → Tensor

Apply image denoising using a given convolutional analysis dictionary.

This algorithm solves the problem

\(x^{\ast}:= \arg\min_x \frac{1}{2}||x - y||_2^2 + \lambda || H x||_1\),

by using the primal dual hybrid gradient (PDHG) algorithm. Thereby, \(y\) is the given noisy image, \(\lambda\) is the sparsity level and \(H:V^n \rightarrow V^{Kn}\) a sparsifying convolutional analysis operator with \(K\) filters.

Denoising is achieved by computing an image that is close to the noisy image but at the same time is sparse after the application of the convolutional filters. To solve the problem, the PDHG algorithm is used.

Note: it is also possible to provide entire locally adaptive sparsity level maps \(\Lambda\) instead of a single scalar value \(\lambda>0\). In that case, the sparsity regularization is given by a weighted \(\ell_1\)-norm, i.e. by

\(|| z ||_{1,\Lambda}:=|| \Lambda z ||_{1}:\sum_i \lambda_i | z_i |.\)

for \(z \in V^{Kn}\), where \(\Lambda\) can be thought as a diagonal operator \(\Lambda:=\mathrm{diag}(\lambda_1, \lambda_2, \ldots, \lambda_{Kn} )\). In that case, the sparsity level map must be broacastable with elements of the range of the convolutional analysis operator.

Note: The noisy image idata determines on which device the algorithm will be run. This means that, for example, if idata is on the cpu and kernel on the gpu, the kernel will be transferred to the cpu. The denoised image will also be on the device specified by idata.

Parameters:
  • idata (IData | Tensor) – noisy image

  • kernel (Tensor) – convolutional kernel for the convolutional analysis operator.

  • regularization_weight (float | Tensor) – strength of the regularization, i.e. the sparsity of the filtered images.

  • initial_image (Tensor | None, default: None) – initial estimate of the clean image; if None, it is initialized as the noisy image.

  • max_iterations_pdhg (int, default: 96) – maximum number of PDHG iterations to solve the problem.

  • tolerance_pdhg (float, default: 1e-4) – tolerance of PDHG; if 0, max_iterations of PDHG are run.

Raises:

ValueError – If regularization_weight and elements of the range of the convolutional analysis operator are not broadcastable.

Returns:

the denoised image.