Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import processing.video.*;
- Capture video;
- int framecount = 0;
- void setup() {
- printArray(Capture.list());
- size(1280,720);
- video = new Capture(this, 1280,720);
- video.start();
- }
- void captureEvent(Capture video) {
- video.read();
- }
- void mousePressed() {
- saveFrame("cap-####.png");
- }
- void draw() {
- copy(video, video.width - (framecount % video.width), 0, 1, video.height, framecount % width, 0, 1, video.height);
- framecount += 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement