# Matlab Wavelet (Haar Filter) Discrepancy

Started by March 7, 2013
```The 2x2 Haar wavelet transform is :  1/sqrt(2) * [1    1
1   -1]

which equals [0.7071  0.7071  <-- first row is low pass
0.7071 -0.7071] <-- second row is high pass

In Matlab, I run [lo_d hi_d lo_r hi_r] = wfilters('haar') and I extract
lo_d and hi_d which are the values for the low pass and high pass and it
returns

[0.7071 0.7071    <-- first row is low pass
-0.7071 0.7071]   <-- second row is high pass

There is a discrepancy in the second row.  The second row from the Matlab
output is incorrect.  Does anyone know?

```
```On Thursday, March 7, 2013 11:11:02 AM UTC-8, clutchfft wrote:
> The 2x2 Haar wavelet transform is :  1/sqrt(2) * [1    1
>                                                   1   -1]
>
> which equals [0.7071  0.7071  <-- first row is low pass
>               0.7071 -0.7071] <-- second row is high pass
>

What is your reference for this? By what equation are these coefficients applied to data?

> In Matlab, I run [lo_d hi_d lo_r hi_r] = wfilters('haar') and I extract
> lo_d and hi_d which are the values for the low pass and high pass and it
> returns
>              [0.7071 0.7071    <-- first row is low pass
>              -0.7071 0.7071]   <-- second row is high pass

By what equation are these coefficients applied to data?

>
> There is a discrepancy in the second row.  The second row from the Matlab
> output is incorrect.  Does anyone know?

What do you think is the nature of the discrepancy? Why does it matter?

Dale B. Dalrymple

```
```>On Thursday, March 7, 2013 11:11:02 AM UTC-8, clutchfft wrote:
>> The 2x2 Haar wavelet transform is :  1/sqrt(2) * [1    1
>>                                                   1   -1]
>>
>> which equals [0.7071  0.7071  <-- first row is low pass
>>               0.7071 -0.7071] <-- second row is high pass
>>
>
>What is your reference for this? By what equation are these coefficients
applied to data?
>
>> In Matlab, I run [lo_d hi_d lo_r hi_r] = wfilters('haar') and I extract
>> lo_d and hi_d which are the values for the low pass and high pass and
it
>> returns
>>              [0.7071 0.7071    <-- first row is low pass
>>              -0.7071 0.7071]   <-- second row is high pass
>
>By what equation are these coefficients applied to data?
>
>>
>> There is a discrepancy in the second row.  The second row from the
Matlab
>> output is incorrect.  Does anyone know?
>
>What do you think is the nature of the discrepancy? Why does it matter?
>
>Dale B. Dalrymple
>
>

It would affect the Wavelet transform decomposition.  If I had used the one
from Matlab, it would be incorrect
```
```> It would affect the Wavelet transform decomposition.

How? (That is a serious question!)

> If I had used the one from Matlab, it would be incorrect

To what effect? (Hint: what effect does it have on the power spectrum?)

Dale B. Dalrymple

```
```>
>> It would affect the Wavelet transform decomposition.
>
>How? (That is a serious question!)
>
>> If I had used the one from Matlab, it would be incorrect
>
>To what effect? (Hint: what effect does it have on the power spectrum?)
>
>
>Dale B. Dalrymple
>
>

I'm sorry.  I really don't know.  I'm not an EE Major but rather a CS major
trying to implement something for image processing project.

Can you help?
```
```On Thursday, March 7, 2013 6:27:33 PM UTC-8, clutchfft wrote:
> ...
> I'm sorry.  I really don't know.  I'm not an EE Major but rather a CS major
> trying to implement something for image processing project.
>
> Can you help?

I'm sorry, but if you can't answer those questions you aren't qualified to interpret wavelet marketing papers from 1997 conferences and to select flavors of wavelets without adult supervision.

Consider studying:
The Scientist and Engineer's Guide to Digital Signal Processing
By Steven W. Smith, Ph.D.
at http://www.dspguide.com/
or a local favorite:
Understanding Digital Signal Processing [Hardcover]
Richard G. Lyons
is a good book to have in hand.

Google will find you many educational resources on the net where you can decide for yourself which resources are at the right level for you.

As I said to you before in another thread, good luck!

Dale B. Dalrymple

```
```>On Thursday, March 7, 2013 6:27:33 PM UTC-8, clutchfft wrote:
>> ...
>> I'm sorry.  I really don't know.  I'm not an EE Major but rather a CS
major
>> trying to implement something for image processing project.
>>
>> Can you help?
>
>I'm sorry, but if you can't answer those questions you aren't qualified to
interpret wavelet marketing papers from 1997 conferences and to select
flavors of wavelets without adult supervision.
>
>Consider studying:
>The Scientist and Engineer's Guide to Digital Signal Processing
>By Steven W. Smith, Ph.D.
>at http://www.dspguide.com/
>or a local favorite:
>Understanding Digital Signal Processing [Hardcover]
>Richard G. Lyons
>is a good book to have in hand.
>
>Google will find you many educational resources on the net where you can
decide for yourself which resources are at the right level for you.
>
>As I said to you before in another thread, good luck!
>
>Dale B. Dalrymple
>
>