Skip to content

Commit

Permalink
git-svn-id: svn+ssh://lumo.ucsd.edu/projects/p1/svnroot/pdollar/toolb…
Browse files Browse the repository at this point in the history
…ox@5871 52fe0c90-79fe-0310-8a18-a0b98ad248f8
  • Loading branch information
pdollar committed Jul 4, 2007
1 parent d2020d5 commit d202eb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions filters/FB_visualize.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
% FB_visualize( FB, [show] )
%
% INPUTS
% FB - filter bank to visualize
% FB - filter bank to visualize (either 2D, 3D, or 4D array)
% show - [1] figure to use for display
%
% OUTPUTS
Expand All @@ -22,11 +22,11 @@

function FB_visualize( FB, show )

nd = ndims(FB)-1;
if( nargin<2 || isempty(show) ); show=1; end;
if( show<=0); return; end;

% get Fourier Spectra for 1D and 2D filterbanks
nd = ndims(FB)-1;
if( nd==1 || nd==2 )
FBF=zeros(size(FB));
if( nd==1 )
Expand All @@ -43,10 +43,12 @@ function FB_visualize( FB, show )
subplot(1,3,1); plot( -r:r, FB );
subplot(1,3,2); plot( (-r:r)/(2*r+1), FBF );
subplot(1,3,3); stem( (-r:r)/(2*r+1), max(FBF,[],1) );

elseif( nd==2 )
subplot(1,3,1); montage2(FB,1); title('filter bank');
subplot(1,3,2); montage2(FBF,1); title('filter bank fft');
subplot(1,3,3); im(sum(FBF,3)); title('filter bank fft coverage');

elseif( nd==3 )
n = size(FB,4); nn = ceil( sqrt(n) ); mm = ceil( n/nn );
for i=1:n
Expand Down

0 comments on commit d202eb5

Please sign in to comment.