comparison Problems/generatePierreProblem.m @ 232:15fd4c5be71a

merge
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 19 Apr 2012 15:55:14 +0100
parents b1db9e090542
children
comparison
equal deleted inserted replaced
223:efe179d9757c 232:15fd4c5be71a
86 86
87 % blocksize % 87 % blocksize %
88 if (numel(blocksize)==1) 88 if (numel(blocksize)==1)
89 blocksize = ones(1,p)*blocksize; 89 blocksize = ones(1,p)*blocksize;
90 end 90 end
91 %%
92 %% create dictionary data %%
93 91
94 S=im2colstep(src,blocksize); 92 %% create dictionary data
93 S=im2col(src,blocksize,'sliding');
95 94
96 for j= 1:size(S,2) 95 for j= 1:size(S,2)
97 S(:,j)=S(:,j)./norm(S(:,j)); 96 S(:,j)=S(:,j)./norm(S(:,j));
98 end 97 end
99 98
100 %% create measurement matrix %% 99 %% observed patches matrix
101 100 % that are going to be decomposed on the dictionary
102 T=im2colstep(trg,blocksize, blocksize); 101 T=im2col(trg,blocksize, 'distinct');
103 102
104 %% output structure %% 103 %% output structure %%
105 104
106 data.imageSrc = src; 105 data.imageSrc = src;
107 data.imageTrg = trg; 106 data.imageTrg = trg;