필터 지우기
필터 지우기

How do I play a multiframe TIFF file as a video in matlab?

조회 수: 35 (최근 30일)
AM
AM 2018년 12월 10일
댓글: Walter Roberson 2019년 1월 8일
I want to detect features that show up in different frames.
  댓글 수: 2
Mark Sherstan
Mark Sherstan 2018년 12월 10일
Should not be a problem. Please post your file so we can verify. Most likely the tiff file will be a 4 dimensional matrix where the first 3 matrices are some color space and the 4th one relates to the frame or time. You will just have to loop through that final index.
AM
AM 2018년 12월 11일
Hi Mark, I have attached a sample video that I would like to play in matlab. I tried using the code posted below by KSSV but that also only shows one frame at a time.
Thank you for all your help!

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 12월 11일
filename = '0024_MMStack_Pos0.ome-2.tif';
info = imfinfo(filename);
numframe = length(info);
for K = 1 : numframe
rawframes(:,:,:,K) = imread(filename, K);
end
cookedframes = mat2gray(rawframes);
implay(cookedframes)
  댓글 수: 3
AM
AM 2019년 1월 8일
Is is possible to draw circles at points (180, 183) and (190 , 203) in the same video ('0024_MMStack_Pos0.ome-2.tif') and have them show up in the video when I play it?
Walter Roberson
Walter Roberson 2019년 1월 8일
You can use insertShape from the Computer Vision toolbox to draw the circles into the arrays.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KSSV
KSSV 2018년 12월 11일
tifffiles = dir('*.tiff') ;
N = length(tifffiles) ;
for i = 1:N
tifffile = tifffiles(i).name ;
imshow(tifffile) ;
pause(0.1)
end
  댓글 수: 1
AM
AM 2018년 12월 11일
Hi, thank you for your response but I when I try using that I get this message:
'Warning: Can only display one frame from this multiframe file'
Any suggestions about how to go around that problem?
Thanks

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by