Skip to content

Instantly share code, notes, and snippets.

@shiffman
Created October 25, 2015 00:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shiffman/57efea78b97bb92011b9 to your computer and use it in GitHub Desktop.
Save shiffman/57efea78b97bb92011b9 to your computer and use it in GitHub Desktop.
Flipping Video in Processing
import processing.video.*;
Capture cam;
void setup() {
size(640, 480);
cam = new Capture(this, 640, 480);
cam.start();
}
void captureEvent(Capture cam) {
cam.read();
}
void draw() {
pushMatrix(); // just so nothing else is affected
scale(-1, 1);
image(cam, -cam.width, 0);
popMatrix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment