Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Gestural Interfaces with the Kinect

gregab
April 17, 2012

Intro to Gestural Interfaces with the Kinect

The slides from my O'Reilly webcast in 4/2012.

gregab

April 17, 2012
Tweet

More Decks by gregab

Other Decks in Technology

Transcript

  1. NYU ITP Resident Making Things See Special Effects About Me

    http://shop.oreilly.com/product/0636920020684.do Tuesday, April 17, 12
  2. The Plan • What is the Kinect? • A silly

    example of a gestural interface • The ingredients: joint position and vector math • What makes a good gestural interface? • A better example of a gestural interface Tuesday, April 17, 12
  3. How does this work? Define rules of a Pose Measure

    relative position of joints Trigger mp3 Tuesday, April 17, 12
  4. void onNewUser(int userId) { println("start pose detection"); kinect.startPoseDetection("Psi", userId); }

    void onEndCalibration(int userId, boolean successful) { if (successful) { println(" User calibrated !!!"); kinect.startTrackingSkeleton(userId); } else { println(" Failed to calibrate user !!!"); kinect.startPoseDetection("Psi", userId); } } void onStartPose(String pose, int userId) { println("Started pose for user"); kinect.stopPoseDetection(userId); kinect.requestCalibrationSkeleton(userId, true); } Tuesday, April 17, 12
  5. void onNewUser(int userId) { println("start pose detection"); kinect.startPoseDetection("Psi", userId); }

    void onEndCalibration(int userId, boolean successful) { if (successful) { println(" User calibrated !!!"); kinect.startTrackingSkeleton(userId); } else { println(" Failed to calibrate user !!!"); kinect.startPoseDetection("Psi", userId); } } void onStartPose(String pose, int userId) { println("Started pose for user"); kinect.stopPoseDetection(userId); kinect.requestCalibrationSkeleton(userId, true); } Tuesday, April 17, 12
  6. void draw() { kinect.update(); PImage depth = kinect.depthImage(); image(depth, 0,

    0); // make a vector of ints to store the list of users IntVector userList = new IntVector(); // write the list of detected users // into our vector kinect.getUsers(userList); // if we found any users if (userList.size() > 0) { // get the first user int userId = userList.get(0); // if we're successfully calibrated if ( kinect.isTrackingSkeleton(userId)) { ... Tuesday, April 17, 12
  7. ... // if we're successfully calibrated if ( kinect.isTrackingSkeleton(userId)) {

    // make a vector to store the left hand PVector rightHand = new PVector(); // put the position of the left hand into that vector kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_LEFT_HAND, rightHand); ellipse(rightHand.x, rightHand.y, 10, 10); Tuesday, April 17, 12
  8. Kinect Abnormal Motion Assessment System Involuntary Motion Disorders like Chorea

    van Sydenham, Tardive Dyskinesia, and Parkinson’s motionassessment.com Tuesday, April 17, 12
  9. Kinect Abnormal Motion Assessment System Involuntary Motion Disorders like Chorea

    van Sydenham, Tardive Dyskinesia, and Parkinson’s motionassessment.com Tuesday, April 17, 12
  10. Kinect Abnormal Motion Assessment System Won the National Health 2.0

    Developer Challenge. Maybe improve treatment. motionassessment.com Tuesday, April 17, 12