Mercurial > hg > smallbox
comparison Problems/generatePierreProblem.m @ 230:8768cefe5753 luisf_dev
Fixed the issues that were preventing the Pierre Villars experiment to run correctly.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Wed, 18 Apr 2012 15:23:39 +0100 |
parents | 9c418bea7f6a |
children | b1db9e090542 |
comparison
equal
deleted
inserted
replaced
229:ae71e160f80c | 230:8768cefe5753 |
---|---|
89 blocksize = ones(1,p)*blocksize; | 89 blocksize = ones(1,p)*blocksize; |
90 end | 90 end |
91 %% | 91 %% |
92 %% create dictionary data %% | 92 %% create dictionary data %% |
93 | 93 |
94 S=im2colstep(src,blocksize); | 94 S=im2col(src,blocksize,'sliding'); |
95 | |
95 | 96 |
96 for j= 1:size(S,2) | 97 for j= 1:size(S,2) |
97 S(:,j)=S(:,j)./norm(S(:,j)); | 98 S(:,j)=S(:,j)./norm(S(:,j)); |
98 end | 99 end |
99 | 100 |
100 %% create measurement matrix %% | 101 %% create measurement matrix %% |
101 | 102 |
102 T=im2colstep(trg,blocksize, blocksize); | 103 T=im2col(trg,blocksize, 'distinct'); |
103 | 104 |
104 %% output structure %% | 105 %% output structure %% |
105 | 106 |
106 data.imageSrc = src; | 107 data.imageSrc = src; |
107 data.imageTrg = trg; | 108 data.imageTrg = trg; |