Tanoda
Leap.Frame Class Reference

The Frame class represents a set of hand and finger tracking data detected in a single frame. More...

Inheritance diagram for Leap.Frame:

Public Member Functions

 Frame ()
 Constructs a Frame object. More...
 
 Frame (long id, long timestamp, float fps, List< Hand > hands)
 Constructs a new Frame. More...
 
void Deserialize (byte[] arg)
 
Hand Hand (int id)
 The Hand object with the specified ID in this frame, or null if none exists. More...
 
bool Equals (Frame other)
 Compare Frame object equality. More...
 
override string ToString ()
 A string containing a brief, human readable description of the Frame object. More...
 

Public Attributes

long Id
 A unique ID for this Frame. More...
 
long Timestamp
 The frame capture time in microseconds elapsed since an arbitrary point in time in the past. More...
 
float CurrentFramesPerSecond
 The instantaneous framerate. More...
 
List< HandHands
 The list of Hand objects detected in this frame, given in arbitrary order. The list can be empty if no hands are detected. More...
 

Properties

int SerializeLength [get]
 
byte[] Serialize [get]
 

Detailed Description

The Frame class represents a set of hand and finger tracking data detected in a single frame.

The Leap Motion software detects hands, fingers and tools within the tracking area, reporting their positions, orientations, gestures, and motions in frames at the Leap Motion frame rate.

Access Frame objects through an instance of the Controller class.

Since
1.0

Definition at line 24 of file Frame.cs.

Constructor & Destructor Documentation

◆ Frame() [1/2]

Leap.Frame.Frame ( )

Constructs a Frame object.

Frame instances created with this constructor are invalid. Get valid Frame objects by calling the Controller.Frame() function.

The only time you should use this constructor is before deserializing serialized frame data, or if you are going to be passing this Frame to a method that fills it with valid data.

Since
1.0

Definition at line 40 of file Frame.cs.

◆ Frame() [2/2]

Leap.Frame.Frame ( long  id,
long  timestamp,
float  fps,
List< Hand hands 
)

Constructs a new Frame.

Since
3.0

Definition at line 48 of file Frame.cs.

Member Function Documentation

◆ Deserialize()

void Leap.Frame.Deserialize ( byte[]  arg)

Definition at line 70 of file Frame.cs.

◆ Equals()

bool Leap.Frame.Equals ( Frame  other)

Compare Frame object equality.

Two Frame objects are equal if and only if both Frame objects represent the exact same frame of tracking data and both Frame objects are valid.

Since
1.0

Definition at line 104 of file Frame.cs.

◆ Hand()

Hand Leap.Frame.Hand ( int  id)

The Hand object with the specified ID in this frame, or null if none exists.

Use the Frame.Hand() function to retrieve the Hand object from this frame using an ID value obtained from a previous frame. This function always returns a Hand object, but if no hand with the specified ID is present, an invalid Hand object is returned.

Note that ID values persist across frames, but only until tracking of a particular object is lost. If tracking of a hand is lost and subsequently regained, the new Hand object representing that physical hand may have a different ID than that representing the physical hand in an earlier frame.

Since
1.0

Definition at line 88 of file Frame.cs.

◆ ToString()

override string Leap.Frame.ToString ( )

A string containing a brief, human readable description of the Frame object.

Since
1.0

Definition at line 112 of file Frame.cs.

Member Data Documentation

◆ CurrentFramesPerSecond

float Leap.Frame.CurrentFramesPerSecond

The instantaneous framerate.

The rate at which the Leap Motion software is providing frames of data (in frames per second). The framerate can fluctuate depending on available computing resources, activity within the device field of view, software tracking settings, and other factors.

Since
1.0

Definition at line 148 of file Frame.cs.

◆ Hands

List<Hand> Leap.Frame.Hands

The list of Hand objects detected in this frame, given in arbitrary order. The list can be empty if no hands are detected.

Since
1.0

Definition at line 156 of file Frame.cs.

◆ Id

long Leap.Frame.Id

A unique ID for this Frame.

Consecutive frames processed by the Leap Motion software have consecutive increasing values. You can use the frame ID to avoid processing the same Frame object twice, as well as to make sure that your application processes every frame.

Since
1.0

Definition at line 126 of file Frame.cs.

◆ Timestamp

long Leap.Frame.Timestamp

The frame capture time in microseconds elapsed since an arbitrary point in time in the past.

You can use Controller.Now() to calculate the age of the frame.

Since
1.0

Definition at line 136 of file Frame.cs.

Property Documentation

◆ Serialize

byte [] Leap.Frame.Serialize
get

Definition at line 63 of file Frame.cs.

◆ SerializeLength

int Leap.Frame.SerializeLength
get

Definition at line 56 of file Frame.cs.


The documentation for this class was generated from the following file: