How to divide an image with unequal size into 4 x 4 non-overlapping blocks.

Illustration
George - 2020-10-23T09:51:59+00:00
Question: How to divide an image with unequal size into 4 x 4 non-overlapping blocks.

an image  with unequal size shoud be divided into 4 x 4 non-overlapping blocks.

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

This code will convert the 3 channel inImage into 16 patches and save them in a cell array

mat2cell(inImage, size(inImage,1)/4*ones(4,1), size(inImage,2)/4*ones(4,1), 3)


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!