diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/Matlab_demos/demoMatlab_3Ddenoise.m | 29 | ||||
-rw-r--r-- | demos/Matlab_demos/demoMatlab_denoise.m | 1 |
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; |