필터 지우기
필터 지우기

How can divide an image into blocks

조회 수: 1 (최근 30일)
Aseel H
Aseel H 2013년 2월 25일
I want to divided image to 3*3 overlapping blocks, then I will make some operations on each block
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 2월 25일
Have you considered going back and Accepting the Answers that solved your previous questions?

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

채택된 답변

Walter Roberson
Walter Roberson 2013년 2월 25일
blockproc() with 'BorderSize' and 'TrimBorder' options, possibly followed by mat2cell()

추가 답변 (1개)

Image Analyst
Image Analyst 2013년 2월 25일
With a 3 by 3 window, you can only overlap by 1 pixel at most. So then you can use conv2() or imfilter() if you have a really simple filter, or nlfilter() if you have a complicated function you want to do on those 9 pixels. If you don't want the windows to overlap, then you can use blockproc(). Actually you can also have overlap with blockproc() too, but why complicate things? Search for "divide an image into blocks" or similar terms. It's asked several times a week here.

Community Treasure Hunt

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

Start Hunting!

Translated by