pystack3d.destriping module

Functions related to the destriping processing

pystack3d.destriping.destriping(fnames=None, inds_partition=None, queue_incr=None, maxit=100, cvg_threshold=0, filters=None, wavelet_decomposition=None, output_dirname=None)

Function dedicated to destriping from the VSNR algorithm (or wavelet decomposition). For more details, see: https://github.com/CEA-MetroCarac/pyvsnr

Parameters:
  • fnames (list of pathlib.Path, optional) – List of ‘.tif’ filenames to process

  • inds_partition (list of ints, optional) – List of indexes to be considered by the global var SHARED_ARRAY when working in multiprocessing

  • queue_incr (multiprocessing.Queue, optional) – Queue passed to the function to interact with the progress bar

  • wavelet_decomposition (dict, optional) –

    Parameters provided for destriping using wavelet decomposition. See here Example:

    wavelet_decomposition = {‘wavelet’:’coif3’, ‘level’:4, ‘sigma’:4}

  • maxit (int, optional) – Number of maximum iterations used by the VSNR algorithm

  • cvg_threshold (float, optional) – Convergence criteria to stop the VSNR iterative process, related to the maximum residual variation between 2 iterations

  • filters (list of dict, optional) –

    Filters defined as a list of dictionaries that specifies for each filter the corresponding ‘name’, ‘noise_level’, ‘sigma’ and ‘theta’. See the pyvsnr documentation for more details. Example:

    filters = [{‘name’: “Gabor”, ‘noise_level’: 10, ‘sigma’: (1, 20), ‘theta’: -10}, {‘name’: “Gabor”, ‘noise_level’: 40, ‘sigma’: (3, 40), ‘theta’: -10}]

  • output_dirname (str, optional) – Directory pathname for process results saving

pystack3d.destriping.destriping_from_wavelets(img0, wavelet='coif3', level=4, sigma=4)

Destriping from wavelet decomposition, considering vertical stripes.

From: https://doi.org/10.1364/OE.17.008567

Parameters:
  • img0 (numpy.ndarray) – Input image to handle.

  • wavelet (Wavelet object or name string, or 2-tuple of wavelets, optional) – Wavelet to use. This can also be a tuple containing a wavelet to apply along each axis in axes. More information in pywt.wavelist

  • level (int, optional) – Decomposition level.

  • sigma (float, optional) – Standard deviation to be considered in the gaussian filter applied during the wavelet decomposition.

Returns:

img – Output image

Return type:

numpy.ndarray