Created
March 17, 2011 01:13
-
-
Save atduskgreg/873676 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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