Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created March 17, 2011 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atduskgreg/873676 to your computer and use it in GitHub Desktop.
Save atduskgreg/873676 to your computer and use it in GitHub Desktop.
import org.openkinect.*;
import org.openkinect.processing.*;
import processing.video.*;
MovieMaker mm;
Kinect kinect;
void setup() {
size(640,480);
frameRate(24);
kinect = new Kinect(this);
kinect.start();
kinect.enableDepth(true);
mm = new MovieMaker(this, width, height, "kinect_movie.mov", 24, MovieMaker.ANIMATION, MovieMaker.HIGH);
}
void draw() {
image(kinect.getDepthImage(),0,0);
mm.addFrame();
}
void keyPressed() {
if (key == ' ') {
mm.finish(); // Finish the movie if space bar is pressed!
}
}
void stop() {
kinect.quit();
super.stop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment