2016年5月5日 星期四

Week11 金博鈞

import SimpleOpenNI.*;

SimpleOpenNI openni;

void setup(){
  size(600,400);
  openni = new SimpleOpenNI(this);
  openni.enableRGB();
  openni.enableDepth();
  openni.enableUser();
}

void draw(){
  openni.update();
  image(openni.userImage(), 0,0 ,600,400);
  for(int userId : openni.getUsers()){
    PVector pos = new PVector(0,0,0);
    float confidence = openni.getJointPositionSkeleton(userId,SimpleOpenNI.SKEL_HEAD,pos);
      ellipse(pos.x, pos.y, 50,50);
      println(pos);
  }
}
void onNewUser(SimpleOpenNI openni,int userId)
{
  openni.startTrackingSkeleton(userId);
}

期末題目




沒有留言:

張貼留言