필터 지우기
필터 지우기

extract blocks from image

조회 수: 5 (최근 30일)
Elysi Cochin
Elysi Cochin 2014년 5월 2일
댓글: Image Analyst 2014년 5월 2일
i wanted to extract 175 blocks of square size, from an image.... please can someone help me... my image is not divisible by 175... how should i resize it so that i can extract 175 blocks of equal size... please do reply....

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 5월 2일
[n,m,p]=size(im1) % im1 is your image
n1=mod(-n,75)
m1=mod(-m,75)
new_im1=imresize(im1,[n+n1,m+m1]);

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 5월 2일
The FAQ code was specifically built to be general enough for situations like that, where the image is not an integer multiple of blocks. Please use code from the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F
  댓글 수: 1
Image Analyst
Image Analyst 2014년 5월 2일
Though you can resize using imresize() if you prefer to have equal sized blocks.

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by