how to divide image into 5*5 blocks

조회 수: 2 (최근 30일)
Mahmoud Hassan
Mahmoud Hassan 2019년 1월 13일
댓글: Walter Roberson 2019년 1월 26일
hello, i have a binarized image of fingerprint that i want to divide into 5*5 blocks and then count the number of zeros " black points " in each block
thanks in advance

채택된 답변

Walter Roberson
Walter Roberson 2019년 1월 13일
편집: Walter Roberson 2019년 1월 13일
blockproc(YourImage, [5 5], @(block) nnz(~block.data), 'trimborder', false)
  댓글 수: 34
Walter Roberson
Walter Roberson 2019년 1월 26일
You should post a new Question with details showing how you rotate. It is not related to this Question as this question does not involve rotation.

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

추가 답변 (1개)

Matt J
Matt J 2019년 1월 14일
편집: Matt J 2019년 1월 14일
A more efficient method than blockproc or mat2cell is to use sepblockfun (Download),
result = sepblockfun(~yourImage,[60,60],'sum');
This assumes that yourImage divides evenly into 60x60 blocks (if not, you should zero pad).

카테고리

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

태그

제품


릴리스

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by