From a9d773b384c6391dbb9913deeafa3e79e108b790 Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Fri, 20 Apr 2018 12:38:38 +0100 Subject: some corrections to energy estimation --- Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m | 6 +++--- Wrappers/Matlab/demos/demoMatlab_denoise.m | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Wrappers/Matlab/demos') diff --git a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m index 84889d7..5a54d18 100644 --- a/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_3Ddenoise.m @@ -21,7 +21,7 @@ fprintf('Denoise a volume using the ROF-TV model (CPU) \n'); tau_rof = 0.0025; % time-marching constant iter_rof = 300; % number of ROF iterations tic; u_rof = ROF_TV(single(vol3D), lambda_reg, iter_rof, tau_rof); toc; -energyfunc_val_rof = TV_energy(single(u_rof),single(vol3D),lambda_reg); % get energy function value +energyfunc_val_rof = TV_energy(single(u_rof),single(vol3D),lambda_reg, 1); % get energy function value figure; imshow(u_rof(:,:,15), [0 1]); title('ROF-TV denoised volume (CPU)'); %% % fprintf('Denoise a volume using the ROF-TV model (GPU) \n'); @@ -34,7 +34,7 @@ fprintf('Denoise a volume using the FGP-TV model (CPU) \n'); iter_fgp = 300; % number of FGP iterations epsil_tol = 1.0e-05; % tolerance tic; u_fgp = FGP_TV(single(vol3D), lambda_reg, iter_fgp, epsil_tol); toc; -energyfunc_val_fgp = TV_energy(single(u_fgp),single(vol3D),lambda_reg); % get energy function value +energyfunc_val_fgp = TV_energy(single(u_fgp),single(vol3D),lambda_reg, 1); % get energy function value figure; imshow(u_fgp(:,:,15), [0 1]); title('FGP-TV denoised volume (CPU)'); %% % fprintf('Denoise a volume using the FGP-TV model (GPU) \n'); @@ -47,7 +47,7 @@ fprintf('Denoise a volume using the SB-TV model (CPU) \n'); iter_sb = 150; % number of SB iterations epsil_tol = 1.0e-05; % tolerance tic; u_sb = SB_TV(single(vol3D), lambda_reg, iter_sb, epsil_tol); toc; -energyfunc_val_sb = TV_energy(single(u_sb),single(vol3D),lambda_reg); % get energy function value +energyfunc_val_sb = TV_energy(single(u_sb),single(vol3D),lambda_reg, 1); % get energy function value figure; imshow(u_sb(:,:,15), [0 1]); title('SB-TV denoised volume (CPU)'); %% % fprintf('Denoise a volume using the SB-TV model (GPU) \n'); diff --git a/Wrappers/Matlab/demos/demoMatlab_denoise.m b/Wrappers/Matlab/demos/demoMatlab_denoise.m index 526d21c..151a604 100644 --- a/Wrappers/Matlab/demos/demoMatlab_denoise.m +++ b/Wrappers/Matlab/demos/demoMatlab_denoise.m @@ -14,7 +14,7 @@ fprintf('Denoise using the ROF-TV model (CPU) \n'); tau_rof = 0.0025; % time-marching constant iter_rof = 750; % number of ROF iterations tic; u_rof = ROF_TV(single(u0), lambda_reg, iter_rof, tau_rof); toc; -energyfunc_val_rof = TV_energy(single(u_rof),single(u0),lambda_reg); % get energy function value +energyfunc_val_rof = TV_energy(single(u_rof),single(u0),lambda_reg, 1); % get energy function value figure; imshow(u_rof, [0 1]); title('ROF-TV denoised image (CPU)'); %% % fprintf('Denoise using the ROF-TV model (GPU) \n'); @@ -27,7 +27,7 @@ fprintf('Denoise using the FGP-TV model (CPU) \n'); iter_fgp = 1000; % number of FGP iterations epsil_tol = 1.0e-06; % tolerance tic; u_fgp = FGP_TV(single(u0), lambda_reg, iter_fgp, epsil_tol); toc; -energyfunc_val_fgp = TV_energy(single(u_fgp),single(u0),lambda_reg); % get energy function value +energyfunc_val_fgp = TV_energy(single(u_fgp),single(u0),lambda_reg, 1); % get energy function value figure; imshow(u_fgp, [0 1]); title('FGP-TV denoised image (CPU)'); %% @@ -41,7 +41,7 @@ fprintf('Denoise using the SB-TV model (CPU) \n'); iter_sb = 150; % number of SB iterations epsil_tol = 1.0e-06; % tolerance tic; u_sb = SB_TV(single(u0), lambda_reg, iter_sb, epsil_tol); toc; -energyfunc_val_sb = TV_energy(single(u_sb),single(u0),lambda_reg); % get energy function value +energyfunc_val_sb = TV_energy(single(u_sb),single(u0),lambda_reg, 1); % get energy function value figure; imshow(u_sb, [0 1]); title('SB-TV denoised image (CPU)'); %% % fprintf('Denoise using the SB-TV model (GPU) \n'); -- cgit v1.2.3