applying functions to patches of an image then reassembling

조회 수: 1 (최근 30일)
cameron lord
cameron lord 2020년 12월 2일
답변: Shubham Rawat 2020년 12월 4일
hi there, sorry I am new to matlab
I have matrix size 600x1000 that is an image. I want to apply a function to each 51x51 patch of this image so that I gain 1 output from every patch then but them back into a 2D matrix where the outputs represent the position of the 51x51 patch within the image to make a plot.
thanks for your help
  댓글 수: 1
cameron lord
cameron lord 2020년 12월 2일
cropped_im=im(1:561, 1:969);
figure;
imagesc(cropped_im);
imc_patch=mat2tiles(cropped_im,[51 51]);
patch_output=zeros(11,19);
for i=1:11
for j=1:19
patch_output(i,j)=sum((gabor2D.*imc_patch{i,j}),'all')
end
end
patch_output_rectified=rectify(patch_output)
imagesc(patch_output_rectified)
this is currently what I am using

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

답변 (1개)

Shubham Rawat
Shubham Rawat 2020년 12월 4일
Hi Cameron,
You may look into this question, it is doing the same what you wanted:
Hope This Helps!

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by