getframe.m 713 B

12345678910111213141516171819202122
  1. function frame = getframe(vr)
  2. %FRAME=GETFRAME(VR)
  3. % Returns the current frame that has been read in from video VR. Calling
  4. % GETFRAME does not automatically advance the current frame so the user
  5. % must first call NEXT, STEP, or SEEK before calling GETFRAME the
  6. % first time. This makes it easy to write loops such as:
  7. % vr = videoReader(...);
  8. % while (next(vr))
  9. % img = getframe(vr);
  10. % ...do something...
  11. % end
  12. % vr = close(vr);
  13. %
  14. %SEE ALSO
  15. % videoReader
  16. %
  17. %Copyright (c) 2006 Gerald Dalley
  18. %See "MIT.txt" in the installation directory for licensing details (especially
  19. %when using this library on GNU/Linux).
  20. frame = feval(vr.plugin, 'getframe', vr.handle);