How split an image into four parts?
7 views (last 30 days)
Show older comments
I have 2x10 cell array each cell contains 224x896 double, I want to split each image inside the cells to 224x224
0 Comments
Accepted Answer
Voss
on 3 Jan 2023
Edited: Voss
on 3 Jan 2023
% since I don't have your cell array, I make one up:
C = repmat({randi([0 255],224,896)},2,10)
% split each matrix in C into 4:
C_new = cellfun(@(x)mat2cell(x,224,224*ones(1,4)),C,'UniformOutput',false)
% each cell of C_new contains a 1x4 cell array containing the 4 224x224 matrices:
C_new{1,1}
C_new{2,1}
% etc.
5 Comments
See Also
Categories
Find more on Feature Detection and Extraction in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!