SimpleOpenNI
Class SimpleOpenNI

java.lang.Object
  extended by SimpleOpenNI.ContextWrapper
      extended by SimpleOpenNI.SimpleOpenNI
All Implemented Interfaces:
SimpleOpenNIConstants

public class SimpleOpenNI
extends ContextWrapper
implements SimpleOpenNIConstants


Field Summary
 
Fields inherited from interface SimpleOpenNI.SimpleOpenNIConstants
CODEC_16Z, CODEC_16Z_EMB_TABLES, CODEC_CODEC_8Z, CODEC_JPEG, CODEC_NONE, CODEC_UNCOMPRESSED, IMG_MODE_DEFAULT, IMG_MODE_RGB_FADE, NITE_DIRECTION_BACKWARD, NITE_DIRECTION_DOWN, NITE_DIRECTION_FORWARD, NITE_DIRECTION_ILLEGAL, NITE_DIRECTION_LEFT, NITE_DIRECTION_RIGHT, NITE_DIRECTION_UP, NO_CIRCLE_BAD_POINTS, NO_CIRCLE_ILLEGAL, NO_CIRCLE_MANUAL, NO_CIRCLE_NO_INPUT, NODE_DEPTH, NODE_GESTURE, NODE_HANDS, NODE_IMAGE, NODE_IR, NODE_NONE, NODE_PLAYER, NODE_RECORDER, NODE_SCENE, NODE_USER, RECORD_MEDIUM_FILE, RUN_MODE_DEFAULT, RUN_MODE_MULTI_THREADED, RUN_MODE_SINGLE_THREADED, SKEL_HEAD, SKEL_LEFT_ANKLE, SKEL_LEFT_COLLAR, SKEL_LEFT_ELBOW, SKEL_LEFT_FINGERTIP, SKEL_LEFT_FOOT, SKEL_LEFT_HAND, SKEL_LEFT_HIP, SKEL_LEFT_KNEE, SKEL_LEFT_SHOULDER, SKEL_LEFT_WRIST, SKEL_NECK, SKEL_PROFILE_ALL, SKEL_PROFILE_HEAD_HANDS, SKEL_PROFILE_LOWER, SKEL_PROFILE_NONE, SKEL_PROFILE_UPPER, SKEL_RIGHT_ANKLE, SKEL_RIGHT_COLLAR, SKEL_RIGHT_ELBOW, SKEL_RIGHT_FINGERTIP, SKEL_RIGHT_FOOT, SKEL_RIGHT_HAND, SKEL_RIGHT_HIP, SKEL_RIGHT_KNEE, SKEL_RIGHT_SHOULDER, SKEL_RIGHT_WRIST, SKEL_TORSO, SKEL_WAIST, USERS_ALL, XN_STATUS_OK
 
Constructor Summary
SimpleOpenNI(PApplet parent)
          Creates the OpenNI context ands inits the modules
SimpleOpenNI(PApplet parent, int runMode)
          Creates the OpenNI context ands inits the modules
SimpleOpenNI(PApplet parent, java.lang.String initXMLFile)
          Creates the OpenNI context ands inits the modules
SimpleOpenNI(PApplet parent, java.lang.String initXMLFile, int runMode)
          Creates the OpenNI context ands inits the modules
 
Method Summary
 void convertProjectiveToRealWorld(PVector proj, PVector world)
           
 void convertRealWorldToProjective(PVector world, PVector proj)
           
 PImage depthImage()
           
 int[] depthMap()
           
 PVector[] depthMapRealWorld()
           
 void dispose()
           
 void drawCamFrustum()
           
 void drawLimb(int userId, int joint1, int joint2)
          Draws a limb from joint1 to joint2
 boolean enableDepth()
          Enable the depthMap data collection
 boolean enableDepth(int width, int height, int fps)
          Enable the depthMap data collection
 boolean enableGesture()
          Enable gesture
 boolean enableHands()
          Enable hands
 boolean enableIR()
          Enable the irMap data collection ir is only available if there is no rgbImage activated at the same time
 boolean enableIR(int width, int height, int fps)
          Enable the irMap data collection ir is only available if there is no rgbImage activated at the same time
 boolean enableRecorder(int recordMedium, java.lang.String filePath)
          Enable recorder
 boolean enableRGB()
          Enable the camera image collection
 boolean enableRGB(int width, int height, int fps)
          Enable the camera image collection
 boolean enableScene()
          Enable the scene data collection
 boolean enableScene(int width, int height, int fps)
          Enable the scene data collection
 boolean enableUser(int flags)
          Enable user
 void finalize()
           
 boolean getCoM(int user, PVector com)
           
 float getJointOrientationSkeleton(int userId, int joint, PMatrix3D jointOrientation)
          gets the orientation of a joint
 float getJointPositionSkeleton(int userId, int joint, PVector jointPos)
          gets the coordinates of a joint
