MATLAB: How to choose 3*3 pixel block in a 512*512 gray image in matlab

digital image processingimage acquisitionimage analysisimage processingsteganography

I have to take block with 3*3 pixels each time for an image with the size of 512*512. Kindly suggest Hoping for your early response

Best Answer

You need to use FEX::MAT2TILES. Download this package and place it in MATLAB path
imageBlocks = mat2tiles(Image, [3 3])
imageBlocks will contain cell array of the 3x3 pixel blocks.