Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more sophisticated progress bar

  • Loading branch information...
commit 3ffacc27f410d7538b5f465bbf397671d775c724 1 parent fcafa0c
@cvondrick cvondrick authored
Showing with 10 additions and 4 deletions.
  1. +6 −1 internal/learnpairdict.m
  2. +4 −3 invertHOG.m
View
7 internal/learnpairdict.m
@@ -144,9 +144,14 @@
c = 1;
fprintf('ihog: loading data: ');
+lastmsg = '';
+fprintf(lastmsg);
while true,
for k=1:length(stream),
- fprintf('.');
+ fprintf(repmat('\b', 1, length(sprintf(lastmsg))));
+ lastmsg = sprintf('%04.1f%%%% #windows: %08i/%08i #images: %05i', c/n*100, c, n, k);
+ fprintf(lastmsg);
+
im = double(imread(stream{k})) / 255.;
im = mean(im,3);
feat = features(repmat(im, [1 1 3]), sbin);
View
7 invertHOG.m
@@ -24,10 +24,11 @@
if ~exist('pd.mat', 'file'),
fprintf('ihog: notice: unable to find paired dictionary\n');
fprintf('ihog: notice: attempting to download in 3');
- pause(1); fprintf(', 2'); pause(1); fprintf(', 1'); pause(1);
- fprintf(', now\n');
+ pause(1); fprintf('\b2'); pause(1); fprintf('\b1'); pause(1);
+ fprintf('\b0\n');
+ fprintf('ihog: notice: downloading...');
urlwrite('http://people.csail.mit.edu/vondrick/pd.mat', 'pd.mat');
- fprintf('ihog: notice: download complete\n');
+ fprintf('done\n');
end
ihog_pd = load('pd.mat');
end
Please sign in to comment.
Something went wrong with that request. Please try again.