% File created by Yuandong Tian, Oct. 5, 2009
% Email: yuandong@andrew.cmu.edu

% display water bases as in Figure 5 

load warp.mat;
% show the warping function
firstNC = 10;
for i = 1:firstNC
    subplot(2, firstNC, i);
    imagesc(reshape(b.bx(:, i), b.h, b.w));
    axis off;
    title(['Wx_{', num2str(i), '}']);
    axis equal;    
    
    subplot(2, firstNC, firstNC + i);
    imagesc(reshape(b.by(:, i), b.h, b.w));
    axis off;
    title(['Wy_{', num2str(i), '}']);
    axis equal;
end;
