comparison examples/Pierre Villars/Pierre_Villars_Example.m @ 124:436e6c044099 sup_158_IMG_Processing_toolbox_

Pierre_Villars_Example.m - removed IMP toolbox dependencies
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Wed, 25 May 2011 15:20:04 +0100
parents dab78a3598b6
children 8e660fd14774
comparison
equal deleted inserted replaced
123:0e2959c83824 124:436e6c044099
26 SMALL.Problem = Pierre_Problem(); 26 SMALL.Problem = Pierre_Problem();
27 27
28 % Show original image and image that is used as a dictionary 28 % Show original image and image that is used as a dictionary
29 figure('Name', 'Original and Dictionary Image'); 29 figure('Name', 'Original and Dictionary Image');
30 30
31 subplot(1,2,1); imshow(SMALL.Problem.imageTrg/SMALL.Problem.maxval); 31 subplot(1,2,1); imagesc(SMALL.Problem.imageTrg/SMALL.Problem.maxval);
32 title('Original Image'); 32 title('Original Image');colormap(gray);axis off; axis image;
33 subplot(1,2,2); imshow(SMALL.Problem.imageSrc/SMALL.Problem.maxval); 33 subplot(1,2,2); imagesc(SMALL.Problem.imageSrc/SMALL.Problem.maxval);
34 title('Dictionary image:'); 34 title('Dictionary image:');colormap(gray);axis off; axis image;
35 35
36 % Using ten different dictionary sizes. First dictionary will contain all 36 % Using ten different dictionary sizes. First dictionary will contain all
37 % patches from the source image and last one will have only 37 % patches from the source image and last one will have only
38 % num_src_patches/2^9 atoms representing equidistant patches taken from 38 % num_src_patches/2^9 atoms representing equidistant patches taken from
39 % the source image. 39 % the source image.
78 78
79 79
80 %% show reconstructed image %% 80 %% show reconstructed image %%
81 figure('Name', sprintf('dictsize=%d', dictsize(1,i))); 81 figure('Name', sprintf('dictsize=%d', dictsize(1,i)));
82 82
83 imshow(SMALL.solver(i).reconstructed.image/SMALL.Problem.maxval); 83 imagesc(SMALL.solver(i).reconstructed.image/SMALL.Problem.maxval);
84 title(sprintf('Reconstructed image, PSNR: %.2f dB in %.2f s',... 84 title(sprintf('Reconstructed image, PSNR: %.2f dB in %.2f s',...
85 SMALL.solver(i).reconstructed.psnr, SMALL.solver(i).time )); 85 SMALL.solver(i).reconstructed.psnr, SMALL.solver(i).time ));
86 86 colormap(gray);axis off; axis image;
87 87
88 end 88 end
89 89
90 %% plot time and psnr given dictionary size %% 90 %% plot time and psnr given dictionary size %%
91 figure('Name', 'time and psnr'); 91 figure('Name', 'time and psnr');