Mercurial > hg > smallbox
comparison DL/RLS-DLA/SMALL_rlsdla.m @ 114:04cce72a4dc8 sup_158_IMG_Processing_toolbox_
SMALL_rlsdla.m - IMP toolbox dependency removed
author | Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk> |
---|---|
date | Tue, 24 May 2011 15:14:39 +0100 |
parents | fd1c32cda22c |
children | 8e660fd14774 |
comparison
equal
deleted
inserted
replaced
113:028599837f1d | 114:04cce72a4dc8 |
---|---|
131 show_dictionary=0; | 131 show_dictionary=0; |
132 show_iter=0; | 132 show_iter=0; |
133 end | 133 end |
134 | 134 |
135 if (show_dictionary) | 135 if (show_dictionary) |
136 dictimg = showdict(D,[8 8],round(sqrt(size(D,2))),round(sqrt(size(D,2))),'lines','highcontrast'); | 136 dictimg = SMALL_showdict(D,[8 8],round(sqrt(size(D,2))),round(sqrt(size(D,2))),'lines','highcontrast'); |
137 figure(2); imshow(imresize(dictimg,2,'nearest')); | 137 figure(2); imagesc(dictimg);colormap(gray);axis off; axis image; |
138 end | 138 end |
139 % Forgetting factor | 139 % Forgetting factor |
140 | 140 |
141 if (isfield(params,'forgettingMode')) | 141 if (isfield(params,'forgettingMode')) |
142 switch lower(params.forgettingMode) | 142 switch lower(params.forgettingMode) |
191 D = D + (alfa * residual) * u'; | 191 D = D + (alfa * residual) * u'; |
192 | 192 |
193 | 193 |
194 C = C - (alfa * u)* u'; | 194 C = C - (alfa * u)* u'; |
195 if (show_dictionary &&(mod(i,show_iter)==0)) | 195 if (show_dictionary &&(mod(i,show_iter)==0)) |
196 dictimg = showdict(D,[8 8],... | 196 dictimg = SMALL_showdict(D,[8 8],... |
197 round(sqrt(size(D,2))),round(sqrt(size(D,2))),'lines','highcontrast'); | 197 round(sqrt(size(D,2))),round(sqrt(size(D,2))),'lines','highcontrast'); |
198 figure(2); imshow(imresize(dictimg,2,'nearest')); | 198 figure(2); imagesc(dictimg);colormap(gray);axis off; axis image; |
199 pause(0.02); | 199 pause(0.02); |
200 end | 200 end |
201 end | 201 end |
202 | 202 |
203 Dictionary = D; | 203 Dictionary = D; |