annotate examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m @ 48:87b76775083b

(none)
author idamnjanovic
date Mon, 14 Mar 2011 15:43:50 +0000
parents 623fcf3a69b1
children 55faa9b5d1ac
rev   line source
idamnjanovic@42 1 %% DICTIONARY LEARNING FOR IMAGE DENOISING
idamnjanovic@42 2 % This file contains an example of how SMALLbox can be used to test different
idamnjanovic@42 3 % dictionary learning techniques in Image Denoising problem.
idamnjanovic@42 4 % It calls generateImageDenoiseProblem that will let you to choose image,
idamnjanovic@42 5 % add noise and use noisy image to generate training set for dictionary
idamnjanovic@42 6 % learning.
idamnjanovic@42 7 % Three dictionary learning techniques were compared:
idamnjanovic@42 8 % - KSVD - M. Elad, R. Rubinstein, and M. Zibulevsky, "Efficient
idamnjanovic@42 9 % Implementation of the K-SVD Algorithm using Batch Orthogonal
idamnjanovic@42 10 % Matching Pursuit", Technical Report - CS, Technion, April 2008.
idamnjanovic@42 11 % - KSVDS - R. Rubinstein, M. Zibulevsky, and M. Elad, "Learning Sparse
idamnjanovic@42 12 % Dictionaries for Sparse Signal Approximation", Technical
idamnjanovic@42 13 % Report - CS, Technion, June 2009.
idamnjanovic@42 14 % - SPAMS - J. Mairal, F. Bach, J. Ponce and G. Sapiro. Online
idamnjanovic@42 15 % Dictionary Learning for Sparse Coding. International
idamnjanovic@42 16 % Conference on Machine Learning,Montreal, Canada, 2009
idamnjanovic@42 17 %
idamnjanovic@42 18 %
idamnjanovic@42 19 % Ivan Damnjanovic 2010
idamnjanovic@42 20 %%
idamnjanovic@42 21
idamnjanovic@42 22
idamnjanovic@42 23
idamnjanovic@42 24 % If you want to load the image outside of generateImageDenoiseProblem
idamnjanovic@42 25 % function uncomment following lines. This can be useful if you want to
idamnjanovic@42 26 % denoise more then one image for example.
idamnjanovic@42 27 clear;
idamnjanovic@42 28 TMPpath=pwd;
idamnjanovic@42 29 FS=filesep;
idamnjanovic@42 30 [pathstr1, name, ext, versn] = fileparts(which('SMALLboxSetup.m'));
idamnjanovic@42 31 cd([pathstr1,FS,'data',FS,'images']);
idamnjanovic@42 32 load('test_image.mat');
idamnjanovic@42 33 % [filename,pathname] = uigetfile({'*.png;'},'Select a file containin pre-calculated notes');
idamnjanovic@42 34 % [pathstr, name, ext, versn] = fileparts(filename);
idamnjanovic@42 35 % test_image = imread(filename);
idamnjanovic@42 36 % test_image = double(test_image);
idamnjanovic@42 37 % cd(TMPpath);
idamnjanovic@42 38 % SMALL.Problem.name=name;
idamnjanovic@42 39
idamnjanovic@42 40 noise_level=[10 20 25 50 100];
idamnjanovic@42 41 % Defining Image Denoising Problem as Dictionary Learning
idamnjanovic@42 42 % Problem. As an input we set the number of training patches.
idamnjanovic@42 43 for noise_ind=1:1
idamnjanovic@42 44 for im_num=4:4
idamnjanovic@42 45 SMALL.Problem = generateImageDenoiseProblem(test_image(im_num).i, 40000, '',512, noise_level(noise_ind));
idamnjanovic@42 46 SMALL.Problem.name=im_num;
idamnjanovic@42 47
idamnjanovic@42 48 results(noise_ind,im_num).noisy_psnr=SMALL.Problem.noisy_psnr;
idamnjanovic@42 49
idamnjanovic@42 50 %%
idamnjanovic@42 51 % Use KSVD Dictionary Learning Algorithm to Learn overcomplete dictionary
idamnjanovic@42 52
idamnjanovic@42 53 % Initialising Dictionary structure
idamnjanovic@42 54 % Setting Dictionary structure fields (toolbox, name, param, D and time)
idamnjanovic@42 55 % to zero values
idamnjanovic@42 56
idamnjanovic@42 57 SMALL.DL(1)=SMALL_init_DL();
idamnjanovic@42 58
idamnjanovic@42 59 % Defining the parameters needed for dictionary learning
idamnjanovic@42 60
idamnjanovic@42 61 SMALL.DL(1).toolbox = 'KSVD';
idamnjanovic@42 62 SMALL.DL(1).name = 'ksvd';
idamnjanovic@42 63
idamnjanovic@42 64 % Defining the parameters for KSVD
idamnjanovic@42 65 % In this example we are learning 256 atoms in 20 iterations, so that
idamnjanovic@42 66 % every patch in the training set can be represented with target error in
idamnjanovic@42 67 % L2-norm (EData)
idamnjanovic@42 68 % Type help ksvd in MATLAB prompt for more options.
idamnjanovic@42 69
idamnjanovic@42 70 Edata=sqrt(prod(SMALL.Problem.blocksize)) * SMALL.Problem.sigma * SMALL.Problem.gain;
idamnjanovic@42 71 maxatoms = floor(prod(SMALL.Problem.blocksize)/2);
idamnjanovic@42 72 SMALL.DL(1).param=struct(...
idamnjanovic@42 73 'Edata', Edata,...
idamnjanovic@42 74 'initdict', SMALL.Problem.initdict,...
idamnjanovic@42 75 'dictsize', SMALL.Problem.p,...
idamnjanovic@42 76 'exact', 1, ...
idamnjanovic@42 77 'iternum', 20,...
idamnjanovic@42 78 'memusage', 'high');
idamnjanovic@42 79
idamnjanovic@42 80 % Learn the dictionary
idamnjanovic@42 81
idamnjanovic@42 82 SMALL.DL(1) = SMALL_learn(SMALL.Problem, SMALL.DL(1));
idamnjanovic@42 83
idamnjanovic@42 84 % Set SMALL.Problem.A dictionary
idamnjanovic@42 85 % (backward compatiblity with SPARCO: solver structure communicate
idamnjanovic@42 86 % only with Problem structure, ie no direct communication between DL and
idamnjanovic@42 87 % solver structures)
idamnjanovic@42 88
idamnjanovic@42 89 SMALL.Problem.A = SMALL.DL(1).D;
idamnjanovic@42 90 SMALL.Problem.reconstruct = @(x) ImgDenoise_reconstruct(x, SMALL.Problem);
idamnjanovic@42 91
idamnjanovic@42 92 %%
idamnjanovic@42 93 % Initialising solver structure
idamnjanovic@42 94 % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 95 % reconstructed and time) to zero values
idamnjanovic@42 96
idamnjanovic@42 97 SMALL.solver(1)=SMALL_init_solver;
idamnjanovic@42 98
idamnjanovic@42 99 % Defining the parameters needed for image denoising
idamnjanovic@42 100
idamnjanovic@42 101 SMALL.solver(1).toolbox='ompbox';
idamnjanovic@42 102 SMALL.solver(1).name='omp2';
idamnjanovic@42 103 SMALL.solver(1).param=struct(...
idamnjanovic@42 104 'epsilon',Edata,...
idamnjanovic@42 105 'maxatoms', maxatoms);
idamnjanovic@42 106
idamnjanovic@42 107 % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 108 % but backward compatible with KSVD definition of denoising
idamnjanovic@42 109
idamnjanovic@42 110 SMALL.solver(1)=SMALL_solve(SMALL.Problem, SMALL.solver(1));
idamnjanovic@42 111 SMALL.solver(1).reconstructed.psnr
idamnjanovic@42 112 %%
idamnjanovic@42 113 % Use KSVDS Dictionary Learning Algorithm to denoise image
idamnjanovic@42 114
idamnjanovic@42 115 % Initialising solver structure
idamnjanovic@42 116 % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 117 % reconstructed and time) to zero values
idamnjanovic@42 118 %
idamnjanovic@42 119 % SMALL.DL(2)=SMALL_init_DL();
idamnjanovic@42 120 %
idamnjanovic@42 121 % % Defining the parameters needed for dictionary learning
idamnjanovic@42 122 %
idamnjanovic@42 123 % SMALL.DL(2).toolbox = 'KSVDS';
idamnjanovic@42 124 % SMALL.DL(2).name = 'ksvds';
idamnjanovic@42 125 %
idamnjanovic@42 126 % % Defining the parameters for KSVDS
idamnjanovic@42 127 % % In this example we are learning 256 atoms in 20 iterations, so that
idamnjanovic@42 128 % % every patch in the training set can be represented with target error in
idamnjanovic@42 129 % % L2-norm (EDataS). We also impose "double sparsity" - dictionary itself
idamnjanovic@42 130 % % has to be sparse in the given base dictionary (Tdict - number of
idamnjanovic@42 131 % % nonzero elements per atom).
idamnjanovic@42 132 % % Type help ksvds in MATLAB prompt for more options.
idamnjanovic@42 133 %
idamnjanovic@42 134 %
idamnjanovic@42 135 % SMALL.DL(2).param=struct(...
idamnjanovic@42 136 % 'Edata', Edata, ...
idamnjanovic@42 137 % 'Tdict', 6,...
idamnjanovic@42 138 % 'stepsize', 1,...
idamnjanovic@42 139 % 'dictsize', SMALL.Problem.p,...
idamnjanovic@42 140 % 'iternum', 20,...
idamnjanovic@42 141 % 'memusage', 'high');
idamnjanovic@42 142 % SMALL.DL(2).param.initA = speye(SMALL.Problem.p);
idamnjanovic@42 143 % SMALL.DL(2).param.basedict{1} = odctdict(8,16);
idamnjanovic@42 144 % SMALL.DL(2).param.basedict{2} = odctdict(8,16);
idamnjanovic@42 145 %
idamnjanovic@42 146 % % Learn the dictionary
idamnjanovic@42 147 %
idamnjanovic@42 148 % SMALL.DL(2) = SMALL_learn(SMALL.Problem, SMALL.DL(2));
idamnjanovic@42 149
idamnjanovic@42 150 % Set SMALL.Problem.A dictionary and SMALL.Problem.basedictionary
idamnjanovic@42 151 % (backward compatiblity with SPARCO: solver structure communicate
idamnjanovic@42 152 % only with Problem structure, ie no direct communication between DL and
idamnjanovic@42 153 % solver structures)
idamnjanovic@42 154
idamnjanovic@42 155 SMALL.Problem.A = SMALL.Problem.initdict;
idamnjanovic@42 156 % SMALL.Problem.basedict{1} = SMALL.DL(2).param.basedict{1};
idamnjanovic@42 157 % SMALL.Problem.basedict{2} = SMALL.DL(2).param.basedict{2};
idamnjanovic@42 158 SMALL.DL(2).D=SMALL.Problem.initdict;
idamnjanovic@42 159 SparseDict=0;
idamnjanovic@42 160 SMALL.Problem.reconstruct = @(x) ImgDenoise_reconstruct(x, SMALL.Problem, SparseDict);
idamnjanovic@42 161
idamnjanovic@42 162 %%
idamnjanovic@42 163 % Initialising solver structure
idamnjanovic@42 164 % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 165 % reconstructed and time) to zero values
idamnjanovic@42 166
idamnjanovic@42 167 SMALL.solver(2)=SMALL_init_solver;
idamnjanovic@42 168
idamnjanovic@42 169 % Defining the parameters needed for image denoising
idamnjanovic@42 170
idamnjanovic@42 171 SMALL.solver(2).toolbox='ompbox';
idamnjanovic@42 172 SMALL.solver(2).name='omp2';
idamnjanovic@42 173 SMALL.solver(2).param=struct(...
idamnjanovic@42 174 'epsilon',Edata,...
idamnjanovic@42 175 'maxatoms', maxatoms);
idamnjanovic@42 176
idamnjanovic@42 177 % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 178 % but backward compatible with KSVD definition of denoising
idamnjanovic@42 179 % Pay attention that since implicit base dictionary is used, denoising
idamnjanovic@42 180 % can be much faster then using explicit dictionary in KSVD example.
idamnjanovic@42 181
idamnjanovic@42 182 SMALL.solver(2)=SMALL_solve(SMALL.Problem, SMALL.solver(2));
idamnjanovic@42 183 %%
idamnjanovic@42 184
idamnjanovic@42 185 for i =1:1
idamnjanovic@42 186
idamnjanovic@42 187 X=SMALL.Problem.b1;
idamnjanovic@42 188 X_norm=sqrt(sum(X.^2, 1));
idamnjanovic@42 189 [X_norm_sort, p]=sort(X_norm);
idamnjanovic@42 190 p1=p(X_norm_sort>Edata);
idamnjanovic@42 191 if size(p1,2)>140000
idamnjanovic@42 192 p2 = randperm(size(p1,2));
idamnjanovic@42 193 p2=sort(p2(1:40000));
idamnjanovic@42 194 size(p2,2)
idamnjanovic@42 195 SMALL.Problem.b=X(:,p1(p2));
idamnjanovic@42 196 else
idamnjanovic@42 197 size(p1,2)
idamnjanovic@42 198 SMALL.Problem.b=X(:,p1);
idamnjanovic@42 199
idamnjanovic@42 200 end
idamnjanovic@42 201
idamnjanovic@42 202 lambda=0.9998
idamnjanovic@42 203
idamnjanovic@42 204 % Use Recursive Least Squares
idamnjanovic@42 205 % to Learn overcomplete dictionary
idamnjanovic@42 206
idamnjanovic@42 207 % Initialising Dictionary structure
idamnjanovic@42 208 % Setting Dictionary structure fields (toolbox, name, param, D and time)
idamnjanovic@42 209 % to zero values
idamnjanovic@42 210
idamnjanovic@42 211 SMALL.DL(3)=SMALL_init_DL();
idamnjanovic@42 212
idamnjanovic@42 213 % Defining fields needed for dictionary learning
idamnjanovic@42 214
idamnjanovic@42 215 SMALL.DL(3).toolbox = 'SMALL';
idamnjanovic@42 216 SMALL.DL(3).name = 'SMALL_rlsdla';
idamnjanovic@42 217 SMALL.DL(3).param=struct(...
idamnjanovic@42 218 'Edata', Edata,...
idamnjanovic@42 219 'initdict', SMALL.Problem.initdict,...
idamnjanovic@42 220 'dictsize', SMALL.Problem.p,...
idamnjanovic@42 221 'forgettingMode', 'FIX',...
idamnjanovic@42 222 'forgettingFactor', lambda);
idamnjanovic@42 223
idamnjanovic@42 224 % % Type 'help mexTrainDL in MATLAB prompt for explanation of parameters.
idamnjanovic@42 225 %
idamnjanovic@42 226 % SMALL.DL(3).param=struct(...
idamnjanovic@42 227 % 'D', SMALL.Problem.initdict,...
idamnjanovic@42 228 % 'K', SMALL.Problem.p,...
idamnjanovic@42 229 % 'lambda', 2,...
idamnjanovic@42 230 % 'iter', 200,...
idamnjanovic@42 231 % 'mode', 3, ...
idamnjanovic@42 232 % 'modeD', 0);
idamnjanovic@42 233
idamnjanovic@42 234 % Learn the dictionary
idamnjanovic@42 235
idamnjanovic@42 236 SMALL.DL(3) = SMALL_learn(SMALL.Problem, SMALL.DL(3));
idamnjanovic@42 237 %SMALL.DL(3).D(:,1)=SMALL.DL(1).D(:,1);
idamnjanovic@42 238 %
idamnjanovic@42 239 % % Set SMALL.Problem.A dictionary
idamnjanovic@42 240 % % (backward compatiblity with SPARCO: solver structure communicate
idamnjanovic@42 241 % % only with Problem structure, ie no direct communication between DL and
idamnjanovic@42 242 % % solver structures)
idamnjanovic@42 243 %
idamnjanovic@42 244 %
idamnjanovic@42 245 %
idamnjanovic@42 246 % %%
idamnjanovic@42 247 % % Initialising solver structure
idamnjanovic@42 248 % % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 249 % % reconstructed and time) to zero values
idamnjanovic@42 250 % SMALL.Problem.A = SMALL.DL(1).D;
idamnjanovic@42 251 % SMALL.Problem.reconstruct = @(x) ImgDenoise_reconstruct(x, SMALL.Problem);
idamnjanovic@42 252 % maxatoms=5;
idamnjanovic@42 253 % SMALL.solver(3)=SMALL_init_solver;
idamnjanovic@42 254 %
idamnjanovic@42 255 % % Defining the parameters needed for denoising
idamnjanovic@42 256 %
idamnjanovic@42 257 % % SMALL.solver(3).toolbox='SPAMS';
idamnjanovic@42 258 % % SMALL.solver(3).name='mexLasso';
idamnjanovic@42 259 % % SMALL.solver(3).param=struct(...
idamnjanovic@42 260 % % 'mode', 1, ...
idamnjanovic@42 261 % % 'lambda',Edata*Edata,...
idamnjanovic@42 262 % % 'L', maxatoms);
idamnjanovic@42 263 % % % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 264 % % % but backward compatible with KSVD definition of denoising
idamnjanovic@42 265 % %
idamnjanovic@42 266 % % SMALL.solver(3)=SMALL_solve(SMALL.Problem, SMALL.solver(3));
idamnjanovic@42 267 % SMALL.solver(3).toolbox='SMALL';
idamnjanovic@42 268 % SMALL.solver(3).name='SMALL_cgp';
idamnjanovic@42 269 % SMALL.solver(3).param=sprintf('%d, %.2f', maxatoms, sqrt(Edata));
idamnjanovic@42 270 % % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 271 % % but backward compatible with KSVD definition of denoising
idamnjanovic@42 272 %
idamnjanovic@42 273 % SMALL.solver(3)=SMALL_solve(SMALL.Problem, SMALL.solver(3));
idamnjanovic@42 274
idamnjanovic@42 275 % %%
idamnjanovic@42 276 % % Use RLS-DLA
idamnjanovic@42 277 %
idamnjanovic@42 278 % % Initialising Dictionary structure
idamnjanovic@42 279 % % Setting Dictionary structure fields (toolbox, name, param, D and time)
idamnjanovic@42 280 % % to zero values
idamnjanovic@42 281 %
idamnjanovic@42 282 % SMALL.DL(3)=SMALL_init_DL();
idamnjanovic@42 283 %
idamnjanovic@42 284 % % Defining fields needed for dictionary learning
idamnjanovic@42 285 %
idamnjanovic@42 286 % SMALL.DL(3).toolbox = 'mpv2';
idamnjanovic@42 287 % SMALL.DL(3).name = 'rlsdla';
idamnjanovic@42 288 %
idamnjanovic@42 289 % % Type 'help mexTrainDL in MATLAB prompt for explanation of parameters.
idamnjanovic@42 290 %
idamnjanovic@42 291 % SMALL.DL(3).param=struct(...
idamnjanovic@42 292 % 'D', SMALL.Problem.initdict,...
idamnjanovic@42 293 % 'K', SMALL.Problem.p,...
idamnjanovic@42 294 % 'abs', Edata*Edata,...
idamnjanovic@42 295 % 'lambda', 0.995,...
idamnjanovic@42 296 % 'iternum',1);
idamnjanovic@42 297 %
idamnjanovic@42 298 % % Learn the dictionary
idamnjanovic@42 299 %
idamnjanovic@42 300 % SMALL.DL(3) = SMALL_learn(SMALL.Problem, SMALL.DL(3));
idamnjanovic@42 301 %
idamnjanovic@42 302 % % Set SMALL.Problem.A dictionary
idamnjanovic@42 303 % % (backward compatiblity with SPARCO: solver structure communicate
idamnjanovic@42 304 % % only with Problem structure, ie no direct communication between DL and
idamnjanovic@42 305 % % solver structures)
idamnjanovic@42 306 %
idamnjanovic@42 307 %
idamnjanovic@42 308
idamnjanovic@42 309 %%
idamnjanovic@42 310 % Initialising solver structure
idamnjanovic@42 311 % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 312 % reconstructed and time) to zero values
idamnjanovic@42 313 %SMALL.DL(3).D(:,225:256)=0;
idamnjanovic@42 314 SMALL.Problem.A = SMALL.DL(3).D;
idamnjanovic@42 315 SMALL.Problem.reconstruct = @(x) ImgDenoise_reconstruct(x, SMALL.Problem);
idamnjanovic@42 316 %maxatoms=32;
idamnjanovic@42 317 SMALL.solver(3)=SMALL_init_solver;
idamnjanovic@42 318
idamnjanovic@42 319 % Defining the parameters needed for denoising
idamnjanovic@42 320
idamnjanovic@42 321 % SMALL.solver(3).toolbox='SPAMS';
idamnjanovic@42 322 % SMALL.solver(3).name='mexLasso';
idamnjanovic@42 323 % SMALL.solver(3).param=struct(...
idamnjanovic@42 324 % 'mode', 1, ...
idamnjanovic@42 325 % 'lambda',Edata*Edata,...
idamnjanovic@42 326 % 'L', maxatoms);
idamnjanovic@42 327 % % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 328 % % but backward compatible with KSVD definition of denoising
idamnjanovic@42 329 %
idamnjanovic@42 330 % SMALL.solver(3)=SMALL_solve(SMALL.Problem, SMALL.solver(3));
idamnjanovic@42 331
idamnjanovic@42 332 % Initialising solver structure
idamnjanovic@42 333 % Setting solver structure fields (toolbox, name, param, solution,
idamnjanovic@42 334 % reconstructed and time) to zero values
idamnjanovic@42 335
idamnjanovic@42 336 SMALL.solver(3)=SMALL_init_solver;
idamnjanovic@42 337
idamnjanovic@42 338 % Defining the parameters needed for image denoising
idamnjanovic@42 339
idamnjanovic@42 340 SMALL.solver(3).toolbox='ompbox';
idamnjanovic@42 341 SMALL.solver(3).name='omp2';
idamnjanovic@42 342 SMALL.solver(3).param=struct(...
idamnjanovic@42 343 'epsilon',Edata,...
idamnjanovic@42 344 'maxatoms', maxatoms);
idamnjanovic@42 345 % SMALL.solver(3).toolbox='SPAMS';
idamnjanovic@42 346 % SMALL.solver(3).name='mexLasso';
idamnjanovic@42 347 % SMALL.solver(3).param=struct(...
idamnjanovic@42 348 % 'mode', 2, ...
idamnjanovic@42 349 % 'lambda',40,...
idamnjanovic@42 350 % 'L', maxatoms);
idamnjanovic@42 351
idamnjanovic@42 352 % Denoising the image - SMALL_denoise function is similar to SMALL_solve,
idamnjanovic@42 353 % but backward compatible with KSVD definition of denoising
idamnjanovic@42 354
idamnjanovic@42 355 SMALL.solver(3)=SMALL_solve(SMALL.Problem, SMALL.solver(3));
idamnjanovic@42 356 % Plot results and save midi files
idamnjanovic@42 357 SMALL.solver(3).reconstructed.psnr
idamnjanovic@42 358 % show results %
idamnjanovic@42 359
idamnjanovic@42 360 SMALL_ImgDeNoiseResult(SMALL);
idamnjanovic@42 361 end
idamnjanovic@42 362 results(noise_ind,im_num).psnr.ksvd=SMALL.solver(1).reconstructed.psnr;
idamnjanovic@42 363 results(noise_ind,im_num).psnr.odct=SMALL.solver(2).reconstructed.psnr;
idamnjanovic@42 364 results(noise_ind,im_num).psnr.rlsdla=SMALL.solver(3).reconstructed.psnr;
idamnjanovic@42 365 results(noise_ind,im_num).vmrse.ksvd=SMALL.solver(1).reconstructed.vmrse;
idamnjanovic@42 366 results(noise_ind,im_num).vmrse.odct=SMALL.solver(2).reconstructed.vmrse;
idamnjanovic@42 367 results(noise_ind,im_num).vmrse.rlsdla=SMALL.solver(3).reconstructed.vmrse;
idamnjanovic@42 368 results(noise_ind,im_num).ssim.ksvd=SMALL.solver(1).reconstructed.ssim;
idamnjanovic@42 369 results(noise_ind,im_num).ssim.odct=SMALL.solver(2).reconstructed.ssim;
idamnjanovic@42 370 results(noise_ind,im_num).ssim.rlsdla=SMALL.solver(3).reconstructed.ssim;
idamnjanovic@42 371
idamnjanovic@42 372 results(noise_ind,im_num).time.ksvd=SMALL.solver(1).time+SMALL.DL(1).time;
idamnjanovic@42 373 results(noise_ind,im_num).time.rlsdla.time=SMALL.solver(3).time+SMALL.DL(3).time;
idamnjanovic@42 374 %clear SMALL;
idamnjanovic@42 375 end
idamnjanovic@42 376 end
idamnjanovic@42 377 save results.mat results