% This is my Super Resolution Method:
function [reconstPhoto] = superResolution(ims,Fs,photoWidth,photoHeight);
photoSize = photoWidth*photoHeight;
A = sparse(photoSize,photoSize);
b = sparse(photoSize,1);
for j = 1:size(ims,2)
imj = ims{j};
Fj = Fs{j};
Ft = Fj';
A = A + Ft * Fj;
b = b + Ft * imj(:);
end
% reconstPhoto = cgs(A,b,1.e-3);
lambda = .1;
k = 0;
tol = .001;
resid = tol+1;
X = zeros(size(A,2),1);
while (k < 20 & resid > tol)
Xold = X;
X = X - lambda*(A*X-b);
resid = norm(Xold-X,2);
k = k+1;
end
reconstPhoto = reshape(X,photoHeight,photoWidth);