143 lines
4.2 KiB
C++
143 lines
4.2 KiB
C++
/*
|
|
* wavelet.h
|
|
*
|
|
* Created on: April 11, 2011
|
|
* Author: Rafat Hussain
|
|
*/
|
|
|
|
#ifndef WAVELET_H_
|
|
#define WAVELET_H_
|
|
#include <vector>
|
|
#include <complex>
|
|
using namespace std;
|
|
|
|
|
|
// 1D Functions
|
|
void* dwt(vector<double> &, int ,string , vector<double> &, vector<double> &);
|
|
|
|
void* dwt1(string, vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
void* dyadic_zpad_1d(vector<double> &);
|
|
|
|
double convol(vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
int filtcoef(string , vector<double> &, vector<double> &, vector<double> &,
|
|
vector<double> &);
|
|
|
|
void downsamp(vector<double> &, int , vector<double> &);
|
|
|
|
void upsamp(vector<double> &, int, vector<double> &);
|
|
|
|
void circshift(vector<double> &, int );
|
|
|
|
int sign(int);
|
|
|
|
void* gnudwtplot(int);
|
|
|
|
void* idwt(vector<double> &,vector<double> &, string , vector<double> &) ;
|
|
|
|
void* idwt1(string wname, vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
int vecsum(vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
|
|
|
|
// 1D Symmetric Extension DWT Functions
|
|
|
|
|
|
|
|
void* dwt_sym(vector<double> &, int ,string , vector<double> &,vector<double> &,
|
|
vector<int> &, int );
|
|
|
|
void* dwt1_sym(string , vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
void* idwt_sym(vector<double> &,vector<double> &, string,vector<double> &, vector<int> &);
|
|
|
|
void* symm_ext(vector<double> &, int );
|
|
|
|
void* idwt1_sym(string, vector<double> &, vector<double> &, vector<double> &); // Not Tested
|
|
|
|
// 1D Stationary Wavelet Transform
|
|
|
|
void* swt(vector<double> &, int , string , vector<double> &, int &) ;
|
|
|
|
void* iswt(vector<double> &,int , string, vector<double> &);
|
|
|
|
void* gnuswtplot(int );
|
|
|
|
void* per_ext(vector<double> &, int );
|
|
|
|
|
|
|
|
|
|
// 2D Functions
|
|
|
|
void* branch_lp_dn(string , vector<double> &, vector<double> &);
|
|
|
|
void* branch_hp_dn(string , vector<double> &, vector<double> &);
|
|
|
|
void* branch_lp_hp_up(string ,vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
void* dwt_2d(vector<vector<double> > &, int , string , vector<vector<double> > &
|
|
, vector<double> &) ;
|
|
|
|
void* idwt_2d(vector<vector<double> > &,vector<double> &, string ,vector<vector<double> > &);
|
|
|
|
void* dyadic_zpad_2d(vector<vector<double> > &,vector<vector<double> > &);
|
|
|
|
void* dwt_output_dim(vector<vector<double> >&, int &, int & );
|
|
|
|
void* zero_remove(vector<vector<double> > &,vector<vector<double> > &) ;
|
|
|
|
void* getcoeff2d(vector<vector<double> > &, vector<vector<double> > &,
|
|
vector<vector<double> > &,vector<vector<double> > &,vector<double> &, int &);
|
|
|
|
void* idwt2(string ,vector<vector<double> > &, vector<vector<double> > &,
|
|
vector<vector<double> > &, vector<vector<double> > &, vector<vector<double> > &);
|
|
|
|
void* dwt2(string ,vector<vector<double> > &, vector<vector<double> > &,
|
|
vector<vector<double> > &, vector<vector<double> > &, vector<vector<double> > &);
|
|
|
|
void* downsamp2(vector<vector<double> > &,vector<vector<double> > &, int, int);
|
|
|
|
void* upsamp2(vector<vector<double> > &,vector<vector<double> > &, int, int);
|
|
|
|
// 2D DWT (Symmetric Extension) Functions
|
|
|
|
void* dwt_2d_sym(vector<vector<double> > &, int , string , vector<double> &, vector<double> & ,
|
|
vector<int> &, int );
|
|
|
|
void* dwt2_sym(string ,vector<vector<double> > &, vector<vector<double> > &,
|
|
vector<vector<double> > &, vector<vector<double> > &, vector<vector<double> > &);
|
|
|
|
void* idwt_2d_sym(vector<double> &,vector<double> &, string ,vector<vector<double> > &,
|
|
vector<int> &);
|
|
|
|
void* circshift2d(vector<vector<double> > &, int , int );
|
|
|
|
void symm_ext2d(vector<vector<double> > &,vector<vector<double> > &, int );
|
|
|
|
void* dispDWT(vector<double> &,vector<vector<double> > &, vector<int> &, vector<int> &, int ) ;
|
|
|
|
void* dwt_output_dim_sym(vector<int> &,vector<int> &, int );
|
|
|
|
//2D Stationary Wavelet Transform
|
|
|
|
void* swt_2d(vector<vector<double> > &,int , string , vector<double> &);
|
|
|
|
void* per_ext2d(vector<vector<double> > &,vector<vector<double> > &, int );
|
|
|
|
// FFT functions
|
|
|
|
|
|
double convfft(vector<double> &, vector<double> &, vector<double> &);
|
|
|
|
void* fft(vector<complex<double> > &,int ,unsigned int);
|
|
|
|
void* bitreverse(vector<complex<double> > &);
|
|
|
|
void* freq(vector<double> &, vector<double> &);
|
|
|
|
|
|
#endif /* WAVELET_H_ */
|