Divide binary image into overlapping blocks using blockproc
Show older comments
I know variations on this question have been asked but I am still struggling. I have a binary image (matrix) and need to divide it into overlapping blocks of around 310x310 pixels with a 50% overlap between each block. The binary image is 11640x5096 pixels. If possible it would also be good to get smaller overlaps too, for example 25% across each block. I have some code but I am stuggling with the input values. I have working code on other image analysis programs but I need to process larger images now so need the extra speed of matlab. Any help would be greatly appreciated.
fun = @(block_struct) imresize(block_struct.data,0.15);
blockproc(A, [155 155], @(x) mean(x.data(:)), 'BorderSize', [155 3155], 'TrimBorder', false, 'PadPartialBlocks',false)
Accepted Answer
More Answers (0)
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!