Skip to content

Commit

Permalink
FIX: _wavelet_threshold: do not denoise the approximation coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
grlee77 committed Sep 6, 2016
1 parent d41f465 commit 5d9dba3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions skimage/restoration/_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,7 @@ def _wavelet_threshold(img, wavelet, threshold=None, sigma=None, mode='soft'):

denoised_detail = [{key: pywt.threshold(level[key], value=threshold,
mode=mode) for key in level} for level in coeffs[1:]]
denoised_root = pywt.threshold(coeffs[0], value=threshold, mode=mode)
denoised_coeffs = [denoised_root] + [d for d in denoised_detail]
denoised_coeffs = [coeffs[0]] + [d for d in denoised_detail]
return pywt.waverecn(denoised_coeffs, wavelet)


Expand Down

0 comments on commit 5d9dba3

Please sign in to comment.