% back entrance to students center
% toshiba ikum42a ... auto shutter, area=1/4, agc off, 11mm lens

l1=10    % begin frame
l2=19    % end frame (there are 10 frames numbered 010 to 019)
err_history=[];
p=[];

for l = l1+1:l2   % pairwise of frames l1..l2-1 with l1+1..l2
  A = eval(sprintf('loadframe(%d)',l-1));
  figure(1);  % keep from running out of memory (limit fig use)
  B = eval(sprintf('loadframe(%d)',l));
  disp(sprintf('est_pairwise: estimating translation at frame l=%d',l))
  p_trans=[est_trans_fft2(A,B) 0]; % now takes B to A
  p_now=est_pchirp2mw(A,B,9,3,p_trans,1);
  p=[p;p_now]; % concatenate each time
  mse=mean2nan(abs(A-pchirp2w(p_now,B)));
  err_history=[err_history;mse];
  s = sprintf('save parameters_pairwisemw9_3_%03d p err_history',l);
  disp(s)
  eval(s)
end%for

