dwt Module

dwt.dwt(signal, wav='haar', levels=-1, mode='zpd')

Performs a dwt on a given signal.

This function performs a dwt on signal using CUDA GPU.

Parameters:
  • signal (list, numpy array) – signal
  • wav (string) – Wavelet to use while performing dwt. Full list of available wavelets can be found ...
  • levels (int) – Number of levels of dwt to perform. If levels=-1, full decomposition is done, equivalent to levels = floor(log(len(signal), 2))
  • mode (string) – Padding mode to use to deal with boundary conditions. Full list of available padding modes can be found ...
Returns:

transformed signal

Return type:

list of arrays

dwt.dwt2(image, wav='haar', mode='zpd')

Performs a 2-dimensional dwt on an image.

This function performs a 2-dimensional dwt on an image using CUDA GPU.

Parameters:
  • image (list of lists, 2-d numpy array) – image
  • wav (string) – Wavelet to use while performing 2-dimensional dwt. Full list of available wavelets can be found ...
  • mode (string) – Padding mode to use to deal with boundary conditions. Full list of available padding modes can be found ...
Returns:

transformed image

Return type:

2-tuple containing (cA, (cH, cV, cD))

dwt.idwt(transformed, wav='haar', levels=-1, mode='zpd')

Performs an inverse dwt on a given transformed signal.

This function performs an inverse dwt on a transformed signal using CUDA GPU.

Parameters:
  • transformed (list, numpy array) – transformed signal
  • wav (string) – Wavelet to use while performing inverse dwt. Full list of available wavelets can be found ...
  • levels (int) – Number of levels of inverse dwt to perform. If levels=-1, full decomposition is done, equivalent to levels = floor(log(len(signal), 2))
  • mode (string) – Padding mode to use to deal with boundary conditions. Full list of available padding modes can be found ...
Returns:

inverted signal

Return type:

numpy array

dwt.idwt2(transformed, wav='haar', mode='zpd')

Performs a 2-dimensional inverse dwt on a transformed image.

This function performs a 2-dimensional inverse dwt on a transformed image using CUDA GPU.

Parameters:
  • transformed (list of lists, 2-d numpy array) – transformed image
  • wav (string) – Wavelet to use while performing inverse 2-dimensional dwt. Full list of available wavelets can be found ...
  • mode (string) – Padding mode to use to deal with boundary conditions. Full list of available padding modes can be found ...
Returns:

inverted image

Return type:

2-d numpy array

dwt.plot(coefs, quiet=False, fig=None)

Plots each level of wavelet coefficients on its own set of axes.

Parameters:coefs (list of numpy arrays) – wavelet-transformed 1-D signal
dwt.scalogram(coefs, do_scaling=1, scale_power=0.3, log_y_axis=1, create_bar=1)

Creates and displays a scalogram from a set of wavelet-transformed coefficients.

Parameters:
  • coefs (list of numpy arrays) – wavelet-transformed 1-D signal
  • do_scaling (boolean) – Determines whether detail coefficients are magnified to increase the emphasis placed on them.
  • scale_power (floating-point value between (0,1) exclusive) – If do_scaling is on, this controls how much emphasis is placed on the detail coefficients. Smaller values mean more emphasis.
  • log_y_axis (boolean) – If set to 1, this causes the levels to be evenly spaced along the vertical axis. This distorts frequency interpretation.
  • create_bar (boolean) – When set, this creates a vertical bar next to the graph the displays the relative power of each level of coefficients.

Previous topic

dctCuda Module

Next topic

dwtCuda Module

This Page