diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-17 12:58:28 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-17 12:58:28 +0100 |
commit | d0a33e4f941539ba44a071cfab75d7bf9543990f (patch) | |
tree | ed825ba90ca17448ab07309435095f3612ffe703 /Wrappers/Matlab/demos | |
parent | 7e556922a60e052d24c1e467df13423904729357 (diff) | |
download | regularization-d0a33e4f941539ba44a071cfab75d7bf9543990f.tar.gz regularization-d0a33e4f941539ba44a071cfab75d7bf9543990f.tar.bz2 regularization-d0a33e4f941539ba44a071cfab75d7bf9543990f.tar.xz regularization-d0a33e4f941539ba44a071cfab75d7bf9543990f.zip |
TNV module added
Diffstat (limited to 'Wrappers/Matlab/demos')
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_denoise.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Wrappers/Matlab/demos/demoMatlab_denoise.m b/Wrappers/Matlab/demos/demoMatlab_denoise.m index 129bedc..dab98dc 100644 --- a/Wrappers/Matlab/demos/demoMatlab_denoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m @@ -70,3 +70,14 @@ figure; imshow(u_fgp_dtv, [0 1]); title('FGP-dTV denoised image (CPU)'); % tic; u_fgp_dtvG = FGP_dTV_GPU(single(u0), single(u_ref), lambda_reg, iter_fgp, epsil_tol, eta); toc; % figure; imshow(u_fgp_dtvG, [0 1]); title('FGP-dTV denoised image (GPU)'); %% +fprintf('Denoise using the TNV prior (CPU) \n'); +slices = 5; N = 512; +vol3D = zeros(N,N,slices, 'single'); +for i = 1:slices +vol3D(:,:,i) = Im + .05*randn(size(Im)); +end +vol3D(vol3D < 0) = 0; + +iter_tnv = 200; % number of TNV iterations +tic; u_tnv = TNV(single(vol3D), lambda_reg, iter_tnv); toc; +figure; imshow(u_tnv(:,:,3), [0 1]); title('TNV denoised stack of channels (CPU)'); |