Divide binary image into overlapping blocks using blockproc
Ältere Kommentare anzeigen
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)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Neighborhood and Block Processing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!