static java.lang.reflect.Method getMethodRef(java.lang.Object obj, java.lang.String methodName, java.lang.Class[] paraList)
           
 void getSceneFloor(PVector point, PVector normal)
           
 int[] getUsersPixels(int user)
           
 PImage irImage()
           
 boolean loadCalibrationDataSkeleton(int user, java.lang.String calibrationFile)
           
 boolean openFileRecording(java.lang.String filePath)
          Enable the player
 PImage rgbImage()
           
 boolean saveCalibrationDataSkeleton(int user, java.lang.String calibrationFile)
           
 PImage sceneImage()
           
 int[] sceneMap()
           
 void startTrackingHands(PVector pos)
           
 void update()
          Enable the user data collection
 
Methods inherited from class SimpleOpenNI.ContextWrapper
abortCalibrationSkeleton, addGesture, addLicense, addNodeToRecording, alternativeViewPointDepthToImage, availableGesture, clearCalibrationDataSkeleton, close, createSessionManager, createSessionManager, createSessionManager, createSessionManager, delete, depthHeight, depthImage, depthImageColorMode, depthImageTimeStamp, depthMap, depthMapRealWorld, depthMapRealWorldA, depthMapRealWorldA, depthMapSize, depthMapTimeStamp, depthRealWorldTimeStamp, depthWidth, getCPtr, getDepthGenerator, getGestureGenerator, getHandsGenerator, getImageGenerator, getIRGenerator, getNumberOfUsers, getSceneAnalyzer, getUserGenerator, getUserPixels, getUserPostition, getUsers, handsTimeStamp, hFieldOfView, imageTimeStamp, init, init, init, init, irHeight, irImage, irMap, irTimeStamp, irWidth, isCalibratedSkeleton, isCalibratingSkeleton, isCalibrationDataSkeleton, isInit, isTrackingSkeleton, loadCalibrationDataSkeleton, mirror, nodes, removeGesture, removeNodeFromRecording, requestCalibrationSkeleton, rgbHeight, rgbImage, rgbWidth, saveCalibrationDataSkeleton, sceneHeight, sceneImage, sceneMap, sceneTimeStamp, sceneWidth, setDepthImageColor, setDepthImageColorMode, setMirror, setSmoothingHands, setSmoothingSkeleton, startPoseDetection, startTrackingSkeleton, stopPoseDetection, stopTrackingAllHands, stopTrackingHands, stopTrackingSkeleton, swigReleaseOwnership, swigTakeOwnership, update, updateSubTimeStamp, updateTimeStamp, userHeight, userTimeStamp, userWidth, version, vFieldOfView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleOpenNI

public SimpleOpenNI(PApplet parent)
Creates the OpenNI context ands inits the modules

Parameters:
parent - PApplet

SimpleOpenNI

public SimpleOpenNI(PApplet parent,
                    int runMode)
Creates the OpenNI context ands inits the modules

Parameters:
parent - PApplet
runMode - - RunMode_Default, RunMode_SingleThreaded = Runs all in a single thread - RunMode_MultiThreaded = Runs the openNI/NIITE in another thread than processing

SimpleOpenNI

public SimpleOpenNI(PApplet parent,
                    java.lang.String initXMLFile)
Creates the OpenNI context ands inits the modules

Parameters:
parent - PApplet
initXMLFile - String

SimpleOpenNI

public SimpleOpenNI(PApplet parent,
                    java.lang.String initXMLFile,
                    int runMode)
Creates the OpenNI context ands inits the modules

Parameters:
parent - PApplet
initXMLFile - String
runMode - - RunMode_Default, RunMode_SingleThreaded = Runs all in a single thread - RunMode_MultiThreaded = Runs the openNI/NIITE in another thread than processing
Method Detail

convertProjectiveToRealWorld

public void convertProjectiveToRealWorld(PVector proj,
                                         PVector world)
Overrides:
convertProjectiveToRealWorld in class ContextWrapper

convertRealWorldToProjective

public void convertRealWorldToProjective(PVector world,
                                         PVector proj)
