title: splitting video into images in matlab
body: <p>I am on a problem. My problem is that I want to split all image frames from an avi video. First of all I used aviread() function it gives me the out of memory error. Then from online help I were using mmreader() and read() function to split image frames, but the problem is read images from read() function could not be showed with imshow() function. I have the following code snippet,</p>
  
  <pre><code>function test()
     A='G:\ims\avi\nh.avi';
     B=mmreader(A);
     ims=read(B,[2000 2200]);
     figure(1),imshow(ims(1));
  end
  </code></pre>
  
  <p>I hoped this code would show the first image frame but it does not. In this code I am free of out of memory error because I only read 200 frames. But the problem still remains when I try to read all the frames. So mainly I have the following two problems,</p>
  
  <ol>
  <li>how can I get rid of out of memory problem using mmreader() and read() ?</li>
  <li>why not imshow() above does not show the image frame?</li>
  </ol>