load text_label % image containing text label
load parameters_pairwisem_9_3

%OUT=[];
%for k=186:-5:160    % original example used
for k=186:-10:160    % original example used
  P=pintegrate(p,k);
  A=loadframe(eval(sprintf('%d',k)));
  Pnow=P(187,:);
  Tc=pchirp2((Pnow),T);
  Tc=chnan(Tc,255); % get rid of border
%  Ac_annotated=(255-((255-A).*Tc));
  Tn=255-Tc;
  Ac_annotated=(A.^4.22+Tn.^4.22).^(1/4.22);
  Aout=border(Ac_annotated);
  Aoutrot90=rot90(Aout,-1);
  savepnm(sprintf('pork%3d.pgm',k),scaler2(Aoutrot90))
end%for

