Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
extract frames from AVI

Subject: extract frames from AVI

From: Michal

Date: 8 Dec, 2007 10:24:06

Message: 1 of 10

Maybe stupid question but I'm new user of matlab. I've got
AVI video that consists of 258 frames and I need to extract
all frames into 258 bitmaps. Can you help me please?
Thank you.

Subject: extract frames from AVI

From: Michal

Date: 8 Dec, 2007 23:21:05

Message: 2 of 10

Please help me somebody. I really need it.

Subject: extract frames from AVI

From: Jiro Doke

Date: 9 Dec, 2007 05:31:15

Message: 3 of 10

"Michal " <pandzii@gmail.com> wrote in message
<fjdrc6$5c4$1@fred.mathworks.com>...
> Maybe stupid question but I'm new user of matlab. I've got
> AVI video that consists of 258 frames and I need to extract
> all frames into 258 bitmaps. Can you help me please?
> Thank you.

Take a look at the function AVIREAD. If you are on Windows
and are using MATLAB R2007b, also look at MMREADER.

jiro

Subject: extract frames from AVI

From: Michal

Date: 9 Dec, 2007 17:45:14

Message: 4 of 10

"Jiro Doke" <jiro.doke@mathworks.com> wrote in message
<fjfuj3$k36$1@fred.mathworks.com>...
> "Michal " <pandzii@gmail.com> wrote in message
> <fjdrc6$5c4$1@fred.mathworks.com>...
> > Maybe stupid question but I'm new user of matlab. I've got
> > AVI video that consists of 258 frames and I need to extract
> > all frames into 258 bitmaps. Can you help me please?
> > Thank you.
>
> Take a look at the function AVIREAD. If you are on Windows
> and are using MATLAB R2007b, also look at MMREADER.
>
> jiro

Thank you Jiro for your answer. Now I know how to load my
AVI to matlab, but I still don't know how to save all my
frames as bitmaps to my disc.
Can anybody help me please?

Subject: extract frames from AVI

From: qwer iuy

Date: 9 Dec, 2007 18:21:15

Message: 5 of 10

> Thank you Jiro for your answer. Now I know how to load my
> AVI to matlab, but I still don't know how to save all my
> frames as bitmaps to my disc.
> Can anybody help me please?

i recommend using a different program, like
<a href=http://www.mplayerhq.hu/design7/news.html> mplayer</a>.

Subject: extract frames from AVI

From: Michal

Date: 9 Dec, 2007 22:25:05

Message: 6 of 10

"qwer iuy" <peniasli@guerrillamail.biz> wrote in message
<fjhbmr$gc1$1@fred.mathworks.com>...
> > Thank you Jiro for your answer. Now I know how to load my
> > AVI to matlab, but I still don't know how to save all my
> > frames as bitmaps to my disc.
> > Can anybody help me please?
>
> i recommend using a different program, like
> <a href=http://www.mplayerhq.hu/design7/news.html>
mplayer</a>.

I need to do it in Matlab.

Subject: extract frames from AVI

From: Vivian Harvey

Date: 31 Jul, 2008 10:29:02

Message: 7 of 10

"Michal " <pandzii@gmail.com> wrote in message
<fjhq00$8bv$1@fred.mathworks.com>...
> "qwer iuy" <peniasli@guerrillamail.biz> wrote in message
> <fjhbmr$gc1$1@fred.mathworks.com>...
> > > Thank you Jiro for your answer. Now I know how to load my
> > > AVI to matlab, but I still don't know how to save all my
> > > frames as bitmaps to my disc.
> > > Can anybody help me please?
> >
> > i recommend using a different program, like
> > <a href=http://www.mplayerhq.hu/design7/news.html>
> mplayer</a>.
>
> I need to do it in Matlab.

Found out at
http://groups.google.com/group/comp.soft-sys.matlab/msg/febd9dbf6176179d

"You can read a range of frames using aviread. To read
frames 10 through
93 you would use:

a = aviread('movie.avi', 10:93);

You can then convert the data into image data and convert
those images
into grayscale images.

If you are using R2007b on Windows, you can also use the new
MMREADER
functionality:

mov = mmreader('movie.avi');
data = read(mov, [10 93]);

would do the same as the AVIREAD command above except that
you do not
need to use frame2im with the output of MMREADER. Also,
MMREADER is
more robust and can read a larger variety of file types than
AVIREAD.

-Dave Tarkowski "

Subject: extract frames from AVI

From: Rajaram

Date: 18 Mar, 2013 20:31:05

Message: 8 of 10

Hi, i do have similar problem, i've achieved saving the frames from input video but those are 300-400 frames, where as i need to extract objects of interest from these frames, i don't want to run the code for all the image frames, so, is there any chance i can save the frames with an interval like every 10th frame, or re-changeable to save every nth frame.
thanks

Subject: extract frames from AVI

From: dinhdu to

Date: 17 Apr, 2013 14:45:08

Message: 9 of 10

"Michal " <pandzii@gmail.com> wrote in message <fjdrc6$5c4$1@fred.mathworks.com>...
> Maybe stupid question but I'm new user of matlab. I've got
> AVI video that consists of 258 frames and I need to extract
> all frames into 258 bitmaps. Can you help me please?
> Thank you.

Subject: extract frames from AVI

From: Anand Naik

Date: 12 Feb, 2014 15:11:08

Message: 10 of 10

vid = VideoReader('.avi file');

frameno = vid.NumberOfFrames;
for i = 1:frameno
    frame = read(vid, i);
    figure; imshow(frame);
end

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us