How to read a multiframe tiff in MATLAB?
247 views (last 30 days)
Show older comments
Deepa Maheshvare on 3 Jul 2020
Answered: Image Analyst on 4 Jul 2020
I am trying to read a multiframe tiff of dimension 610 x 610 x 1200
Using imread('file.tiff') reads only the first image as mentioned in the documentation.
I would like to know how to read all frames.
ip = imread('file.tiff')
size(ip) = 610 610
but I want it to return
size(ip) = 610 610 1200
Image Analyst on 4 Jul 2020
This is what I do in my app having multipage tiffs
info = imfinfo(imageFullFileName);
numberOfPages = length(info);
for k = 1 : numberOfPages
% Read the kth image in this multipage tiff file.
thisPage = imread(imageFullFileName, k);
% Now process thisPage somehow...
Find more on Import, Export, and Conversion 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!