CameraFrame

readonly struct VideoKit.CameraFrame

The CameraFrame represents a single camera frame generated from the VideoKitCameraManager.

Accessing the Camera Image

/// <summary>
/// Camera image for this frame.
/// </summary>
CameraImage image { get; }

The image is the CameraImage that was used to generate the camera frame.

The CameraFrame can be implicitly converted to this CameraImage.

Accessing the Camera Texture

/// <summary>
/// Texture for this frame.
/// </summary>
Texture texture { get; }

The texture is the Texture representation of the image.

The texture is always non-null.

The CameraFrame can be implicitly converted to this Texture.

Accessing the Machine Learning Feature

/// <summary>
/// Image feature for this frame.
/// </summary>
MLImageFeature feature { get; }

The feature is the MLImageFeature representation of the image.

This is non-null only when the camera manager has the MachineLearning capability enabled.

The CameraFrame can be implicitly converted to this MLImageFeature.

Accessing the Human Texture

/// <summary>
/// Human texture for this frame.
/// </summary>
Texture humanTexture { get; }

The humanTexture segments the human in the camera image, leaving all non-human pixels transparent.

This is non-null only when the camera manager has the HumanTexture capability enabled.

The resolution of the humanTexture is not guaranteed to match that of the image.

Last updated