Skip to content

Instantly share code, notes, and snippets.

@trevery
Forked from shiffman/flip.pde
Created May 20, 2018 16:09
Show Gist options
  • Save trevery/643c12e1b92d69566526bf0d7a56100c to your computer and use it in GitHub Desktop.
Save trevery/643c12e1b92d69566526bf0d7a56100c 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