how to Reconstruct full image from 128 patches of 256*256?

조회 수: 4 (최근 30일)
Amjad Iqbal
Amjad Iqbal 2021년 4월 22일
댓글: Amjad Iqbal 2021년 4월 28일
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.
  댓글 수: 1
Amjad Iqbal
Amjad Iqbal 2021년 4월 23일
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;

댓글을 달려면 로그인하십시오.

채택된 답변

Shadaab Siddiqie
Shadaab Siddiqie 2021년 4월 28일
From my understanding you want to combine multiple images to from single image. For this you can refer to the imtitle. For example:
load mri
imshow(D(:,:)); % list of all the images
Combining above images
out = imtile(D, map);
imshow(out);
You can also change the aspect of the image, like
out = imtile(D, map, 'Frames', 1:8, 'GridSize', [2 4]);
figure;
imshow(out);
  댓글 수: 1
Amjad Iqbal
Amjad Iqbal 2021년 4월 28일
Dear Shadaab Siddiqie,
Thanks for response, I have patchified image in 128 patches, with size 256*256. Now using that .mat file sized( 128*256*256), I want to reconstruct whole image of size (2048*4096). Abovemntioned is about joing or tiling images, and there is border lines among neighbourhood image, however I need full image like given below.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by