Saving +- 2000 tiff images.
Show older comments
Hi
I would like to know if there is a way to save many tiff images into a cell (or if there is something better) in MATLAB. The dimensions of each image is 2085x1811x3 and they are uint8. This is the current attempt below:
imgType = '*.tif';
[filename, pathname] = uigetfile(imgType,'Select the MATLAB code file');
images = dir([pathname imgType]);
Seq = cell(length(images),1);
for idx = 1:length(images)
Seq{idx} = imread([pathname images(idx).name]);
end
image_num = 1;
imshow(Seq(image_num))
It works but crashes eventually if run for 2000 images, is there any way to store all of that information? I need the 2D matrix of each image, none of them may be overwritten. If the 2085x1811x3 dimensions can be read in as 2085x1811x1 instead I think that would help? Colour doesn't matter, only interested in grayscale values.
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type 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!