Skip to content

Instantly share code, notes, and snippets.

@smcl
Created June 16, 2011 20:55
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 smcl/1030252 to your computer and use it in GitHub Desktop.
Save smcl/1030252 to your computer and use it in GitHub Desktop.
Reading a video frame-by-frame with OpenCV in Processing (not javascript)
import hypermedia.video.*;
OpenCV opencv;
PImage frame;
void setup() {
size( 640, 360 );
frameRate(30);
opencv = new OpenCV( this );
opencv.movie( "mymovie.mov", width, height );
}
void draw() {
opencv.read();
frame = opencv.image();
image(frame,0,0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment