Skip to content

Public API Reference

Alpha notice: this SDK API is still prone to change while the public surface stabilizes.

This page is generated from the C# files compiled into ViziverseAI.SDK:

  • Template-Project/Assets/ViziverseAI/CV/SDK/ViziverseVision.cs
  • Template-Project/Assets/ViziverseAI/CV/SDK/Person.cs
  • Template-Project/Assets/ViziverseAI/CV/SDK/BodyPoint.cs

Only the public ViziverseAI namespace API is documented here. Protected implementation details, editor-only code, and template code are intentionally omitted.

Call SDK methods and read SDK data from the Unity main thread.

ViziverseVision

Static entry point for ViziverseAI person tracking. All members are in the ViziverseAI namespace.

Kind: static class

Properties

NameTypeDescription
IsRunningstatic boolTrue when the SDK has active tracked people.
Peoplestatic IReadOnlyList<Person>Current tracked people as a reusable read-only list.
PeopleCountstatic intNumber of currently tracked people.

Methods

NameSignatureDescription
Initializestatic void Initialize()Subscribes the SDK wrapper to the runtime and starts public event delivery. Safe to call more than once.
Shutdownstatic void Shutdown()Unsubscribes the SDK wrapper, clears cached people, and resets public event delivery.
GetPersonstatic Person? GetPerson(int index)Gets a person by zero-based index, or null when no active person exists at that index.
GetPersonByIdstatic Person? GetPersonById(int trackId)Gets a person by stable tracked ID, or null when that ID is not active.
IsPersonActivestatic bool IsPersonActive(int trackId)Returns true when the specified tracked ID is currently active.
EnableBackgroundRemovalstatic void EnableBackgroundRemoval()Enables background removal for all tracked people.
DisableBackgroundRemovalstatic void DisableBackgroundRemoval()Disables background removal for all tracked people.
SetBackgroundRemovalstatic void SetBackgroundRemoval(int personId, bool enabled)Enables or disables background removal for one tracked person.
IsBackgroundRemovalEnabledstatic bool IsBackgroundRemovalEnabled(int personId)Returns true when background removal is enabled for one tracked person.

Events

NameTypeDescription
OnPersonEnteredAction<Person>?Raised when a person starts tracking.
OnPersonLeftAction<Person>?Raised when a person stops tracking.
OnPersonMovedAction<Person>?Raised when a tracked person receives updated point data.
OnFrameProcessedAction?Raised after all tracked people have been updated for a frame.

Person

Represents one tracked person managed by the SDK. All members are in the ViziverseAI namespace.

Kind: sealed class

Properties

NameTypeDescription
IdintStable tracked ID while the person remains active.
IsActiveboolTrue while this person is currently tracked.
ConfidencefloatOverall confidence from 0.0 to 1.0.
CenterVector2Center of the person in image-space pixels.
CenterNormalizedVector2Center of the person in normalized image coordinates.
BoundingSizefloatApproximate tracked body size.
LastUpdatedFrameintUnity frame number for the latest update.
PointCountintNumber of available tracked points.
ShoulderWidthfloatRelative distance between shoulders.
HipWidthfloatRelative distance between hips.
TorsoHeightfloatRelative distance from shoulders to hips.
HeadDirectionVector22D direction vector for the head.
IsStandingboolTrue when the body appears upright.
IsLeftArmRaisedboolTrue when the left arm is raised above shoulder level.
IsRightArmRaisedboolTrue when the right arm is raised above shoulder level.

Methods

NameSignatureDescription
GetPointVector2 GetPoint(BodyPoint point)Gets a tracked point in image-space pixels.
GetPoint3DVector3 GetPoint3D(BodyPoint point)Gets a tracked point in normalized-metric coordinates. This is not Unity world space.
GetPointConfidencefloat GetPointConfidence(BodyPoint point)Gets confidence for a tracked point from 0.0 to 1.0.
IsPointVisiblebool IsPointVisible(BodyPoint point, float threshold = 0.5f)Returns true when tracked point confidence is greater than the threshold.
GetDistanceBetweenfloat GetDistanceBetween(BodyPoint a, BodyPoint b)Gets relative 2D distance between two tracked points.
GetDistance3DBetweenfloat GetDistance3DBetween(BodyPoint a, BodyPoint b)Gets relative 3D distance between two tracked points.

BodyPoint

Identifies one tracked point. Use the named constants rather than relying on numeric values.

NameDescription
HeadHead
LeftEyeInnerLeft eye inner corner
LeftEyeLeft eye center
LeftEyeOuterLeft eye outer corner
RightEyeInnerRight eye inner corner
RightEyeRight eye center
RightEyeOuterRight eye outer corner
LeftEarLeft ear
RightEarRight ear
MouthLeftLeft mouth corner
MouthRightRight mouth corner
LeftShoulderLeft shoulder
RightShoulderRight shoulder
LeftElbowLeft elbow
RightElbowRight elbow
LeftWristLeft wrist
RightWristRight wrist
LeftPinkyLeft pinky finger
RightPinkyRight pinky finger
LeftIndexLeft index finger
RightIndexRight index finger
LeftThumbLeft thumb
RightThumbRight thumb
LeftHipLeft hip
RightHipRight hip
LeftKneeLeft knee
RightKneeRight knee
LeftAnkleLeft ankle
RightAnkleRight ankle
LeftHeelLeft heel
RightHeelRight heel
LeftToeLeft toe
RightToeRight toe

ViziverseAI SDK API reference.