📄 wavelet.h
字号:
#ifndef __WAVELET_H_
#define __WAVELET_H_
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Port to C from C++
*
* Mow-Song, Ng 2/9/2002
* msng@mmu.edu.my
* http://www.pesona.mmu.edu.my/~msng
*
* I do not claim copyright to the code, but if you use them or modify them,
* please drop me a mail.
*
*/
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/* Original copyright info */
/*---------------------------------------------------------------------------*/
// Baseline Wavelet Transform Coder Construction Kit
//
// Geoff Davis
// gdavis@cs.dartmouth.edu
// http://www.cs.dartmouth.edu/~gdavis
//
// Copyright 1996 Geoff Davis 9/11/96
//
// Permission is granted to use this software for research purposes as
// long as this notice stays attached to this software.
//
/*---------------------------------------------------------------------------*/
#include <stdlib.h>
#include <stdio.h>
#include "global.h"
#include "filter.h"
#include "memchk.h"
typedef struct WaveletStruct {
FILTER *analysisLow, *analysisHigh; // H and G
FILTER *synthesisLow, *synthesisHigh; // H~ and G~
int symmetric; // TRUE if filter set is symmetric
int npad;
} WAVELET;
WAVELET *WaveletAlloc(FILTERSET *filterset);
void WaveletDealloc(WAVELET *wavelet);
void WaveletTransform1D(WAVELET *wavelet, Real *input, Real *output, int size,
int nsteps, int symExt);
void WaveletInvert1D(WAVELET *wavelet, Real *input, Real *output, int size,
int nsteps, int symExt);
void WaveletTransform2D(WAVELET *wavelet, Real *input, Real *output, int hsize, int vsize,
int nsteps, int symExt);
void WaveletInvert2D(WAVELET *wavelet, Real *input, Real *output, int hsize, int vsize,
int nsteps, int symExt);
void WaveletSymmetricExtension(WAVELET *wavelet, Real *output, int size, int leftExt, int
rightExt, int symmetry);
void WaveletPeriodicExtension(WAVELET *wavelet, Real *output, int size);
void WaveletTransformStep (WAVELET *wavelet, Real *input, Real *output, int size, int symExt);
void WaveletInvertStep (WAVELET *wavelet, Real *input, Real *output, int size, int symExt);
void copy (const Real *p1, Real *p2, const int length);
void copy_p1_skip (const Real *p1, const int stride1, Real *p2, const int length);
void copy_p2_skip (const Real *p1, Real *p2, const int stride2, const int length);
void WaveletError(char *fmt, ...);
void WaveletWarning(char *fmt, ...);
extern FILTERSET *Haar, *Daub4, *Daub6, *Daub8, *Antonini,
*Villa1810, *Adelson, *Brislawn, *Brislawn2,
*Villa1, *Villa2, *Villa3, *Villa4, *Villa5,
*Villa6, *Odegard;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -