FUNCTION REFERENCE

readFrame

Read and advance a VideoReader by one frame.

Read and advance a VideoReader by one frame.

Syntax

frame = readFrame(v)

Syntax

frame = v.readFrame('native')

Returns top-down H-by-W-by-3 uint8 RGB, or H-by-W uint8 for grayscale. Indexed frames are expanded to RGB unless 'native' is requested. Native grayscale and indexed output is a struct with uint8 cdata and colormap (empty for grayscale). Advances CurrentTime by 1/FrameRate, capped at Duration. Reading past the end raises an error. Seek with v.CurrentTime=t; timestamps select the containing frame interval.

Example

f=VideoReader.getFileFormats(); f(1).ContainsAudio   % false

Differences from MATLAB: see VideoReader for formats. Work is cancellable between frames, pipe chunks and native JPEG blocks.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.