I have an image of 128 patches and each size is 256*256, now I want reconstruct image
by using these patches. To verify how exact image will be as compared to orignal image.
Size of origanl image is 2048*4096, Please guide in this context,
specifically matrix index error for this line.
C(ii,jj) = C(ii,jj) + A(ii+m,jj+n).*conj(B(ii+m,jj+n));
% C = zeros(size(A));
% tic;
% for ii = k+1:size(A,1)-k
% for jj = k+1:size(A,2)-k
% C(ii,jj) = 0;
% S1 = 0;
% S2 = 0;
% for m = -k:k
% for n = -k:k
% % % % C(ii,jj) = C(ii,jj) + A(ii+m,jj+n).*conj(B(ii+m,jj+n));
% S1 = S1 + abs(A(ii+m,jj+n))^2;
% S2 = S2 + abs(B(ii+m,jj+n))^2;
% end;
% end;
% C(ii,jj) = C(ii,jj)/sqrt(S1)/sqrt(S2);
% end;
% end;
% toc;