1
$\begingroup$

I'm interested in using a SWT to perform Multi Resolution Analysis over 3D data arrays. However I could not find any software package that implements it. The Matlab Toolbox of wavelets (the most complete I think) only has 3D DWT and 2D SWT, so my questions are:

  1. There exists a working implementation of 3D SWT out there?
  2. If not, how can I implement it? (some references maybe)
$\endgroup$
  • $\begingroup$ Have you checked the Wikipedia article on the topic? It has 8 references $\endgroup$ – nicoguaro Jun 12 '16 at 17:05
  • 1
    $\begingroup$ L2W implements a locally stationary wavelet approach, is that useful to you? Link: github.com/cran/LS2W $\endgroup$ – nicoguaro Jun 12 '16 at 17:07
  • $\begingroup$ I know this is YOUR question. But do you really need 3D SWT? It could be huge, and less efficient than other less redundant methods? $\endgroup$ – Laurent Duval Jun 12 '16 at 20:54
5
$\begingroup$

There as a general n-dimensional SWT for Python in the PyWavelets package as of the 0.5.0 release.

Basic usage with data stored in a NumPy array would be as follows (shown here for a 4-level decomposition and Debauchies 'db2' wavelet). PyWavelets uses the same wavelet naming conventions as the Matlab Wavelet Toolbox.

import pywt
coeffs = pywt.swtn(data, wavelet='db2', level=4)

The example above takes <2 seconds for a 128x128x128 data array on my system.

If you are willing to build from source, there is also an n-dimensional inverse SWT available in the master branch. Note that the inverse stationary wavelet transform is not currently implemented in a very efficient manner (particular for larger number of levels of decomposition).

In 3D, the SWT is redundant by a factor of (1 + 7*L) for an L-level decomposition (Although the implementation in PyWavelets currently returns the approximation coefficients at every level, not just the final one, leading to a redundancy of 8*L in 3D).

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Great news!! I hope PyWavelet package keep improving over time. $\endgroup$ – mavillan Jan 12 '17 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.