How to create a 3d stack of multiple images in Matlab
6 views (last 30 days)
Show older comments
Jubilee Adeoye
on 24 May 2016
Commented: Kevin Liu
on 29 Aug 2019
Can someone help with creating a 3D stack in Matlab. I have used this line of codes, but it seems that my code stacks up the same image as many times as specified.
clear all;
Imatrix = [];
for i=1:500
images{i} = imread(sprintf('0001.tif',i));
Imatrix = cat(3, Imatrix, images{i});
end
I have a folder containing 500 images, and i want to stack the images serially as named.
Thanks
4 Comments
Accepted Answer
More Answers (2)
Azzi Abdelmalek
on 24 May 2016
Depending on how your images are named, this line of code should look like
images{i} = imread(sprintf('000%d.tif',i));
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!