1 #ifndef __WAVELETTRANSFORM_HH__
2 #define __WAVELETTRANSFORM_HH__
4 #include "waveletanalysis.hh"
5 #include "convolution.hh"
6 #include "movingaverage.hh"
30 template <
class iDerived,
class oDerived>
31 void operator() (
const Eigen::DenseBase<iDerived> &signal, Eigen::DenseBase<oDerived> &out)
34 int N = signal.size();
41 blockIdxs[j] = blockIdxs[j-1] +
_filterBank[j-1]->numKernels();
54 size_t outCol = blockIdxs[j];
60 filters->
apply(signal, out.block(0, outCol, N, K).derived());
69 int n = WT_IDIV_CEIL(N,M);
74 for (
int m=0; m<M; m++) {
76 for (
int i=0; i<n; i++) {
77 subsig[i] = ((i*M+m) < N) ? CScalar(signal[i*M+m]) : 0;
80 filters->
apply(subsig, subres.derived());
82 for (
int i=0; i<n; i++) {
84 out.block(i*M+m, outCol, 1, K) = subres.row(i);
104 #endif // __WAVELETTRANSFORM_HH__
Abstract base class of all wavelet analyses (transform and synthesis).
Definition: waveletanalysis.hh:16
const Wavelet & wavelet() const
Returns the wavelet instance of this transform.
Definition: waveletanalysis.hh:41
const RVector & scales() const
Returns the scales of the wavelet transform.
Definition: waveletanalysis.hh:33
Base class of all wavelet object containers.
Definition: wavelet.hh:40
size_t numKernels() const
Returns the number of kernels.
Definition: convolution.hh:125
Definition: convolution.hh:7
Implements the overlap-add covolution of a signal with several filter kernels of the same size...
Definition: convolution.hh:19
size_t subSampling() const
Returns the sub-sampling assinged to the convolution operation.
Definition: convolution.hh:128
void apply(const Eigen::DenseBase< iDerived > &signal, Eigen::DenseBase< oDerived > &out)
Performs the convolution of the signal passed by signal with the kernels passed to the constructor...
Definition: convolution.hh:32