Skip to content
Snippets Groups Projects
Commit 465cccc5 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

SoftThresholding: fix for bad input threshold


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@625 4c865b51-4357-4376-afb4-474e03ccb993
parent bd827fde
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ function img = gtSoftThreshold(img, thr)
% GTSOFTTHRESHOLD Applies soft thresholding to the image
% img = gtSoftThreshold(img, thr)
thr = min(thr(:));
tempImg = abs(img) - thr;
tempImg = (tempImg + abs(tempImg)) / 2;
img = sign(img) .* tempImg;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment