LabTalk Object Type:
The vr object reads a video file and imports frame (or frames) of video to matrix object/matrixbook.
All Vr properties are read-only.
Channels: number of channels per frame
ChannelBits: bits per channel
ChannelInt: channel data integer values
ChannelSigned: channel data signed values
Note: the format and channel properties are based on the lastly read frame.
This script shows how to import 1 out of every 15 frames into the active matrixbook, each frame to a matrix object.
string vfilename$ = "C:\test.mp4";
int StepSize = 15; // skip every 15 frames
int err = vr.Open(%(vfilename$));// Open the video file.
if( 0 == err )
int TotalFrames = vr.FrameCount/StepSize;
// Read from beginning to the end of the file into matrix.
vr.ReadFrames(%h, TotalFrames, StepSize);
vr.Close();// Close the video file.
There is also a full example of how to import 100 frames from a video into a new matrixbook.