% corr2p.m                                               separates version
%
% corr2p.c  ---   not sure what happened to it (lost because not necessary
% given rechirp and dechirp, and subsumed into idr, but should have been kept
% as still occasionally useful :-(
%
% this matlab script does the same thing as corr2p.c did
%
% separates version calls dechirp and rechirp separately
%
% in effect it provides the parameter set needed to "dechirps" and then
% "rechirps" an image.
%
% this means it can use the algebraic law of composition to achieve the same
% end without touching the image twice.

function p = corr2p(x,y,u,v);

x1=x(1);y1=y(1);x2=x(2);y2=y(2);
x3=x(3);y3=y(3);x4=x(4);y4=y(4);
u1=u(1);v1=v(1);u2=u(2);v2=v(2);
u3=u(3);v3=v(3);u4=u(4);v4=v(4);

p_rechirp = corners2r([x1,y1,x2,y2,x3,y3,x4,y4]);

p_dechirp = corners2d([u1,v1,u2,v2,u3,v3,u4,v4]);

p = pcompose(p_dechirp,p_rechirp);

