com.primesense.nite
Class UserTrackerFrameRef

java.lang.Object
  extended by com.primesense.nite.UserTrackerFrameRef

public class UserTrackerFrameRef
extends java.lang.Object

This class stores a snapshot of a single frame of output from the UserTracker algorithm. This frame will correspond to a single input depth frame. It holds all info on users, as well as information on the floor plane.

See Also:
UserData, Skeleton, UserMap, UserTracker, HandTrackerFrameRef

Method Summary
protected  void finalize()
           
 org.openni.VideoFrameRef getDepthFrame()
          Get the raw depth frame that originated this output.
 float getFloorConfidence()
          NiTE generates a confidence value between 0 and 1 for the floor plane calculation.
 int getFrameIndex()
          Gets the frame index of the raw depth frame that generated this UserTracker frame.
 Plane getPlane()
           
 long getTimestamp()
          Get the timestamp in which this frame was processed.
 UserData getUserById(short id)
          Provides access to the UserData object for a specific user, indexed by UserId.
 UserMap getUserMap()
          Get the segmentation of the scene.
 java.util.List<UserData> getUsers()
          Get an List of all the users available in this frame.
 void release()
          Properly releases all resources used by this object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

release

public void release()
Properly releases all resources used by this object. This will be automatically called by the destructor, but it is good practice to call this as soon as the object is no longer required. Calling this function multiple times on the same object is safe.


getFloorConfidence

public float getFloorConfidence()
NiTE generates a confidence value between 0 and 1 for the floor plane calculation. Lower values indicate less confidence.

Returns:
Value between 0 and 1 indicating confidence in the accuracy of the floor plane

getPlane

public Plane getPlane()

getDepthFrame

public org.openni.VideoFrameRef getDepthFrame()
Get the raw depth frame that originated this output. Each UserTracker frame is generated to correspond with a single depth frame. This function gives you access to the raw frame data.
See the OpenNI 2.0 documentation for information on manipulating VideoFrameRef data.

Returns:
VideoFrameRef with the raw depth that generated this frame.

getUserMap

public UserMap getUserMap()
Get the segmentation of the scene. The UserTracker algorithm locates each user in the field of view, and figures out which pixels correrspond to which user, as well as which pixels correspond to the background (ie, not to any user).

Returns:
UserMap showing which pixels are occupied by what users.

getFrameIndex

public int getFrameIndex()
Gets the frame index of the raw depth frame that generated this UserTracker frame. Frame indexes are consequitive integer numbers assigned to frames by OpenNI. See the OpenNI documentation for more information.

Returns:
FrameIndex of the depth frame used to generate this User Tracker frame.

getTimestamp

public long getTimestamp()
Get the timestamp in which this frame was processed. See the OpenNI 2.0 documentation for more information on how OpenNI assigns time stamps to depth frames.

Returns:
Timestamp in microseconds.

getUsers

public java.util.List<UserData> getUsers()
Get an List of all the users available in this frame.

Returns:
List of UserData with one entry for each user in this frame.

getUserById

public UserData getUserById(short id)
Provides access to the UserData object for a specific user, indexed by UserId.

Parameters:
id - The ID of the user you would like data from.
Returns:
Pointer to the corresponding UserData object.
See Also:
UserData, UserMap

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable