Problems reading video with mmreader
1 view (last 30 days)
Show older comments
I want to load a video and work on the single frames. When I read the video it displays "unable to determine the number of frames in this file". I need only the first part of the video using the following code
obj = mmreader('videoname.avi');
for n=1:500
mov(n).cdata = obj.read(n);
end
now I try to access the single frames in the video and display them with
img1 = mov(1).cdata
imshow(img1)
but every image in mov shows exactly the same (always the first image of the video)
My Questions:
1. Why is Matlab not able to determine the number of frames? Is there a way to work around this problem?
2. Why are always the same images (first image from video file) stored in mov? Is sthat a problem of the read function?
... I use Matlab 7.1, so can't use the VideoReader ... this is a very simplified example, but doesn't really work
0 Comments
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!