필터 지우기
필터 지우기

How to partition an image

조회 수: 2 (최근 30일)
Algorithms Analyst
Algorithms Analyst 2013년 1월 29일
Hi all
I am working on some algorithm to implement it and in one stage I have been confused.Lets say that I have an image 512x512.
I want to make image partitioned in nxn squarre like regions that are overlapped with the same gap g for both image.So n=12 and g=3.
Thanks in Advance

채택된 답변

Image Analyst
Image Analyst 2013년 1월 29일
Use blockproc() with the BorderSize option.
  댓글 수: 32
Walter Roberson
Walter Roberson 2013년 2월 6일
The 1028 is due to there being partial block 2 pixels wide. mod(512,6) = 2. That block gets extended by the overlap, 3 pixels before and 3 after, to become a total of 8 pixel. 85 full blocks of 12, plus the partial 8, gives 1028. The 85 is floor(512/6). You need to take this partial block into account unless you request padding of the blocks out to full width.
Algorithms Analyst
Algorithms Analyst 2013년 2월 6일
I am not clear in that point kindly explain it plz with some piece of code.Thanks.I further quantize the colors by using the K-means algorithm with K=16 as described in paper..

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by