% for tip paper (tip.tex) 5 frames of original data

frameind=3:3:16;

L=length(frameind);

pwd_now=pwd;  % remember current working directory
filt=[1 1 1];
eval(sprintf('v%02d=loadframe(%d);',frameind(1),frameind(1))) % frame 1 for size
[M,N]=size(eval(sprintf('v%02d',frameind(1))));
for l=1:L
  % load:
  eval(sprintf('v%02d=loadframe(%d);',frameind(l),frameind(l)))
  % low pass filter:
  eval(sprintf('v%02dund=filt2d(v%02d,filt)/length(filt).^2;',...
       frameind(l),frameind(l)))
  % undersample:
  eval(sprintf('v%02dund=v%02dund(1:3:M,1:3:N);',frameind(l),frameind(l)))

  % trim bacon introduced by filt2d and display in xv:
    % first get in right directory so saves will go to right place by default 
    chdir /mas/vision/bigu/steve/figs/resolutionenhance
    eval(sprintf('tvxv(cropnan(v%02dund))',frameind(l)))
    % return to this directory
    eval(sprintf('chdir %s',pwd_now))    
end%for

