diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2017-10-19 22:16:43 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2017-10-19 22:16:43 +0100 |
commit | 952322eb1394f18cedfbb51488e76ed52728d98d (patch) | |
tree | 1685334a1d07e49782682f72e3c00362bd5ce91d /main_func | |
parent | ff543b21e175d49b95ea6da9c03f21a1789f6833 (diff) | |
download | regularization-952322eb1394f18cedfbb51488e76ed52728d98d.tar.gz regularization-952322eb1394f18cedfbb51488e76ed52728d98d.tar.bz2 regularization-952322eb1394f18cedfbb51488e76ed52728d98d.tar.xz regularization-952322eb1394f18cedfbb51488e76ed52728d98d.zip |
GH-OS fixed, demos updated, add_artifacts function
Diffstat (limited to 'main_func')
-rw-r--r-- | main_func/FISTA_REC.m | 4 | ||||
-rw-r--r-- | main_func/regularizers_CPU/FGP_TV.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/main_func/FISTA_REC.m b/main_func/FISTA_REC.m index bdaeb18..fa98360 100644 --- a/main_func/FISTA_REC.m +++ b/main_func/FISTA_REC.m @@ -669,6 +669,10 @@ else counterInd = counterInd + numProjSub; end + if (i == 1) + r_old = r; + end + % working with a 'ring vector' if (lambdaR_L1 > 0) r = max(abs(r)-lambdaR_L1, 0).*sign(r); % soft-thresholding operator for ring vector diff --git a/main_func/regularizers_CPU/FGP_TV.c b/main_func/regularizers_CPU/FGP_TV.c index cfe5b9e..e0dae57 100644 --- a/main_func/regularizers_CPU/FGP_TV.c +++ b/main_func/regularizers_CPU/FGP_TV.c @@ -65,7 +65,7 @@ void mexFunction( A = (float *) mxGetData(prhs[0]); /*noisy image (2D/3D) */ lambda = (float) mxGetScalar(prhs[1]); /* regularization parameter */ iter = 50; /* default iterations number */ - epsil = 0.001; /* default tolerance constant */ + epsil = 0.0001; /* default tolerance constant */ methTV = 0; /* default isotropic TV penalty */ if ((nrhs == 3) || (nrhs == 4) || (nrhs == 5)) iter = (int) mxGetScalar(prhs[2]); /* iterations number */ @@ -88,7 +88,7 @@ void mexFunction( tk = 1.0f; tkp1=1.0f; - count = 1; + count = 0; re_old = 0.0f; if (number_of_dims == 2) { @@ -127,7 +127,7 @@ void mexFunction( } re = sqrt(re)/sqrt(re1); if (re < epsil) count++; - if (count > 3) { + if (count > 4) { Obj_func_CALC2D(A, D, funcvalA, lambda, dimX, dimY); break; } |