You can use mat2cell
to split the image into as many splits as you want:
img = imread('https://i.stack.imgur.com/s4wAt.png');
[h w c] = size(img);
numSplits = 3; % how many splits you want
sw = floor(w/numSplits); % width of split
widths = repmat(sw, 1, numSplits-1);
widths(numSplits) = w - sum(widths); % last one is bit wider if width does not divide
splits = mat2cell(img, h, widths, c); % this splits the image
% show the splits
for ii=1:numSplits
subplot(1,numSplits,ii);
imshow(splits{ii});
end
3
solved please guide me to split the image