% Created by Yuandong Tian, Oct. 5, 2009
% Email: yuandong@andrew.cmu.edu
% reconstruct the water distortion given the coefficients. 

[m, n, nFrame] = size(frames);
[reconImg1, reconAno1, reconValidRange1, z1] = exp_synDistorted(img, imgBoard(1:m, 1:n, :), blockx1, blocky1, b, deltapsReals1);
[reconImg2, reconAno2, reconValidRange2, z2] = exp_synDistorted(img, imgBoard(1:m, 1:n, :), blockx2, blocky2, b, deltapsReals2);
reconImg1s = [reconImg1s, reconImg1];
reconImg2s = [reconImg2s, reconImg2];
reconAno1s = [reconAno1s, reconAno1];
reconAno2s = [reconAno2s, reconAno2];
z1s = [z1s, z1];
z2s = [z2s, z2];
framess = [framess, frames];

validRange1s = [validRange1s, reconValidRange1];
validRange2s = [validRange2s, reconValidRange2];

names = [names, name];
