Class: FrameSet

FrameSet()

Class containing a set of frames

Constructor

new FrameSet()

Properties:
Name Type Description
size Integer count of frames.
depthFrame DepthFrame | undefined The depth frame in the frameset.
colorFrame VideoFrame | undefined The color frame in the frameset.
Source:

Members

colorFrame

Get the color frame
Source:

depthFrame

Get the depth frame
Source:

size

Count of frames
Source:

Methods

at(index) → {DepthFrame|VideoFrame|Frame|undefined}

Get the frame at specified index
Parameters:
Name Type Description
index Integer the index of the expected frame (Note: this is not stream index)
Source:
Returns:
Type
DepthFrame | VideoFrame | Frame | undefined

destroy() → {undefined}

Release resources associated with this object
Source:
Returns:
Type
undefined

forEach(callback) → {undefined}

Run the provided callback function with each Frame inside the FrameSet
Parameters:
Name Type Description
callback FrameCallback the callback function to process each frame
Source:
Returns:
Type
undefined

getFrame(stream, streamIndex) → {DepthFrame|VideoFrame|Frame|undefined}

Get the frame with specified stream
Parameters:
Name Type Default Description
stream Integer | String stream type of the frame
streamIndex Integer 0 index of the stream, 0 means the first matching stream
Source:
Returns:
Type
DepthFrame | VideoFrame | Frame | undefined

getInfraredFrame(streamIndex) → {VideoFrame|undefined}

Get the infrared frame
Parameters:
Name Type Default Description
streamIndex Integer 0 index of the expected infrared stream
Source:
Returns:
Type
VideoFrame | undefined