Filter löschen
Filter löschen

how to divide image into 5*5 blocks

1 Ansicht (letzte 30 Tage)
Mahmoud Hassan
Mahmoud Hassan am 13 Jan. 2019
Kommentiert: Walter Roberson am 26 Jan. 2019
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 13 Jan. 2019
Bearbeitet: Walter Roberson am 13 Jan. 2019
blockproc(YourImage, [5 5], @(block) nnz(~block.data), 'trimborder', false)
  34 Kommentare
Walter Roberson
Walter Roberson am 26 Jan. 2019
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Matt J
Matt J am 14 Jan. 2019
Bearbeitet: Matt J am 14 Jan. 2019
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).

Produkte


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by