How to read oni file in Processing 2?

徘徊边缘 提交于 2019-12-03 21:02:05

I recommend using the SimpleOpenNI library:

import SimpleOpenNI.*;

SimpleOpenNI ni;

void setup(){
  size(640,480);
  ni = new SimpleOpenNI(this);
  if(SimpleOpenNI.deviceCount() == 0) ni.openFileRecording("/path/to/yourRecording.oni");
  ni.enableDepth();
}
void draw(){
  ni.update();
  image(ni.depthImage(),0,0);
}

If you're interested in reading every single value in the depth map, check out [this answer](especially the updated code at the end)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!