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

Algorithm in basic and final estimate #18

Open
xiongjj opened this issue Jul 13, 2016 · 6 comments
Open

Algorithm in basic and final estimate #18

xiongjj opened this issue Jul 13, 2016 · 6 comments

Comments

@xiongjj
Copy link

xiongjj commented Jul 13, 2016

Hi, Mawen. I am learning on bm3d denoising algorithm based on this.
I've already forked on you bm3d project and it was really good work. I wanted to know that you implemented VapourSynth-BM3D on your own method or according to this paper?

Thanks for you help!

@mawen1250
Copy link
Member

Of course I've read the paper (which is the origin of BM3D).
I implemented the algorithm mostly according to it and its successors, like C-BM3D and V-BM3D.
For convenience I didn't implement some parts of it. For example I used DCT for all transformations.

@xiongjj
Copy link
Author

xiongjj commented Jul 15, 2016

Thanks for your reply.
The original of BM3D used bior1.5 in the basic estimate and dct in the final estimate.
Have you compared the performance(PSNR) of your implementation with the original BM3D matlab code?
I have got another implementation with c++ from IPOL and the performance is not as well as the original one.

@mawen1250
Copy link
Member

I've also read the paper from IPOL. It has compared the performance between different transformations, PSNR is about 0.5dB lower when all the transformations are DCT.
I've tested different parameters with the MATLAB code. I compared them both by PSNR and visually. Based on the results, I implemented my own BM3D with some simplifications.
There can be differences between it and the MATLAB one, but visually I can't tell which one is better.

@xiongjj
Copy link
Author

xiongjj commented Jul 15, 2016

Have you ever tried the original idea with bior 1.5 transformation in the basic estimate and dct transformation in the final estimate? 0.5dB lower on PSNR cannot be acceptable, so I want to get the same performance as the original BM3D on PSNR. The algorithm from IPOL implemented the original idea but PSNR still got 0.2dB lower than original matlab code.
Thanks for your kind reply.

@mawen1250
Copy link
Member

mawen1250 commented Jul 16, 2016

The reasons I chose DCT for all the transformations:

  1. I've tried it in the MATLAB code, the visual difference between them is acceptable (actually I can't tell which is better).
  2. Obviously it's more convenient, and probably more efficient. Since I can just use FFTW3 to do the 3D transformation all at the same time, and FFTW3 can find a better routine to optimize it.
  3. Bior 1.5 transformation limits block_size to power2.
  4. According to those papers, the reason to use different transformations in basic and final is to avoid the artifacts produced in basic estimate being brought into final estimate. I found an alternative way to (partially) solve this, in all the profile, block_step in final estimate is smaller than the one in basic estimate. In my test, it can significantly increase the visual quality, producing much less artifacts.

Anyway, using the transformations suggested by the original paper might be a better choice, but I don't find it neccessary.
If there's something I can improve, I think it's the implementation of DCT. FFTW3 implements DCT by transferring it to DFT, which obviously is slower than implementing DCT directly.

@xiongjj
Copy link
Author

xiongjj commented Aug 11, 2016

I have a few question for this paper. Please help me if you know it. Thank you very much!

  • How to calculate different weights of aggregation in different pixels?
  • How to determine which pixel should be clipped in hard-thresholding of basic estimate and wiener filtering of final estimate.

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