function [T] = regions_xy2warping_parameters(from_xy_regs, to_xy_regs)
for i=1:length(from_xy_regs)
    regsa = from_xy_regs{i};
    regsb = to_xy_regs{i};
    [rxa, rya] = interp_vertex_points(regsa(:,1), regsa(:,2));
    regsa = [rxa, rya];
    [rxb, ryb] = interp_vertex_points(regsb(:,1), regsb(:,2));
    regsb = [rxb, ryb];
    T{i} = cp2tform(regsa, regsb,'polynomial', 2);
    % Debugging information.
    %     figure(1); %clf;
    %     hold on;
    %     plot(regsa(:,1), regsa(:,2), 'ro')
    %     plot(regsb(:,1), regsb(:,2), 'go')
    %     mregsa = mean(regsa);
    %     text(mregsa(1), mregsa(2), num2str(i));
end
return;