Frame of Animated Gif

5 次查看(过去 30 天)
Ju
Ju 2012-1-15
Hi, all. I want to make a steganography program using LSB in matlab. I use animated GIF for the cover object. As we know that Animated GIF is a file that consists of many images. So, can anyone tell me: How to get the frame number of this file in matlab? Thanks before.
  2 个评论
Jan
Jan 2012-1-15
Please explain again, what you want to get? The number of images an animated GIF consists of?
Ju
Ju 2012-1-23
i want to get the nnumber of frames and put it in a variable..

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2012-1-16
Read all of the frames using imread(), and then look at the size of what is returned.
  1 个评论
Jan
Jan 2012-1-16
Then "get the frame number" is equivalent to "get the number of frames" - correct? Actually a question, which should be answered by the OP...

请先登录,再进行评论。

更多回答(1 个)

Ju
Ju 2012-1-23
Thanks for your answer and comments. But, i'm still confuse about it. Can you tell me with an example in source code, how to get the number of frames and put it in a variable?
  2 个评论
Walter Roberson
Walter Roberson 2012-1-23
allframedata = imread('YourFile.GIF', 'frames', 'all');
alldimensions = size(allframedata);
number_of_frames = alldimensions(end);
Ju
Ju 2012-1-23
thank you very much. You help me a lot.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by