https://it.mathworks.com/help/images/ref/selectblocklocations.html
selectBlockLocations - Select blocks from blocked images - MATLAB
This MATLAB function selects a set of nonoverlapping unique blocks from one or more blocked images bims at the finest resolution available in each image.
selectblocksblockedimagesmatlab