Python API

A despeckling/denoising Toolbox for SAR/InSAR written in OpenCL

despeckcl.boxcar(ampl_master, ampl_slave, phase, window_width, enabled_log_levels=['error', 'warning', 'fatal'])

Filters the input with a boxcar filter

Parameters:
  • ampl_master (ndarray) – the amplitude of the master image
  • ampl_slave (ndarray) – the amplitude of the slave image
  • phase (ndarray) – the interferometric phase of the master and slave images
  • window_width (int) – the window width of the boxcar window, has to be an odd number
Returns:

a tuple containing the reflectivity, phase and coherence estimates

Return type:

tuple of ndarrays

despeckcl.goldstein(ampl_master, ampl_slave, phase, patch_size, overlap, alpha, enabled_log_levels=['error', 'warning', 'fatal'])

Filters the input with the Goldstein filter

Parameters:
  • ampl_master (ndarray) – the amplitude of the master image
  • ampl_slave (ndarray) – the amplitude of the slave image
  • phase (ndarray) – the interferometric phase of the master and slave images
  • patch_size (int) – width of the patch for each 2D FFT
  • overlap (int) – overlap of the patches
  • alpha (float) – strength of filtering
  • enabled_log_levels ([string]) – enabled log levels, log levels are: error, fatal, warning, debug, info
Returns:

a tuple containing the reflectivity, phase and coherence estimates

Return type:

tuple of ndarrays

despeckcl.nlinsar(ampl_master, ampl_slave, phase, search_window_size, patch_size, niter, lmin, enabled_log_levels=['error', 'warning', 'fatal'])

Filters the input with the NLInSAR filter

Parameters:
  • ampl_master (ndarray) – the amplitude of the master image
  • ampl_slave (ndarray) – the amplitude of the slave image
  • phase (ndarray) – the interferometric phase of the master and slave images
  • search_window_size (int) – width of the search window, has to be an odd number
  • patch_size (int) – width of the patch, has to be an odd number
  • niter (int) – number of iterations
  • lmin (int) – minimum number of looks for the smoothing step
  • enabled_log_levels ([string]) – enabled log levels, log levels are: error, fatal, warning, debug, info
Returns:

a tuple containing the reflectivity, phase and coherence estimates

Return type:

tuple of ndarrays

despeckcl.nlsar(covmat_raw, search_window_size, patch_sizes, scale_sizes, nlsar_stats, h=15.0, c=49.0, enabled_log_levels=['error', 'warning', 'fatal'])

filters the input with the nlsar filter

Parameters:
  • covmat_raw (ndarray) – unfiltered covariance/scattering matrix
  • search_window_size (int) – width of the search window, has to be an odd number
  • patch_sizes ([int]) – widths of the patches, have to be odd numbers
  • scale_sizes ([int]) – widths of the scales, have to be odd numbers
  • std::map nlsar_stats (wrapped) – statistics of a homogenous training area produced by nlsar_train
  • h (float) – nonlocal smoothing parameter
  • c (float) – degrees of freedom of Chi-squared distribution
  • enabled_log_levels ([string]) – enabled log levels, log levels are: error, fatal, warning, debug, info
Returns:

a tuple containing the reflectivity, phase and coherence estimates

Return type:

tuple of ndarrays

despeckcl.nlsar_insar(ampl_master, ampl_slave, phase, search_window_size, patch_sizes, scale_sizes, nlsar_stats, h=15.0, c=49.0, enabled_log_levels=['error', 'warning', 'fatal'])

filters the input with the nlsar filter

Parameters:
  • ampl_master (ndarray) – the amplitude of the master image
  • ampl_slave (ndarray) – the amplitude of the slave image
  • phase (ndarray) – the interferometric phase of the master and slave images
  • search_window_size (int) – width of the search window, has to be an odd number
  • patch_sizes ([int]) – widths of the patches, have to be odd numbers
  • scale_sizes ([int]) – widths of the scales, have to be odd numbers
  • std::map nlsar_stats (wrapped) – statistics of a homogenous training area produced by nlsar_train
  • h (float) – nonlocal smoothing parameter
  • c (float) – degrees of freedom of Chi-squared distribution
  • enabled_log_levels ([string]) – enabled log levels, log levels are: error, fatal, warning, debug, info
Returns:

a tuple containing the reflectivity, phase and coherence estimates

Return type:

tuple of ndarrays