diff options
author | Daniil Kazantsev <dkazanc3@googlemail.com> | 2018-04-17 13:18:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 13:18:49 +0100 |
commit | cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1 (patch) | |
tree | 530f73d52c3142b023673f2041ac451bfcab576b /Wrappers/Matlab/demos | |
parent | 7e556922a60e052d24c1e467df13423904729357 (diff) | |
parent | ec9b5742e243c60f2f7d31f38cd3d561c3ae3394 (diff) | |
download | regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.gz regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.bz2 regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.tar.xz regularization-cbe38cf8874ca3b74e25ce64d61bbb2edeb3a9c1.zip |
Merge pull request #51 from vais-ral/TNV
Total Nuclear Variation (TNV) module
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)'); |