Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coefficients are shifted after forward transfrom #2

Open
senpai-a opened this issue Dec 29, 2019 · 4 comments
Open

Coefficients are shifted after forward transfrom #2

senpai-a opened this issue Dec 29, 2019 · 4 comments

Comments

@senpai-a
Copy link

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.

@pierrepaleo
Copy link
Owner

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.

@senpai-a
Copy link
Author

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
Copy link
Author

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

@senpai-a senpai-a reopened this Oct 12, 2020
@pierrepaleo
Copy link
Owner

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

DOI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants