summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2019-09-26 23:07:17 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2019-09-26 23:07:17 +0100
commit4c6769401570415a5a543b81130e314af6b95d9a (patch)
tree1b7b70c47ba00b037dc839a4733a433d690e8337 /demos
parent304db3ba12a12870f0d1d7cf94bc7d9aedca95c4 (diff)
downloadregularization-4c6769401570415a5a543b81130e314af6b95d9a.tar.gz
regularization-4c6769401570415a5a543b81130e314af6b95d9a.tar.bz2
regularization-4c6769401570415a5a543b81130e314af6b95d9a.tar.xz
regularization-4c6769401570415a5a543b81130e314af6b95d9a.zip
loop CPU routines upgrades
Diffstat (limited to 'demos')
-rw-r--r--demos/Matlab_demos/demoMatlab_3Ddenoise.m29
-rw-r--r--demos/Matlab_demos/demoMatlab_denoise.m1
2 files changed, 14 insertions, 16 deletions
diff --git a/demos/Matlab_demos/demoMatlab_3Ddenoise.m b/demos/Matlab_demos/demoMatlab_3Ddenoise.m
index d7ff60c..f018327 100644
--- a/demos/Matlab_demos/demoMatlab_3Ddenoise.m
+++ b/demos/Matlab_demos/demoMatlab_3Ddenoise.m
@@ -182,19 +182,18 @@ eta = 0.2; % Reference image gradient smoothing constant
tic; u_fgp_dtv = FGP_dTV(single(vol3D), single(vol3D_ref), lambda_reg, iter_fgp, epsil_tol, eta); toc;
figure; imshow(u_fgp_dtv(:,:,7), [0 1]); title('FGP-dTV denoised volume (CPU)');
%%
-fprintf('Denoise a volume using the FGP-dTV model (GPU) \n');
-
-% create another volume (reference) with slightly less amount of noise
-vol3D_ref = zeros(N,N,slices, 'single');
-for i = 1:slices
-vol3D_ref(:,:,i) = Im + .01*randn(size(Im));
-end
-vol3D_ref(vol3D_ref < 0) = 0;
-% vol3D_ref = zeros(size(Im),'single'); % pass zero reference (dTV -> TV)
-
-iter_fgp = 300; % number of FGP iterations
-epsil_tol = 0.0; % tolerance
-eta = 0.2; % Reference image gradient smoothing constant
-tic; u_fgp_dtv_g = FGP_dTV_GPU(single(vol3D), single(vol3D_ref), lambda_reg, iter_fgp, epsil_tol, eta); toc;
-figure; imshow(u_fgp_dtv_g(:,:,7), [0 1]); title('FGP-dTV denoised volume (GPU)');
+% fprintf('Denoise a volume using the FGP-dTV model (GPU) \n');
+% % create another volume (reference) with slightly less amount of noise
+% vol3D_ref = zeros(N,N,slices, 'single');
+% for i = 1:slices
+% vol3D_ref(:,:,i) = Im + .01*randn(size(Im));
+% end
+% vol3D_ref(vol3D_ref < 0) = 0;
+% % vol3D_ref = zeros(size(Im),'single'); % pass zero reference (dTV -> TV)
+%
+% iter_fgp = 300; % number of FGP iterations
+% epsil_tol = 0.0; % tolerance
+% eta = 0.2; % Reference image gradient smoothing constant
+% tic; u_fgp_dtv_g = FGP_dTV_GPU(single(vol3D), single(vol3D_ref), lambda_reg, iter_fgp, epsil_tol, eta); toc;
+% figure; imshow(u_fgp_dtv_g(:,:,7), [0 1]); title('FGP-dTV denoised volume (GPU)');
%%
diff --git a/demos/Matlab_demos/demoMatlab_denoise.m b/demos/Matlab_demos/demoMatlab_denoise.m
index 12d5570..b50eaf5 100644
--- a/demos/Matlab_demos/demoMatlab_denoise.m
+++ b/demos/Matlab_demos/demoMatlab_denoise.m
@@ -149,7 +149,6 @@ fprintf('%s %f \n', 'MSSIM error for NLTV is:', ssimval);
figure; imagesc(u_nltv, [0 1]); colormap(gray); daspect([1 1 1]); title('Non-local Total Variation denoised image (CPU)');
%%
%>>>>>>>>>>>>>> MULTI-CHANNEL priors <<<<<<<<<<<<<<< %
-
fprintf('Denoise using the FGP-dTV model (CPU) \n');
% create another image (reference) with slightly less amount of noise
u_ref = Im + .01*randn(size(Im)); u_ref(u_ref < 0) = 0;