dwt

package module
v0.0.0-...-2950c03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2015 License: MIT Imports: 1 Imported by: 0

README

GoDoc Build Status Coverage Status

dwt

dwt is simply a GO port of Gregoire Pau's 'Fast Discrete Bi-orthogonal CDF Wavelet Transform' examples.

See dwt97.c, CDF 5/3 Discrete Wavelet Transform: dwt53.c, CDF 9/7 Discrete Wavelet Transform: dwt97.c or waveletcdf97 for details.

Getting
go get github.com/2bad4u/dwt
Usage

  import "github.com/2bad4u/dwt"

  func foo() {
    xn := make([]float64, 32)
    for i := 0; i < 32; i++ {
    	x[i] = 5.0 + float64(i) + 0.4*float64(i*i) - 0.02*float64(i*i*i)
    }

    // transform xn with CDF 9/7, or CDF 5/3: Fwt53(xn)
    Fwt97(xn)

    // xn contains the transformation result
    ...

    // restore signal with inverse transform, use Iwt53(xn) for CDF 5/3
    Iwt97(xn)

    ...
  }

Documentation

Overview

Package dwt provides CDF 5/3 & 9/7 Wavelet Transformations.

This is as port of Gregoire Pau's C implementation dwt97.c and dwt53.c.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fwt53

func Fwt53(xn []float64)

Fwt53 performs a bi-orthogonal 5/3 wavelet transformation (lifting implementation) of the signal in slice xn. The length of the signal n = len(xn) must be a power of 2.

The input in slice xn will be replaced by the transformation:

The first half part of the output signal contains the approximation coefficients. The second half part contains the detail coefficients (aka. the wavelets coefficients).

func Fwt97

func Fwt97(xn []float64)

Fwt97 performs a bi-orthogonal 9/7 wavelet transformation (lifting implementation) of the signal in slice xn. The length of the signal n = len(xn) must be a power of 2.

The input slice xn will be replaced by the transformation:

The first half part of the output signal contains the approximation coefficients. The second half part contains the detail coefficients (aka. the wavelets coefficients).

func Iwt53

func Iwt53(xn []float64)

Iwt53 performs an inverse bi-orthogonal 5/3 wavelet transformation of xn. This is the inverse function of Fwt53 so that Iwt53(Fwt53(xn))=xn for every signal xn of length n.

The length of slice xn must be a power of 2.

The coefficients provided in slice xn are replaced by the original signal.

func Iwt97

func Iwt97(xn []float64)

Iwt97 performs an inverse bi-orthogonal 9/7 wavelet transformation of xn. This is the inverse function of Fwt97 so that Iwt97(Fwt97(xn))=xn for every signal xn of length n.

The length of slice xn must be a power of 2.

The coefficients provided in slice xn are replaced by the original signal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL