summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authoralgol <dkazanc@hotmail.com>2017-10-26 15:28:34 +0100
committeralgol <dkazanc@hotmail.com>2017-10-26 15:28:34 +0100
commita4ee6ded8036fa1a10ef860478f49d2eb2cd11e0 (patch)
treea23af6377e1f4e631ed1d44451d02ba425536363 /demos
parentc91436873e48d531b9313f9c10fa5f89bcb90ab6 (diff)
downloadregularization-a4ee6ded8036fa1a10ef860478f49d2eb2cd11e0.tar.gz
regularization-a4ee6ded8036fa1a10ef860478f49d2eb2cd11e0.tar.bz2
regularization-a4ee6ded8036fa1a10ef860478f49d2eb2cd11e0.tar.xz
regularization-a4ee6ded8036fa1a10ef860478f49d2eb2cd11e0.zip
Lipshitz constant attached to the regularization parameter
Diffstat (limited to 'demos')
-rw-r--r--demos/Demo_Phantom3D_Parallel.m14
-rw-r--r--demos/Demo_RealData3D_Parallel.m22
2 files changed, 18 insertions, 18 deletions
diff --git a/demos/Demo_Phantom3D_Parallel.m b/demos/Demo_Phantom3D_Parallel.m
index 402bdd2..b0737f1 100644
--- a/demos/Demo_Phantom3D_Parallel.m
+++ b/demos/Demo_Phantom3D_Parallel.m
@@ -2,7 +2,7 @@
% PARALLEL BEAM geometry
% requirements: ASTRA-toolbox and TomoPhantom toolbox
-close all;clc;clear all;
+close all;clc;clear;
% adding paths
addpath('../data/');
addpath('../main_func/'); addpath('../main_func/regularizers_CPU/'); addpath('../main_func/regularizers_GPU/NL_Regul/'); addpath('../main_func/regularizers_GPU/Diffus_HO/');
@@ -76,7 +76,7 @@ params.X_ideal = TomoPhantom; % ideal phantom
params.weights = dataRaw./max(dataRaw(:)); % statistical weight for PWLS
params.subsets = 12; % the number of subsets
params.show = 1; % visualize reconstruction on each iteration
-params.slice = 1; params.maxvalplot = 1.3;
+params.slice = 128; params.maxvalplot = 1.3;
tic; [X_FISTA, output] = FISTA_REC(params); toc;
error_FISTA = output.Resid_error; obj_FISTA = output.objective;
@@ -91,7 +91,7 @@ subplot(1,2,1); plot(error_FISTA); title('RMSE plot');
subplot(1,2,2); plot(obj_FISTA); title('Objective plot');
%%
%%
-fprintf('%s\n', 'Reconstruction using OS-FISTA-GH without FGP-TV regularization...');
+fprintf('%s\n', 'Reconstruction using OS-FISTA-GH with FGP-TV regularization...');
clear params
% define parameters
params.proj_geom = proj_geom; % pass geometry to the function
@@ -99,13 +99,13 @@ params.vol_geom = vol_geom;
params.sino = single(sino3D_log); % sinogram
params.iterFISTA = 15; %max number of outer iterations
params.X_ideal = TomoPhantom; % ideal phantom
-params.weights = dataRaw./max(dataRaw(:)); % statistical weight for PWLS
-params.subsets = 8; % the number of subsets
-params.Regul_Lambda_FGPTV = 0.003; % TV regularization parameter for FGP-TV
+params.weights = dataRaw./max(dataRaw(:)); % statistical weights for PWLS
+params.subsets = 12; % the number of subsets
+params.Regul_Lambda_FGPTV = 100; % TV regularization parameter for FGP-TV
params.Ring_LambdaR_L1 = 0.02; % Soft-Thresh L1 ring variable parameter
params.Ring_Alpha = 21; % to boost ring removal procedure
params.show = 1; % visualize reconstruction on each iteration
-params.slice = 1; params.maxvalplot = 1.3;
+params.slice = 128; params.maxvalplot = 1.3;
tic; [X_FISTA_GH_TV, output] = FISTA_REC(params); toc;
error_FISTA_GH_TV = output.Resid_error; obj_FISTA_GH_TV = output.objective;
diff --git a/demos/Demo_RealData3D_Parallel.m b/demos/Demo_RealData3D_Parallel.m
index e4c9eb0..d680aca 100644
--- a/demos/Demo_RealData3D_Parallel.m
+++ b/demos/Demo_RealData3D_Parallel.m
@@ -1,7 +1,7 @@
% Demonstration of tomographic 3D reconstruction from X-ray synchrotron
% dataset (dendrites) using various data fidelities
% ! It is advisable not to run the whole script, it will take lots of time to reconstruct the whole 3D data using many algorithms !
-clear all
+clear
close all
%%
% % adding paths
@@ -44,9 +44,9 @@ clear params
params.proj_geom = proj_geom; % pass geometry to the function
params.vol_geom = vol_geom;
params.sino = Sino3D;
-params.iterFISTA = 12;
+params.iterFISTA = 18;
params.weights = Weights3D;
-params.subsets = 16; % the number of ordered subsets
+params.subsets = 8; % the number of ordered subsets
params.show = 1;
params.maxvalplot = 2.5; params.slice = 1;
@@ -58,12 +58,12 @@ clear params
params.proj_geom = proj_geom; % pass geometry to the function
params.vol_geom = vol_geom;
params.sino = Sino3D;
-params.iterFISTA = 12;
-params.Regul_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV
+params.iterFISTA = 18;
+params.Regul_Lambda_FGPTV = 5.0000e+6; % TV regularization parameter for FGP-TV
params.weights = Weights3D;
-params.subsets = 16; % the number of ordered subsets
+params.subsets = 8; % the number of ordered subsets
params.show = 1;
-params.maxvalplot = 2.5; params.slice = 2;
+params.maxvalplot = 2.5; params.slice = 10;
tic; [X_fista_TV, outputTV] = FISTA_REC(params); toc;
figure; imshow(X_fista_TV(:,:,params.slice) , [0, 2.5]); title ('FISTA-OS-PWLS-TV reconstruction');
@@ -73,12 +73,12 @@ clear params
params.proj_geom = proj_geom; % pass geometry to the function
params.vol_geom = vol_geom;
params.sino = Sino3D;
-params.iterFISTA = 12;
-% params.Regul_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV
+params.iterFISTA = 18;
+params.Regul_Lambda_FGPTV = 5.0000e+6; % TV regularization parameter for FGP-TV
params.Ring_LambdaR_L1 = 0.002; % Soft-Thresh L1 ring variable parameter
params.Ring_Alpha = 21; % to boost ring removal procedure
params.weights = Weights3D;
-params.subsets = 16; % the number of ordered subsets
+params.subsets = 8; % the number of ordered subsets
params.show = 1;
params.maxvalplot = 2.5; params.slice = 1;
@@ -91,7 +91,7 @@ params.proj_geom = proj_geom; % pass geometry to the function
params.vol_geom = vol_geom;
params.sino = Sino3D;
params.iterFISTA = 12;
-params.Regul_Lambda_FGPTV = 0.005; % TV regularization parameter for FGP-TV
+params.Regul_Lambda_FGPTV = 5.0000e+6; % TV regularization parameter for FGP-TV
params.Regul_LambdaLLT = 100; % regularization parameter for LLT problem
params.Regul_tauLLT = 0.0005; % time-step parameter for the explicit scheme
params.Ring_LambdaR_L1 = 0.002; % Soft-Thresh L1 ring variable parameter