From 952322eb1394f18cedfbb51488e76ed52728d98d Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev <dkazanc@hotmail.com> Date: Thu, 19 Oct 2017 22:16:43 +0100 Subject: GH-OS fixed, demos updated, add_artifacts function --- main_func/FISTA_REC.m | 4 ++++ main_func/regularizers_CPU/FGP_TV.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'main_func') 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; } -- cgit v1.2.3