summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2017-07-04 09:35:02 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2017-07-04 09:35:02 +0100
commite097a4edcced2bbc8c78d1302467bdf625deff1d (patch)
treea848dc49c06ed462988d2f6cce7f2a2212bc4f36 /demos
parent75e7ebc79e86710c4cfb05b8af8e429146288c85 (diff)
downloadregularization-e097a4edcced2bbc8c78d1302467bdf625deff1d.tar.gz
regularization-e097a4edcced2bbc8c78d1302467bdf625deff1d.tar.bz2
regularization-e097a4edcced2bbc8c78d1302467bdf625deff1d.tar.xz
regularization-e097a4edcced2bbc8c78d1302467bdf625deff1d.zip
some clearing
Diffstat (limited to 'demos')
-rw-r--r--demos/Demo1.m34
1 files changed, 17 insertions, 17 deletions
diff --git a/demos/Demo1.m b/demos/Demo1.m
index 486b97c..3d57795 100644
--- a/demos/Demo1.m
+++ b/demos/Demo1.m
@@ -19,7 +19,7 @@ addpath('../main_func/');
addpath('../supp/');
load phantom_bone512.mat % load the phantom
-load my_red_yellowMAP.mat % load the colormap
+load my_red_yellowMAP.mat % load the colormap
% load sino1.mat; % load noisy sinogram
N = 512; % the size of the tomographic image NxN
@@ -67,12 +67,12 @@ error_FISTA = output.Resid_error; obj_FISTA = output.objective;
figure(2); clf
%set(gcf, 'Position', get(0,'Screensize'));
-subplot_tight(1,2,1, [0.05 0.05]); imshow(X_FISTA,[0 0.6]); title('FISTA-PWLS reconstruction'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA).^2,[0 0.1]); title('residual'); colorbar;
+subplot(1,2,1, [0.05 0.05]); imshow(X_FISTA,[0 0.6]); title('FISTA-PWLS reconstruction'); colorbar;
+subplot(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA).^2,[0 0.1]); title('residual'); colorbar;
colormap(cmapnew);
figure(3); clf
-subplot_tight(1,2,1, [0.05 0.05]); plot(error_FISTA); title('RMSE plot'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); plot(obj_FISTA); title('Objective plot'); colorbar;
+subplot(1,2,1, [0.05 0.05]); plot(error_FISTA); title('RMSE plot'); colorbar;
+subplot(1,2,2, [0.05 0.05]); plot(obj_FISTA); title('Objective plot'); colorbar;
colormap(cmapnew);
%%
fprintf('%s\n', 'Reconstruction using FISTA-PWLS-TV...');
@@ -94,12 +94,12 @@ fprintf('%s %.4f\n', 'Min RMSE for FISTA-PWLS-TV reconstruction is:', min(error_
error_FISTA_TV = output.Resid_error; obj_FISTA_TV = output.objective;
figure(4); clf
-subplot_tight(1,2,1, [0.05 0.05]); imshow(X_FISTA_TV,[0 0.6]); title('FISTA-PWLS-TV reconstruction'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA_TV).^2,[0 0.1]); title('residual'); colorbar;
+subplot(1,2,1, [0.05 0.05]); imshow(X_FISTA_TV,[0 0.6]); title('FISTA-PWLS-TV reconstruction'); colorbar;
+subplot(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA_TV).^2,[0 0.1]); title('residual'); colorbar;
colormap(cmapnew);
figure(5); clf
-subplot_tight(1,2,1, [0.05 0.05]); plot(error_FISTA_TV); title('RMSE plot'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); plot(obj_FISTA_TV); title('Objective plot'); colorbar;
+subplot(1,2,1, [0.05 0.05]); plot(error_FISTA_TV); title('RMSE plot'); colorbar;
+subplot(1,2,2, [0.05 0.05]); plot(obj_FISTA_TV); title('Objective plot'); colorbar;
colormap(cmapnew);
%%
fprintf('%s\n', 'Reconstruction using FISTA-GH-TV...');
@@ -123,13 +123,13 @@ fprintf('%s %.4f\n', 'Min RMSE for FISTA-GH-TV reconstruction is:', min(error_FI
error_FISTA_GH_TV = output.Resid_error; obj_FISTA_GH_TV = output.objective;
figure(6); clf
-subplot_tight(1,2,1, [0.05 0.05]); imshow(X_FISTA_GH_TV,[0 0.6]); title('FISTA-GH-TV reconstruction'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]);imshow((phantom - X_FISTA_GH_TV).^2,[0 0.1]); title('residual'); colorbar;
+subplot(1,2,1, [0.05 0.05]); imshow(X_FISTA_GH_TV,[0 0.6]); title('FISTA-GH-TV reconstruction'); colorbar;
+subplot(1,2,2, [0.05 0.05]);imshow((phantom - X_FISTA_GH_TV).^2,[0 0.1]); title('residual'); colorbar;
colormap(cmapnew);
figure(7); clf
-subplot_tight(1,2,1, [0.05 0.05]); plot(error_FISTA_GH_TV); title('RMSE plot'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); plot(obj_FISTA_GH_TV); title('Objective plot'); colorbar;
+subplot(1,2,1, [0.05 0.05]); plot(error_FISTA_GH_TV); title('RMSE plot'); colorbar;
+subplot(1,2,2, [0.05 0.05]); plot(obj_FISTA_GH_TV); title('Objective plot'); colorbar;
colormap(cmapnew);
%%
fprintf('%s\n', 'Reconstruction using FISTA-Student-TV...');
@@ -155,13 +155,13 @@ error_FISTA_student_TV = output.Resid_error; obj_FISTA_student_TV = output.objec
figure(8);
set(gcf, 'Position', get(0,'Screensize'));
-subplot_tight(1,2,1, [0.05 0.05]); imshow(X_FISTA_student_TV,[0 0.6]); title('FISTA-Student-TV reconstruction'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA_student_TV).^2,[0 0.1]); title('residual'); colorbar;
+subplot(1,2,1, [0.05 0.05]); imshow(X_FISTA_student_TV,[0 0.6]); title('FISTA-Student-TV reconstruction'); colorbar;
+subplot(1,2,2, [0.05 0.05]); imshow((phantom - X_FISTA_student_TV).^2,[0 0.1]); title('residual'); colorbar;
colormap(cmapnew);
figure(9);
-subplot_tight(1,2,1, [0.05 0.05]); plot(error_FISTA_student_TV); title('RMSE plot'); colorbar;
-subplot_tight(1,2,2, [0.05 0.05]); plot(obj_FISTA_student_TV); title('Objective plot'); colorbar;
+subplot(1,2,1, [0.05 0.05]); plot(error_FISTA_student_TV); title('RMSE plot'); colorbar;
+subplot(1,2,2, [0.05 0.05]); plot(obj_FISTA_student_TV); title('Objective plot'); colorbar;
colormap(cmapnew);
%%
% print all RMSE's