Overrides:
convertRealWorldToProjective in class ContextWrapper

depthImage

public PImage depthImage()

depthMap

public int[] depthMap()

depthMapRealWorld

public PVector[] depthMapRealWorld()

dispose

public void dispose()

drawCamFrustum

public void drawCamFrustum()

drawLimb

public void drawLimb(int userId,
                     int joint1,
                     int joint2)
Draws a limb from joint1 to joint2

Parameters:
userId - int
joint1 - int
joint2 - int

enableDepth

public boolean enableDepth()
Enable the depthMap data collection

Overrides:
enableDepth in class ContextWrapper

enableDepth

public boolean enableDepth(int width,
                           int height,
                           int fps)
Enable the depthMap data collection

Overrides:
enableDepth in class ContextWrapper
Parameters:
width - int
height - int
fps - int
Returns:

enableGesture

public boolean enableGesture()
Enable gesture

Overrides:
enableGesture in class ContextWrapper

enableHands

public boolean enableHands()
Enable hands

Overrides:
enableHands in class ContextWrapper

enableIR

public boolean enableIR()
Enable the irMap data collection ir is only available if there is no rgbImage activated at the same time

Overrides:
enableIR in class ContextWrapper

enableIR

public boolean enableIR(int width,
                        int height,
                        int fps)
Enable the irMap data collection ir is only available if there is no rgbImage activated at the same time

Overrides:
enableIR in class ContextWrapper
Parameters:
width - int
height - int
fps - int
Returns:

enableRecorder

public boolean enableRecorder(int recordMedium,
                              java.lang.String filePath)
Enable recorder

Overrides:
enableRecorder in class ContextWrapper

enableRGB

public boolean enableRGB()
Enable the camera image collection

Overrides:
enableRGB in class ContextWrapper

enableRGB

public boolean enableRGB(int width,
                         int height,
                         int fps)
Enable the camera image collection

Overrides:
enableRGB in class ContextWrapper
Parameters:
width - int
height - int
fps - int
Returns:

enableScene

public boolean enableScene()
Enable the scene data collection

Overrides:
enableScene in class ContextWrapper

enableScene

public boolean enableScene(int width,
                           int height,
                           int fps)
Enable the scene data collection

Overrides:
enableScene in class ContextWrapper
Parameters:
width - int
height - int
fps - int
Returns:

enableUser

public boolean enableUser(int flags)
Enable user

Overrides:
enableUser in class ContextWrapper

finalize

public void finalize()

getCoM

public boolean getCoM(int user,
                      PVector com)
Overrides:
getCoM in class ContextWrapper

getJointOrientationSkeleton

public float getJointOrientationSkeleton(int userId,
                                         int joint,
                                         PMatrix3D jointOrientation)
gets the orientation of a joint

Parameters:
userId - int
joint - int
jointOrientation - PMatrix3D
Returns:
The confidence of this joint float

getJointPositionSkeleton

public float getJointPositionSkeleton(int userId,
                                      int joint,
                                      PVector jointPos)
gets the coordinates of a joint

Parameters:
userId - int
joint - int
jointPos - PVector
Returns:
The confidence of this joint float

getMethodRef

public static java.lang.reflect.Method getMethodRef(java.lang.Object obj,
                                                    java.lang.String methodName,
                                                    java.lang.Class[] paraList)

getSceneFloor

public void getSceneFloor(PVector point,
                          PVector normal)
Overrides:
getSceneFloor in class ContextWrapper

getUsersPixels

public int[] getUsersPixels(int user)

irImage

public PImage irImage()

loadCalibrationDataSkeleton

public boolean loadCalibrationDataSkeleton(int user,
                                           java.lang.String calibrationFile)
Overrides:
loadCalibrationDataSkeleton in class ContextWrapper

openFileRecording

public boolean openFileRecording(java.lang.String filePath)
Enable the player

Overrides:
openFileRecording in class ContextWrapper

rgbImage

public PImage rgbImage()

saveCalibrationDataSkeleton

public boolean saveCalibrationDataSkeleton(int user,
                                           java.lang.String calibrationFile)
Overrides:
saveCalibrationDataSkeleton in class ContextWrapper

sceneImage

public PImage sceneImage()

sceneMap

public int[] sceneMap()

startTrackingHands

public void startTrackingHands(PVector pos)
Overrides:
startTrackingHands in class ContextWrapper

update

public void update()
Enable the user data collection

Overrides:
update in class ContextWrapper