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)
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
Play games and win prizes!Learn more