diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-05-03 23:18:47 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-05-03 23:18:47 +0100 |
commit | 66b101901f29776486009d165221d03a57316a0e (patch) | |
tree | 1e142d6400f09b7d4f61bfab1260b9399b3d7628 /Wrappers/Matlab/demos | |
parent | 9d0dd9704173a50226cb2d46c5418b8172b25f69 (diff) | |
download | regularization-66b101901f29776486009d165221d03a57316a0e.tar.gz regularization-66b101901f29776486009d165221d03a57316a0e.tar.bz2 regularization-66b101901f29776486009d165221d03a57316a0e.tar.xz regularization-66b101901f29776486009d165221d03a57316a0e.zip |
4th order diffusion added
Diffstat (limited to 'Wrappers/Matlab/demos')
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m | 16 | ||||
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_denoise.m | 21 |
2 files changed, 35 insertions, 2 deletions
diff --git a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m index c087433..ccd47f1 100644 --- a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m @@ -74,6 +74,22 @@ figure; imshow(u_diff(:,:,15), [0 1]); title('Diffusion denoised volume (CPU)'); % tic; u_diff_g = NonlDiff_GPU(single(vol3D), lambda_regDiff, sigmaPar, iter_diff, tau_param, 'Huber'); toc; % figure; imshow(u_diff_g(:,:,15), [0 1]); title('Diffusion denoised volume (GPU)'); %% +fprintf('Denoise using Fourth-order anisotropic diffusion model (CPU) \n'); +iter_diff = 300; % number of diffusion iterations +lambda_regDiff = 3.5; % regularisation for the diffusivity +sigmaPar = 0.02; % edge-preserving parameter +tau_param = 0.0025; % time-marching constant +tic; u_diff4 = Diffusion_4thO(single(vol3D), lambda_regDiff, sigmaPar, iter_diff, tau_param); toc; +figure; imshow(u_diff4(:,:,15), [0 1]); title('Diffusion 4thO denoised volume (CPU)'); +%% +% fprintf('Denoise using Fourth-order anisotropic diffusion model (GPU) \n'); +% iter_diff = 300; % number of diffusion iterations +% lambda_regDiff = 3.5; % regularisation for the diffusivity +% sigmaPar = 0.02; % edge-preserving parameter +% tau_param = 0.0025; % time-marching constant +% tic; u_diff4_g = Diffusion_4thO_GPU(single(vol3D), lambda_regDiff, sigmaPar, iter_diff, tau_param); toc; +% figure; imshow(u_diff4_g(:,:,15), [0 1]); title('Diffusion 4thO denoised volume (GPU)'); +%% %>>>>>>>>>>>>>> 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 d93f477..30ad79d 100644 --- a/Wrappers/Matlab/demos/demoMatlab_denoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m @@ -53,8 +53,8 @@ figure; imshow(u_sb, [0 1]); title('SB-TV denoised image (CPU)'); %% 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 +lambda_regDiff = 0.025; % regularisation for the diffusivity +sigmaPar = 0.015; % 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)'); @@ -67,6 +67,23 @@ figure; imshow(u_diff, [0 1]); title('Diffusion denoised image (CPU)'); % 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)'); %% +fprintf('Denoise using Fourth-order anisotropic diffusion model (CPU) \n'); +iter_diff = 800; % number of diffusion iterations +lambda_regDiff = 3.5; % regularisation for the diffusivity +sigmaPar = 0.02; % edge-preserving parameter +tau_param = 0.005; % time-marching constant +tic; u_diff4 = Diffusion_4thO(single(u0), lambda_regDiff, sigmaPar, iter_diff, tau_param); toc; +figure; imshow(u_diff4, [0 1]); title('Diffusion 4thO denoised image (CPU)'); +%% +% fprintf('Denoise using Fourth-order anisotropic diffusion model (GPU) \n'); +% iter_diff = 800; % number of diffusion iterations +% lambda_regDiff = 3.5; % regularisation for the diffusivity +% sigmaPar = 0.02; % edge-preserving parameter +% tau_param = 0.005; % time-marching constant +% tic; u_diff4_g = Diffusion_4thO_GPU(single(u0), lambda_regDiff, sigmaPar, iter_diff, tau_param); toc; +% figure; imshow(u_diff4_g, [0 1]); title('Diffusion 4thO denoised image (GPU)'); +%% + %>>>>>>>>>>>>>> MULTI-CHANNEL priors <<<<<<<<<<<<<<< % fprintf('Denoise using the FGP-dTV model (CPU) \n'); |