From e097a4edcced2bbc8c78d1302467bdf625deff1d Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Tue, 4 Jul 2017 09:35:02 +0100 Subject: some clearing --- demos/Demo1.m | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'demos') 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 -- cgit v1.2.3