Skip to content

Commit

Permalink
some small changes for vis
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Vondrick committed Nov 29, 2012
1 parent 8a7b093 commit b583afc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/showpairdict.m
Expand Up @@ -25,7 +25,11 @@
im = ones(cy*sy, cx*sx);

iii = randperm(size(pd.dgray,2));

fprintf('ihog: show pair dict: ');
for i=1:min(sy*sx, pd.k),
fprintf('.');

row = mod(i-1, sx)+1;
col = floor((i-1) / sx)+1;

Expand All @@ -34,8 +38,7 @@
graypic(:) = graypic(:) / max(graypic(:));

hogfeat = reshape(pd.dhog(:, iii(i)), [hny hnx 32]);
hogscale = max(max(hogfeat(:)),max(-hogfeat(:)));
hogpic = HOGpicture(hogfeat) / hogscale;
hogpic = HOGpicture(hogfeat);
hogpic = imresize(hogpic, [gny gnx]);
hogpic(hogpic < 0) = 0;
hogpic(hogpic > 1) = 1;
Expand All @@ -45,6 +48,7 @@

im((col-1)*cy+1:col*cy, (row-1)*cx+1:row*cx) = pic;
end
fprintf('\n');

im = im(1:end-bord, 1:end-bord);

Expand Down
2 changes: 2 additions & 0 deletions visualizations/pickapartHOG.m
Expand Up @@ -65,3 +65,5 @@ function pickapartHOG(feat),
imagesc(negative);
axis image;
title('Negative Signed HOG');

colormap gray;
1 change: 1 addition & 0 deletions visualizations/spreadHOG.m
Expand Up @@ -38,3 +38,4 @@

imagesc(bigfig);
axis image;
colormap gray;

0 comments on commit b583afc

Please sign in to comment.