DWT

DWT — Discrete Wavelet Transform

Functions

Types and Values

Includes

#include <libgwyddion/gwyddion.h>

Description

Functions

gwy_dwt_type_get_enum()

const GwyEnum *
gwy_dwt_type_get_enum (void);

Returns GwyEnum for GwyDWTType enum type.

Returns

NULL-terminated GwyEnum which must not be modified nor freed.


gwy_dwt_denoise_type_get_enum()

const GwyEnum *
gwy_dwt_denoise_type_get_enum (void);

Returns GwyEnum for GwyDWTDenoiseType enum type.

Returns

NULL-terminated GwyEnum which must not be modified nor freed.


gwy_dwt_set_coefficients()

GwyLine *
gwy_dwt_set_coefficients (GwyLine *dline,
                          GwyDWTType type);

Fills resampled or nely allocated data line with wavelet coefficients.

Parameters

dline

Data line to store wavelet coefficients to (or NULL to allocate a new one).

[nullable]

type

Wavelet type.

 

Returns

resampled or newly allocated GwyLine with wavelet coefficients.

[transfer none]


gwy_line_dwt()

void
gwy_line_dwt (GwyLine *dline,
              GwyLine *wt_coefs,
              GwyTransformDirection direction,
              gint minsize);

Performs steps of the wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = dline->res /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

dline

Data line to be transformed, it must have at least four samples.

 

wt_coefs

Data line where the wavelet transform coefficients are stored.

 

direction

Transform direction.

 

minsize

size of minimal transform result block

 

gwy_field_xdwt()

void
gwy_field_xdwt (GwyField *field,
                GwyLine *wt_coefs,
                GwyTransformDirection direction,
                gint minsize);

Performs steps of the X-direction image wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = field->xres /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

field

Data field to be transformed.

 

wt_coefs

Data line where the wavelet transform coefficients are stored.

 

direction

Transform direction.

 

minsize

size of minimal transform result block

 

gwy_field_ydwt()

void
gwy_field_ydwt (GwyField *field,
                GwyLine *wt_coefs,
                GwyTransformDirection direction,
                gint minsize);

Performs steps of the Y-direction image wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = field->yres /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

field

Data field to be transformed.

 

wt_coefs

Data line where the wavelet transform coefficients are stored.

 

direction

Transform direction.

 

minsize

size of minimal transform result block

 

gwy_field_dwt()

void
gwy_field_dwt (GwyField *field,
               GwyLine *wt_coefs,
               GwyTransformDirection direction,
               gint minsize);

Performs steps of the 2D image wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = field->xres /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

field

Data field to be transformed (must be square).

 

wt_coefs

Data line where the wavelet transform coefficients are stored.

 

direction

Transform direction.

 

minsize

size of minimal transform result block

 

gwy_field_dwt_mark_anisotropy()

void
gwy_field_dwt_mark_anisotropy (GwyField *field,
                               GwyField *mask,
                               GwyLine *wt_coefs,
                               gdouble ratio,
                               gint lowlimit);

Performs steps of the 2D image wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = field->xres /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

field

Data field to mark anisotropy of (must be square).

 

mask

Output mask field.

 

wt_coefs

Data line to store wavelet transform coefficients to.

 

ratio

Anisotropy threshold.

 

lowlimit

Size of minimal transform result block.

 

gwy_NIELD_dwt_mark_anisotropy()

void
gwy_NIELD_dwt_mark_anisotropy (GwyField *field,
                               GwyNield *mask,
                               GwyLine *wt_coefs,
                               gdouble ratio,
                               gint lowlimit);

Performs steps of the 2D image wavelet decomposition.

The smallest low pass coefficients block is equal to minsize . Run with minsize = field->xres /2 to perform one step of decomposition or minsize = 4 to perform full decomposition (or anything between).

Parameters

field

Data field to mark anisotropy of (must be square).

 

mask

Number field to fill with the output mask.

 

wt_coefs

Data line to store wavelet transform coefficients to.

 

ratio

Anisotropy threshold.

 

lowlimit

Size of minimal transform result block.

 

Types and Values

enum GwyDWTType

Members

GWY_DWT_HAAR

   

GWY_DWT_DAUB4

   

GWY_DWT_DAUB6

   

GWY_DWT_DAUB8

   

GWY_DWT_DAUB12

   

GWY_DWT_DAUB20

   

enum GwyDWTDenoiseType

Members

GWY_DWT_DENOISE_UNIVERSAL

   

GWY_DWT_DENOISE_SCALE_ADAPTIVE

   

GWY_DWT_DENOISE_SPACE_ADAPTIVE