summaryrefslogtreecommitdiffstats
path: root/main_func
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-25 10:56:57 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-25 10:56:57 +0100
commitc21df8581e052541a2dd39a46a4c1f50e335fd9e (patch)
tree5c8f755f910a9b5006791e715328242f68fbe504 /main_func
parent31097954f87d0f30f667b29a12f7098710c284ab (diff)
parent455ca86825c157512f61441d3d27b8148ca795a7 (diff)
downloadregularization-c21df8581e052541a2dd39a46a4c1f50e335fd9e.tar.gz
regularization-c21df8581e052541a2dd39a46a4c1f50e335fd9e.tar.bz2
regularization-c21df8581e052541a2dd39a46a4c1f50e335fd9e.tar.xz
regularization-c21df8581e052541a2dd39a46a4c1f50e335fd9e.zip
Merge branch origin/pythonize into pythonize
Diffstat (limited to 'main_func')
-rw-r--r--main_func/FISTA_REC.m4
-rw-r--r--main_func/regularizers_CPU/FGP_TV.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/main_func/FISTA_REC.m b/main_func/FISTA_REC.m
index 1e4228d..3d22b97 100644
--- a/main_func/FISTA_REC.m
+++ b/main_func/FISTA_REC.m
@@ -685,6 +685,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 66442c9..30cea1a 100644
--- a/main_func/regularizers_CPU/FGP_TV.c
+++ b/main_func/regularizers_CPU/FGP_TV.c
@@ -66,7 +66,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 */
@@ -89,7 +89,7 @@ void mexFunction(
tk = 1.0f;
tkp1=1.0f;
- count = 1;
+ count = 0;
re_old = 0.0f;
if (number_of_dims == 2) {
@@ -128,7 +128,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; }