How to read a multiframe tiff in MATLAB?

266 ビュー (過去 30 日間)
Deepa Maheshvare
Deepa Maheshvare 2020 年 7 月 3 日
回答済み: Image Analyst 2020 年 7 月 4 日
Hello,
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')
i.e
size(ip) = 610 610
but I want it to return
size(ip) = 610 610 1200
  8 件のコメント
Deepa Maheshvare
Deepa Maheshvare 2020 年 7 月 4 日
Thank you

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2020 年 7 月 4 日
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...
end

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by