% require corDiff vec2mat


b  = [img(:,1); img(:,65); img(:,129); img(1,2:64)';img(1,66:128)';img(65,2:64)';img(65,66:128)';img(129,2:64)';img(129,66:128)'];
alpha = 1;
xl = ones(1,129);
xs = ones(1,2*63);
hori = repmat([1:63 65:127],1,3);
X = [0*xl 64*xl 128*xl hori];
Y = [repmat(0:128,1,3) 0*xs 64*xs 128*xs];
[x,y] = meshgrid(0:128,0:128);
XX = x(:);
YY = y(:);
Mx = corDiff(X',X');
My = corDiff(Y',Y');
MXX = corDiff(XX,X');
MYY = corDiff(YY,Y');
Matxy = ((Mx.^2+My.^2 )+alpha).^.5;
MatXY = ((MXX.^2+MYY.^2 )+alpha).^.5; 
c = Matxy\b;
recon = MatXY*c;
interp = vec2mat(recon,129,129);
