Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Read and Play a Video File

Load the video using a video reader object.

videoFReader = vision.VideoFileReader('ecolicells.avi');

Create a video player object to play the video file.

videoPlayer = vision.VideoPlayer;

Use a while loop to read and play the video frames.

while ~isDone(videoFReader)
  videoFrame = videoFReader();
  videoPlayer(videoFrame);
end

Release the objects.

release(videoPlayer);

release(videoFReader);