DSPRelated.com
Forums

1D discrete wavelet synthesis

Started by Umutesi Faith April 22, 2006
Hello

The IDWT consists of upsampling and filtering mechanism. For instance if
the signal is being reconstructed from its wavelet coefficients, does the
reconstruction start from the first decomposition level or the last one?

Moreover,if we upsample the signal (adding zeroes) does not this end up by
producing more samples than the original signal had.

For instance an original signal has just 16 samples, that is the  8
approximations coefficients, and 8 detail coefficients ( after first
decomposition level).If we want to reconstruct this single level.First the
coefficients are upsampled, we get 16 samples for each set of coefficient,
by adding them we end up with 32 samples instead of 16 we started with.

Is my interpretation correct or am i missing something in this process

Thanks in advance!


Umutesi Faith wrote:

> > Hello > > The IDWT consists of upsampling and filtering mechanism. For instance if > the signal is being reconstructed from its wavelet coefficients, does the > reconstruction start from the first decomposition level or the last one? > > Moreover,if we upsample the signal (adding zeroes) does not this end up by > producing more samples than the original signal had. > > For instance an original signal has just 16 samples, that is the 8 > approximations coefficients, and 8 detail coefficients ( after first > decomposition level).If we want to reconstruct this single level.First the > coefficients are upsampled, we get 16 samples for each set of coefficient, > by adding them we end up with 32 samples instead of 16 we started with. > > Is my interpretation correct or am i missing something in this process > > Thanks in advance!
Samplewise adding signals of 16 samples leads to 16 samples not 32. Say these two signals are x0[n] and x1[n], where n=1..16. Then y[n] = x0[n] + x1[n]. How did you manage to double the sample count? -- Jani Huhtanen Tampere University of Technology, Pori
Hi,
thanks for the reply.the thing that is confusing me is that for the
reconstruction we add zeroes between samples (upsampling). So for me if
the signal x0[n] had 8 samples, after upsampling we have 16 samples (
including those 8 zeroes)!!
Or does this simply mean that we do not take into account these zeroes
when adding for instance x0[n] and x1[n].

Did you mean that adding 2 signals of the same length gives a third signal
of the same length?

 Thanks in advance!

> >Samplewise adding signals of 16 samples leads to 16 samples not 32. Say >these two signals are x0[n] and x1[n], where n=1..16. Then y[n] = x0[n]
+
>x1[n]. How did you manage to double the sample count? > >-- >Jani Huhtanen >Tampere University of Technology, Pori >
Umutesi Faith wrote:

> Hi, > thanks for the reply.the thing that is confusing me is that for the > reconstruction we add zeroes between samples (upsampling). So for me if > the signal x0[n] had 8 samples, after upsampling we have 16 samples ( > including those 8 zeroes)!! > Or does this simply mean that we do not take into account these zeroes > when adding for instance x0[n] and x1[n]. > > Did you mean that adding 2 signals of the same length gives a third signal > of the same length? > > Thanks in advance! >
Below is a diagram of the synthesis part of the wavelet transform (one level): y0[n]--UpSample--x0[n]--G0(z)--z0[n]-- + ---> z[n] y1[n]--UpSample--x1[n]--G1(z)--z1[n]-- Say that y0[n] and y1[n] are defined for n=1..8 (i.e. 8 samples). After UpSample x0[n] and x1[n] are defined for n=1..16 (i.e. 16 samples), where x0[2*n] = y0[n], x0[2*n+1] = 0, and x1[2*n] = y1[n], x1[2*n+1] = 0. At this point the sample count has doubled from 8 to 16 for both detail and approximation parts. Next these upsampled signals x0 and x1 are filtered by G0 and G1 respectively. This does not increase the sample count. After filtering (i.e. convolution) we have signals z0 and z1 for n=1..16. These signals are summed _samplewise_, that is z[n] = z0[n] + z1[n], for n=1..16. Thus we end up with 16 samples. In your original post you ended up with 32 samples for the same situation. I'm still bit unclear how that happened. Hope this helped... -- Jani Huhtanen Tampere University of Technology, Pori
Hi,

It helps somehow, however this samplewise is still not clear to me. Anyway
thanks for the effort in you explanations.

I have just a little question if you don't mind though! It concerns the
sampling rate in the downsampling process.

