comparison examples/Image Denoising/SMALL_ImgDenoise_DL_test_Training_size.m @ 19:79e1d62f0115

(none)
author idamnjanovic
date Thu, 15 Apr 2010 10:13:52 +0000
parents f72603404233
children cbf3521c25eb
comparison
equal deleted inserted replaced
18:bcc748594b61 19:79e1d62f0115
70 Edata=sqrt(prod(SMALL.Problem.blocksize)) * SMALL.Problem.sigma * SMALL.Problem.gain; 70 Edata=sqrt(prod(SMALL.Problem.blocksize)) * SMALL.Problem.sigma * SMALL.Problem.gain;
71 SMALL.DL(1).param=struct(... 71 SMALL.DL(1).param=struct(...
72 'Edata', Edata,... 72 'Edata', Edata,...
73 'initdict', SMALL.Problem.initdict,... 73 'initdict', SMALL.Problem.initdict,...
74 'dictsize', SMALL.Problem.p,... 74 'dictsize', SMALL.Problem.p,...
75 'iternum', 20,... 75 'iternum', 20);
76 'memusage', 'high'); 76 %'memusage', 'high');
77 77
78 % Learn the dictionary 78 % Learn the dictionary
79 79
80 SMALL.DL(1) = SMALL_learn(SMALL.Problem, SMALL.DL(1)); 80 SMALL.DL(1) = SMALL_learn(SMALL.Problem, SMALL.DL(1));
81 81
182 figure('Name', 'KSVD vs SPAMS'); 182 figure('Name', 'KSVD vs SPAMS');
183 183
184 subplot(1,2,1); plot(Training_size, time(1,:), 'ro-', Training_size, time(2,:), 'b*-'); 184 subplot(1,2,1); plot(Training_size, time(1,:), 'ro-', Training_size, time(2,:), 'b*-');
185 legend('KSVD','SPAMS',0); 185 legend('KSVD','SPAMS',0);
186 title('Time vs Training size'); 186 title('Time vs Training size');
187 xlabel('Training Size (Num. of patches)');
188 ylabel('Time(s)');
187 subplot(1,2,2); plot(Training_size, psnr(1,:), 'ro-', Training_size, psnr(2,:), 'b*-'); 189 subplot(1,2,2); plot(Training_size, psnr(1,:), 'ro-', Training_size, psnr(2,:), 'b*-');
188 legend('KSVD','SPAMS',0); 190 legend('KSVD','SPAMS',0);
189 title('PSNR vs Training size'); 191 title('PSNR vs Training size');
192 xlabel('Training Size (Num. of patches)');
193 ylabel('PSNR(dB)');