comparison examples/Image Denoising/SMALL_ImgDenoise_DL_test_KSVDvsRLSDLA.m @ 77:62f20b91d870

add routines from sparco problems privite folder to {root}\util some changes to ksvd vs rlsdla image denoising example
author Ivan <ivan.damnjanovic@eecs.qmul.ac.uk>
date Fri, 25 Mar 2011 14:01:50 +0000
parents 55faa9b5d1ac
children 4302a91e6033
comparison
equal deleted inserted replaced
76:d052ec5b742f 77:62f20b91d870
28 TMPpath=pwd; 28 TMPpath=pwd;
29 FS=filesep; 29 FS=filesep;
30 [pathstr1, name, ext, versn] = fileparts(which('SMALLboxSetup.m')); 30 [pathstr1, name, ext, versn] = fileparts(which('SMALLboxSetup.m'));
31 cd([pathstr1,FS,'data',FS,'images']); 31 cd([pathstr1,FS,'data',FS,'images']);
32 load('test_image.mat'); 32 load('test_image.mat');
33 cd(TMPpath);
33 % [filename,pathname] = uigetfile({'*.png;'},'Select a file containin pre-calculated notes'); 34 % [filename,pathname] = uigetfile({'*.png;'},'Select a file containin pre-calculated notes');
34 % [pathstr, name, ext, versn] = fileparts(filename); 35 % [pathstr, name, ext, versn] = fileparts(filename);
35 % test_image = imread(filename); 36 % test_image = imread(filename);
36 % test_image = double(test_image); 37 % test_image = double(test_image);
37 % cd(TMPpath); 38 % cd(TMPpath);
39 40
40 noise_level=[10 20 25 50 100]; 41 noise_level=[10 20 25 50 100];
41 % Defining Image Denoising Problem as Dictionary Learning 42 % Defining Image Denoising Problem as Dictionary Learning
42 % Problem. As an input we set the number of training patches. 43 % Problem. As an input we set the number of training patches.
43 for noise_ind=1:1 44 for noise_ind=1:1
44 for im_num=4:4 45 for im_num=2:2
45 SMALL.Problem = generateImageDenoiseProblem(test_image(im_num).i, 40000, '',256, noise_level(noise_ind)); 46 SMALL.Problem = generateImageDenoiseProblem(test_image(im_num).i, 40000, '',256, noise_level(noise_ind));
46 SMALL.Problem.name=im_num; 47 SMALL.Problem.name=int2str(im_num);
47 48
48 results(noise_ind,im_num).noisy_psnr=SMALL.Problem.noisy_psnr; 49 results(noise_ind,im_num).noisy_psnr=SMALL.Problem.noisy_psnr;
49 50
50 %% 51 %%
51 % Use KSVD Dictionary Learning Algorithm to Learn overcomplete dictionary 52 % Use KSVD Dictionary Learning Algorithm to Learn overcomplete dictionary