wavelib Documentation

repository·master·Indexed 19 days ago

https://github.com/rafat/wavelib

A high-performance C library for wavelet transform algorithms. It provides implementations for Discrete Wavelet Transforms (DWT, SWT, MODWT), Continuous Wavelet Transforms (CWT), and Discrete Packet Transforms (DWPT), including both forward and inverse capabilities for signal analysis and processing.

Tokens
495
Snippets
1
Records
5
Agent score
16%

What's inside wavelib

  1. Overview of wavelib wavelet transform implementations

    master
    wavelib is a C implementation of various wavelet transform methods, including Discrete Wavelet Transforms (DWT, SWT, MODWT), Continuous Wavelet Transforms (CWT), and Discrete Packet Transforms (DWPT). It provides both forward and inverse transform capabilities for signal analysis and processing.
  2. Use Continuous Wavelet Transform (CWT)

    master
    wavelib includes a C translation of the Continuous Wavelet Transform software by C. Torrence and G. Compo. It also includes a generalized Inverse Transform (ICWT) that provides approximate reconstruction.
  3. Choose the appropriate Discrete Wavelet Packet Transform (DWPT) method

    master

    For packet decomposition, wavelib offers two distinct approaches:

    • WTREE: A fully decimated Wavelet Tree Decomposition. This is a highly redundant transform that retains all coefficients at each node. It is not recommended for compression or denoising applications.
    • DWPT/IDWPT: A derivative of the WTREE method that uses entropy methods to retain coefficients. This is a non-redundant transform where the output length is of the same order as the input.
  4. Choose the appropriate Discrete Wavelet Transform (DWT) method

    master

    wavelib provides several flavors of discrete transforms depending on your signal requirements:

    • DWT/IDWT and DWT2/IDWT2: Decimated implementations using implicit signal extension and up/downsampling for high performance. Supports both periodic and symmetric extension options.
    • SWT/ISWT and SWT2/ISWT2: Stationary Wavelet Transform. Constraint: The signal length must be a multiple of $2^J$, where $J$ is the number of decomposition levels.
    • MODWT/IMODWT and MODWT2/IMODWT2: Maximal Overlap Discrete Wavelet Transform. This is an undecimated transform that works for signals of any length. Constraint: Only orthogonal wavelets (such as Daubechies, Symlets, and Coiflets) can be used with this method.
  5. Use wavelib in Javascript or Typescript via wasmlets

    master

    For web or Node.js environments, you can use the wasmlets npm package, which is built on top of wavelib using WebAssembly.

    # Refer to the wasmlets package on npm
    npm install wasmlets