diff options
author | dkazanc <dkazanc@hotmail.com> | 2018-11-30 16:18:59 +0000 |
---|---|---|
committer | dkazanc <dkazanc@hotmail.com> | 2018-11-30 16:18:59 +0000 |
commit | d252fcf6889855bb276cf6f9bf516e61910c064f (patch) | |
tree | 8bdbd4d1c98dd4608adac03501c91144ca8a1cb1 /Wrappers/Matlab/demos | |
parent | daca42a322291cc3c7a18c6bbe25b709bcdca249 (diff) | |
download | regularization-d252fcf6889855bb276cf6f9bf516e61910c064f.tar.gz regularization-d252fcf6889855bb276cf6f9bf516e61910c064f.tar.bz2 regularization-d252fcf6889855bb276cf6f9bf516e61910c064f.tar.xz regularization-d252fcf6889855bb276cf6f9bf516e61910c064f.zip |
matlab version tested, cython bit started
Diffstat (limited to 'Wrappers/Matlab/demos')
-rw-r--r-- | Wrappers/Matlab/demos/demoMatlab_denoise.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Wrappers/Matlab/demos/demoMatlab_denoise.m b/Wrappers/Matlab/demos/demoMatlab_denoise.m index d11bc63..2cbdb56 100644 --- a/Wrappers/Matlab/demos/demoMatlab_denoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m @@ -135,6 +135,21 @@ figure; imshow(u_diff4, [0 1]); title('Diffusion 4thO denoised image (CPU)'); % 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)'); %% +fprintf('Weights pre-calculation for Non-local TV (takes time on CPU) \n'); +SearchingWindow = 9; +PatchWindow = 3; +NeighboursNumber = 15; % the number of neibours to include +h = 0.25; % edge related parameter for NLM +[H_i, H_j, Weights] = PatchSelect(single(u0), SearchingWindow, PatchWindow, NeighboursNumber, h); +%% +fprintf('Denoise using Non-local Total Variation (CPU) \n'); +iter_nltv = 3; % number of nltv iterations +lambda_nltv = 0.085; % regularisation parameter for nltv +tic; u_nltv = Nonlocal_TV(single(u0), H_i, H_j, 0, Weights, lambda_nltv, iter_nltv); toc; +rmse_nltv = (RMSE(u_nltv(:),Im(:))); +fprintf('%s %f \n', 'RMSE error for Non-local Total Variation is:', rmse_nltv); +figure; imshow(u_nltv, [0 1]); title('Non-local Total Variation denoised image (CPU)'); +%% %>>>>>>>>>>>>>> MULTI-CHANNEL priors <<<<<<<<<<<<<<< % |