Created
June 16, 2011 20:55
-
-
Save smcl/1030252 to your computer and use it in GitHub Desktop.
Reading a video frame-by-frame with OpenCV in Processing (not javascript)
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 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