diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-18 22:31:59 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-18 22:31:59 +0100 |
commit | 8aaf90a7716c0ca8ab3b9852f18545af7cf05eb9 (patch) | |
tree | 9482d5325a9b62864dcac8edbfa886e0399ff2ea /Wrappers/Matlab/demos | |
parent | cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1 (diff) | |
download | regularization-8aaf90a7716c0ca8ab3b9852f18545af7cf05eb9.tar.gz regularization-8aaf90a7716c0ca8ab3b9852f18545af7cf05eb9.tar.bz2 regularization-8aaf90a7716c0ca8ab3b9852f18545af7cf05eb9.tar.xz regularization-8aaf90a7716c0ca8ab3b9852f18545af7cf05eb9.zip |
NonlDiff added 2D CPU/CUDA
Diffstat (limited to 'Wrappers/Matlab/demos')
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m | 9 | ||||
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_denoise.m | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m index fb55097..502b6bd 100644 --- a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m @@ -53,6 +53,15 @@ figure; imshow(u_sb(:,:,15), [0 1]); title('SB-TV denoised volume (CPU)'); % tic; u_sbG = SB_TV_GPU(single(vol3D), lambda_reg, iter_sb, epsil_tol); toc; % figure; imshow(u_sbG(:,:,15), [0 1]); title('SB-TV denoised volume (GPU)'); %% +%% +fprintf('Denoise a volume using Nonlinear-Diffusion model (CPU) \n'); +iter_diff = 300; % number of diffusion iterations +lambda_regDiff = 0.06; % regularisation for the diffusivity +sigmaPar = 0.04; % edge-preserving parameter +tau_param = 0.025; % time-marching constant +tic; u_diff = NonlDiff(single(vol3D), lambda_regDiff, sigmaPar, iter_diff, tau_param, 'Huber'); toc; +figure; imshow(u_diff(:,:,15), [0 1]); title('Diffusion denoised volume (CPU)'); +%% %>>>>>>>>>>>>>> MULTI-CHANNEL priors <<<<<<<<<<<<<<< % fprintf('Denoise a volume using the FGP-dTV model (CPU) \n'); diff --git a/Wrappers/Matlab/demos/demoMatlab_denoise.m b/Wrappers/Matlab/demos/demoMatlab_denoise.m index dab98dc..4a0a19a 100644 --- a/Wrappers/Matlab/demos/demoMatlab_denoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m @@ -46,6 +46,22 @@ figure; imshow(u_sb, [0 1]); title('SB-TV denoised image (CPU)'); % tic; u_sbG = SB_TV_GPU(single(u0), lambda_reg, iter_sb, epsil_tol); toc; % figure; imshow(u_sbG, [0 1]); title('SB-TV denoised image (GPU)'); %% +fprintf('Denoise using Nonlinear-Diffusion model (CPU) \n'); +iter_diff = 800; % number of diffusion iterations +lambda_regDiff = 0.06; % regularisation for the diffusivity +sigmaPar = 0.04; % edge-preserving parameter +tau_param = 0.025; % time-marching constant +tic; u_diff = NonlDiff(single(u0), lambda_regDiff, sigmaPar, iter_diff, tau_param, 'Huber'); toc; +figure; imshow(u_diff, [0 1]); title('Diffusion denoised image (CPU)'); +%% +% fprintf('Denoise using Nonlinear-Diffusion model (GPU) \n'); +% iter_diff = 800; % number of diffusion iterations +% lambda_regDiff = 0.06; % regularisation for the diffusivity +% sigmaPar = 0.04; % edge-preserving parameter +% tau_param = 0.025; % time-marching constant +% tic; u_diff_g = NonlDiff_GPU(single(u0), lambda_regDiff, sigmaPar, iter_diff, tau_param, 'Huber'); toc; +% figure; imshow(u_diff_g, [0 1]); title('Diffusion denoised image (GPU)'); +%% %>>>>>>>>>>>>>> MULTI-CHANNEL priors <<<<<<<<<<<<<<< % fprintf('Denoise using the FGP-dTV model (CPU) \n'); |