initial_guess; % defines M,N, and the starting guesses as 8 feature
              % correspondences per image
x=[initial_guess(1,1);initial_guess(3,1);initial_guess(5,1);initial_guess(7,1)];
y=[initial_guess(1,2);initial_guess(3,2);initial_guess(5,2);initial_guess(7,2)];
u=[initial_guess(2,1);initial_guess(4,1);initial_guess(6,1);initial_guess(8,1)];
v=[initial_guess(2,2);initial_guess(4,2);initial_guess(6,2);initial_guess(8,2)];

p0 = corr2p(x./M,y./N,u./M,v./N); % initial starting guess

if ~exist('A')
  A=loadframe(0);
  B=loadframe(1);
end%if

A=undsamavg(A);
B=undsamavg(B);

p=est_pchirp2m(A,B,3,4,p0);

