How can I link multiple Kinects in one processing sketch?

I am having trouble connecting multiple Kinects within one Processing sketch. I want to be able to use the data from multiple Kinects to create one extended image. Is there any way to do this?

1 Like

Same as your other post about using kinect

  • What kinect are you using?
  • What operative system are you using?
  • What library are you using for the kinect connection?

I’m using a Kinect v2. My operating system is MacOS Sierra version 10.12.6. The library I’m using is Open Kinect.

Ok. I guess you are talking about this Open Kinect.
If that is the case, there is an example for using more than one Kinect v2. Is included in the library and look like this:

Thomas Sanchez Lengeling
How to use multiple Kinects v2 in the same sketch.
Should work up n number of Kinects v2 connected to the USB 3.0 port.

import org.openkinect.processing.*;

Kinect2 kinect2a;
Kinect2 kinect2b;

void setup() {
  size(1536, 848, P2D);

  kinect2a = new Kinect2(this);

  kinect2b = new Kinect2(this);

  //Start tracking each kinect
  kinect2a.initDevice(0); //index 0
  kinect2b.initDevice(1); //index 1


void draw() {

  image(kinect2a.getDepthImage(), 0, 0);
  image(kinect2a.getIrImage(), 512, 0);
  image(kinect2a.getVideoImage(), 512*2, 0, 512, 424);

  image(kinect2b.getDepthImage(), 0, 424);
  image(kinect2b.getIrImage(), 512, 424);
  image(kinect2b.getVideoImage(), 512*2, 424, 512, 424);

I cant test it so, let us know if that help.