MATLAB: How to acccess each block after processing

image processingMATLAB

Hello everyone, i want to perform split in several parts of an image using blockproc () and then i want to access these blocks to perform Box Counting Algorithm. If i use
I=~I2bw(I)
blockSize=64
T=blockproc(I, blockSize, @boxcountingmethod);
My response from Matlab is a matrix with BoxCounting applied on the full image, not on every block.
Also i need to store the results in a matrix. Thanks in advance.

Best Answer

Using MAT2TILES (Download),
Tcell=mat2tiles(I, blocksize*[1,1]);
result=cellfun(@boxcountingmethod, Tcell, 'uni',0);