MATLAB: How to divide image into 5*5 blocks

blockprocImage Processing ToolboxMATLABsize;

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

Best Answer

blockproc(YourImage, [5 5], @(block) nnz(~block.data), 'trimborder', false)