summaryrefslogtreecommitdiffstats
path: root/Wrappers/Matlab/demos
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Matlab/demos')
-rw-r--r--Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m14
-rw-r--r--Wrappers/Matlab/demos/demoMatlab_denoise.m4
2 files changed, 9 insertions, 9 deletions
diff --git a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m
index f5c3ad1..71082e7 100644
--- a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m
+++ b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m
@@ -3,10 +3,10 @@
addpath('../mex_compile/installed');
addpath('../../../data/');
-N = 256;
+N = 512;
slices = 30;
vol3D = zeros(N,N,slices, 'single');
-Im = double(imread('lena_gray_256.tif'))/255; % loading image
+Im = double(imread('lena_gray_512.tif'))/255; % loading image
for i = 1:slices
vol3D(:,:,i) = Im + .05*randn(size(Im));
end
@@ -17,28 +17,28 @@ figure; imshow(vol3D(:,:,15), [0 1]); title('Noisy image');
fprintf('Denoise using ROF-TV model (CPU) \n');
lambda_rof = 0.03; % regularisation parameter
tau_rof = 0.0025; % time-marching constant
-iter_rof = 1000; % number of ROF iterations
+iter_rof = 300; % number of ROF iterations
tic; u_rof = ROF_TV(single(vol3D), lambda_rof, iter_rof, tau_rof); toc;
figure; imshow(u_rof(:,:,15), [0 1]); title('ROF-TV denoised volume (CPU)');
%%
% fprintf('Denoise using ROF-TV model (GPU) \n');
% lambda_rof = 0.03; % regularisation parameter
% tau_rof = 0.0025; % time-marching constant
-% iter_rof = 1000; % number of ROF iterations
+% iter_rof = 300; % number of ROF iterations
% tic; u_rofG = ROF_TV_GPU(single(vol3D), lambda_rof, iter_rof, tau_rof); toc;
% figure; imshow(u_rofG(:,:,15), [0 1]); title('ROF-TV denoised volume (GPU)');
%%
fprintf('Denoise using FGP-TV model (CPU) \n');
lambda_fgp = 0.03; % regularisation parameter
-iter_fgp = 500; % number of FGP iterations
+iter_fgp = 300; % number of FGP iterations
epsil_tol = 1.0e-05; % tolerance
tic; u_fgp = FGP_TV(single(vol3D), lambda_fgp, iter_fgp, epsil_tol); toc;
figure; imshow(u_fgp(:,:,15), [0 1]); title('FGP-TV denoised volume (CPU)');
%%
% fprintf('Denoise using FGP-TV model (GPU) \n');
% lambda_fgp = 0.03; % regularisation parameter
-% iter_fgp = 500; % number of FGP iterations
+% iter_fgp = 300; % number of FGP iterations
% epsil_tol = 1.0e-05; % tolerance
% tic; u_fgpG = FGP_TV_GPU(single(vol3D), lambda_fgp, iter_fgp, epsil_tol); toc;
% figure; imshow(u_fgpG(:,:,15), [0 1]); title('FGP-TV denoised volume (GPU)');
-%% \ No newline at end of file
+%%
diff --git a/Wrappers/Matlab/demos/demoMatlab_denoise.m b/Wrappers/Matlab/demos/demoMatlab_denoise.m
index ab4e95d..7f87fbb 100644
--- a/Wrappers/Matlab/demos/demoMatlab_denoise.m
+++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m
@@ -3,7 +3,7 @@
addpath('../mex_compile/installed');
addpath('../../../data/');
-Im = double(imread('lena_gray_256.tif'))/255; % loading image
+Im = double(imread('lena_gray_512.tif'))/255; % loading image
u0 = Im + .05*randn(size(Im)); u0(u0 < 0) = 0;
figure; imshow(u0, [0 1]); title('Noisy image');
@@ -35,4 +35,4 @@ figure; imshow(u_fgp, [0 1]); title('FGP-TV denoised image (CPU)');
% epsil_tol = 1.0e-05; % tolerance
% tic; u_fgpG = FGP_TV_GPU(single(u0), lambda_fgp, iter_fgp, epsil_tol); toc;
% figure; imshow(u_fgpG, [0 1]); title('FGP-TV denoised image (GPU)');
-%% \ No newline at end of file
+%%