httomolibgpu.misc.denoise
#
Module for data denoising. For more detailed information see Data denoising module.
- httomolibgpu.misc.denoise.total_variation_PD(data: <cp.ndarray>, regularisation_parameter: float | None = 1e-05, iterations: int | None = 1000, isotropic: bool | None = True, nonnegativity: bool | None = False, lipschitz_const: float | None = 8.0, gpu_id: int | None = 0) <cp.ndarray> [source]#
Primal Dual algorithm for non-smooth convex Total Variation functional [2]. See more in Total Variation denoising (PD).
- Parameters:
data (cp.ndarray) – Input CuPy 3D array of float32 data type.
regularisation_parameter (float) – Regularisation parameter to control the level of smoothing. Defaults to 1e-05.
iterations (int) – The number of iterations. Defaults to 1000.
isotropic (bool) – Choose between isotropic or anisotropic TV norm. Defaults to isotropic.
nonnegativity (bool) – Enable non-negativity in iterations. Defaults to False.
lipschitz_const (float) – Lipschitz constant to control convergence. Defaults to 8.
gpu_id (int) – GPU device index to perform processing on. Defaults to 0.
- Returns:
TV-PD filtered 3D CuPy array in float32 data type.
- Return type:
ndarray
- Raises:
ValueError – If the input array is not float32 data type.
- httomolibgpu.misc.denoise.total_variation_ROF(data: <cp.ndarray>, regularisation_parameter: float | None = 1e-05, iterations: int | None = 3000, time_marching_parameter: float | None = 0.001, gpu_id: int | None = 0) <cp.ndarray> [source]#
Total Variation using Rudin-Osher-Fatemi (ROF) [8] explicit iteration scheme to perform edge-preserving image denoising. This is a gradient-based algorithm for a smoothed TV term which requires a small time marching parameter and a significant number of iterations. See more in Total Variation denoising (ROF).
- Parameters:
data (cp.ndarray) – Input CuPy 3D array of float32 data type.
regularisation_parameter (float, optional) – Regularisation parameter to control the level of smoothing. Defaults to 1e-05.
iterations (int, optional) – The number of iterations. Defaults to 3000.
time_marching_parameter (float, optional) – Time marching parameter, needs to be small to ensure convergence. Defaults to 0.001.
gpu_id (int, optional) – GPU device index to perform processing on. Defaults to 0.
- Returns:
TV-ROF filtered 3D CuPy array in float32 data type.
- Return type:
ndarray
- Raises:
ValueError – If the input array is not float32 data type.