for instance if a signal's sampling frequency is 1kHz, for 64 samples.
When we perfom a first stage DWT of this signal we get approximation
coefficients spanning from 0 to 250 Hz and detail coefficients from 250 to
500 Hz. It is said that the downsampling decreases the sampling rate! Is it
like this we can verify it,

for (sampling frequency) Fs = 1kz, 
(sampling rate) Ts = 1/1kHz = 0.1 s x 64 = 6.4 s
               

After downsampling we get half the number of samples
               Ts = 0.1s x 32 = 3.2 s


i am not sure if this is correct. I haven't found any easier way!

thanks in advance




Umutesi Faith wrote:

> Hi, > > It helps somehow, however this samplewise is still not clear to me. Anyway > thanks for the effort in you explanations.
Samplewise: Say that you have two signals x0 = [0, 1, 2, 3] and x1 = [7, 6, 5, 4]. If you sum x0 and x1 samplewise then you have a new signal x = [0+7, 1+6, 2+5, 3+4] = [7, 7, 7, 7]. Notice that the sample count did not double.
> > I have just a little question if you don't mind though! It concerns the > sampling rate in the downsampling process. > > for instance if a signal's sampling frequency is 1kHz, for 64 samples. > When we perfom a first stage DWT of this signal we get approximation > coefficients spanning from 0 to 250 Hz and detail coefficients from 250 to > 500 Hz. It is said that the downsampling decreases the sampling rate! Is > it like this we can verify it, >
Sampling frequency halves when you downsample by 2. Therefore, in a given time interval you have half as many samples as with the original signal. Say that the original sampling frequency is Fs = 1000Hz (as you said). Then 64 samples (x) corresponds to a time interval of 64/1000 s. After downsampling the sampling frequency halves (i.e. Fs2 = 500 Hz). Then 32 samples (y) will corrsepond to time interval of 32/500 s which is equal to 64/1000 s. Thus the sampling is just more sparse but y represents the same "part" of the original continuous signal as the signal x (as it should do). Hope this helped. -- Jani Huhtanen Tampere University of Technology, Pori
Umutesi Faith wrote:
> Hi, > > It helps somehow, however this samplewise is still not clear to me. Anyway > thanks for the effort in you explanations. > > I have just a little question if you don't mind though! It concerns the > sampling rate in the downsampling process. > > for instance if a signal's sampling frequency is 1kHz, for 64 samples. > When we perfom a first stage DWT of this signal we get approximation > coefficients spanning from 0 to 250 Hz and detail coefficients from 250 to > 500 Hz. It is said that the downsampling decreases the sampling rate! Is it > like this we can verify it, > > for (sampling frequency) Fs = 1kz, > (sampling rate) Ts = 1/1kHz = 0.1 s x 64 = 6.4 s > > > After downsampling we get half the number of samples > Ts = 0.1s x 32 = 3.2 s > > > i am not sure if this is correct. I haven't found any easier way! > > thanks in advance
Umutesi, You're lost in the details. This has nothing to do with wavelets. It is a matter of conservation. A signal sampled at rate T for a time T contains R*T samples. The same signal sampled for the same time at a rate R', or the initial sampling converted to R', contains R'*T samples. When R' = k*R and k = 2 or 1/2, you get the results that puzzle you. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Moi,
Kiitos paljon, it really helps to get to understand all these small
details! Thanks for your time!

>Samplewise: > >Say that you have two signals x0 = [0, 1, 2, 3] and x1 = [7, 6, 5, 4].
If
>you sum x0 and x1 samplewise then you have a new signal x = [0+7, 1+6,
2+5,
>3+4] = [7, 7, 7, 7]. Notice that the sample count did not double. > > >Sampling frequency halves when you downsample by 2. Therefore, in a
given
>time interval you have half as many samples as with the original signal. >Say that the original sampling frequency is Fs = 1000Hz (as you said).
Then
>64 samples (x) corresponds to a time interval of 64/1000 s. After >downsampling the sampling frequency halves (i.e. Fs2 = 500 Hz). Then 32 >samples (y) will corrsepond to time interval of 32/500 s which is equal
to
>64/1000 s. Thus the sampling is just more sparse but y represents the
same
>"part" of the original continuous signal as the signal x (as it should
do).
> >Hope this helped. > >-- >Jani Huhtanen >Tampere University of Technology, Pori >