mirror of
https://github.com/simon987/wavelib.git
synced 2025-04-10 14:06:46 +00:00
commit : wrcoeftest added
This commit is contained in:
parent
e35df26b18
commit
de4b96e123
@ -135,8 +135,10 @@ void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level,
|
||||
}
|
||||
|
||||
//idwt_per(wt,out, det_len, wt->output + iter, det_len, X_lp);
|
||||
m = -2;
|
||||
n = -1;
|
||||
|
||||
for (i = 0; i < lf + l2 - 1; ++i) {
|
||||
for (i = 0; i < det_len + l2 - 1; ++i) {
|
||||
m += 2;
|
||||
n += 2;
|
||||
X_lp[m] = 0.0;
|
||||
@ -181,7 +183,6 @@ void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level,
|
||||
|
||||
X_lp = (double*)malloc(sizeof(double)* (N + 2 * lf - 1));
|
||||
|
||||
|
||||
for (i = 0; i < det_len; ++i) {
|
||||
out[i] = coeff[i];
|
||||
}
|
||||
@ -195,6 +196,7 @@ void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level,
|
||||
} else {
|
||||
filt = lpr;
|
||||
}
|
||||
|
||||
//idwt_sym(wt, out, det_len, wt->output + iter, det_len, X_lp);
|
||||
|
||||
m = -2;
|
||||
@ -210,7 +212,7 @@ void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level,
|
||||
t = 2 * l;
|
||||
if ((i - l) >= 0 && (i - l) < det_len) {
|
||||
X_lp[m] += filt[t] * out[i - l];
|
||||
X_lp[n] += filt[t + 1] * out[i - l] + filt[t + 1] * out[i - l];
|
||||
X_lp[n] += filt[t + 1] * out[i - l];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ void getDWTAppx(wt_object wt, double *appx,int N);
|
||||
|
||||
void getDWTDetail(wt_object wt, double *detail, int N, int level);
|
||||
|
||||
void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level, int J,double *lpr,
|
||||
double *hpr,int lf,int siglength,double *reccoeff);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -16,6 +16,9 @@ void visushrink(double *signal,int N,int J,char *wname,char *method,char *ext,ch
|
||||
|
||||
void sureshrink(double *signal,int N,int J,char *wname,char *method,char *ext,char *thresh,double *denoised);
|
||||
|
||||
void getDWTRecCoeff(double *coeff,int *length,char *ctype,char *ext, int level, int J,double *lpr,
|
||||
double *hpr,int lf,int siglength,double *reccoeff);
|
||||
|
||||
double mad(double *x, int N);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user