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

Noise standard deviation #7

Open
sandeepnmenon opened this issue Nov 1, 2017 · 4 comments
Open

Noise standard deviation #7

sandeepnmenon opened this issue Nov 1, 2017 · 4 comments

Comments

@sandeepnmenon
Copy link

When using the bm3d function, it asks for standard deviation of noise
out = pybm3d.bm3d.bm3d(noisy_img, noise_std_dev)`

Bm3d can also work without knowing the standard deviation of the noise
How to use the function without having to give nois_std_dev

@timmeinhardt
Copy link
Collaborator

The core C implementation of BM3D we are currently using (see here) always needs a specific standard deviation of the noise. Do you know any C implementation or resource that shows how BM3D works without specifying the standard deviation?

@paggers
Copy link

paggers commented Nov 4, 2017

The .mex file that the finnish group provides has a Wiener filter function which estimates the noise.
A quick search in google gave an Adaptive Wiener Filter implementation in C++ https://github.com/prittt/AdaptiveWienerFilter

On a side note, I was about to post it as an additional issue: If one provides a 0 input for noise_std, the bm3d does indeed returns a different image (used np.linalg.norm). In the matlab implementation if one inputs 0 it estimates the noise using a Wiener filter as mentioned above, but since there is none implemented in our case, it raises a red flag.

@timmeinhardt
Copy link
Collaborator

This would indeed be a great addition. Unfortunately the Adaptive Wiener Filter implementation you provided heavily relies on OpenCV which would introduce a huge new dependency. I will think about a reimplementation which then can be added to the C core repository I mentioned above.

For now one could easily use the estimate_sigma function provided by skimage. I am not sure of of the exact differences between their wavelet and the Wiener filter approach.

I will also look into the case of noise_std equal to 0. Thank you again for your feedback!

@yuehniu
Copy link

yuehniu commented Apr 5, 2019

Sometimes, when given an input with noise, the output of bm3d consists of some np.nan values. I wonder is there any operation that can possibly cause np.nan?

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

No branches or pull requests

4 participants