PDWT icon indicating copy to clipboard operation
PDWT copied to clipboard

Coefficients are shifted after forward transfrom

Open senpai-a opened this issue 6 years ago • 4 comments

Hello there. I'm using Wavelets::forward() to perfrom DWT and Wavelets::get_coeff() to get my result.

Here are 2 images I tested: img lennagray

The wavelet used here is "db8", and here are the results: coeff lennaCoeff

I compared them with the output from another DWT library (Rice Wavelets Toolbox), who gives these: coeffrwt lennaCoeffrwt

I found that the spatial position of the coefficients seems to be shifted by a small amount.

I'm no an expert at signal processing so I don't know whether this is a bug or a non-critical issue.

senpai-a avatar Dec 29 '19 16:12 senpai-a

Hi @senpai-a

There are several reasons that might explain why the coefficients are shifted:

  • The transform is not computed with the same boundary handling methods. PDWT always uses the periodic method, while other software use a symmetric extension by default.
  • The filters used for "db8" are not exactly the same in both cases (less likely).

PDWT is tested against (somewhat old versions of) Pywavelets, and should be compatible with it, and therefore with the Matlab "wavelets" toolbox. I don't know how the RICE wavelets toolkit does the computations.

pierrepaleo avatar Dec 29 '19 17:12 pierrepaleo

I see. Thx for the explaination. Closing this issue. BTW, is there a way I could cite this work? I might use it for some research.

senpai-a avatar Dec 29 '19 17:12 senpai-a

Hello @pierrepaleo , can you generate a DOI for this repo so that I can cite.

senpai-a avatar Oct 12 '20 17:10 senpai-a

Hi @senpai-a thanks for the idea, I just generated the DOI and updated README.md.

DOI

pierrepaleo avatar Oct 13 '20 06:10 pierrepaleo