Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gohai.glvideo.*;
- GLCapture video;
- void setup() {
- size(640, 480, P2D);
- // this will use the first recognized camera by default
- video = new GLCapture(this);
- video.start();
- }
- void draw() {
- background(0);
- if (video.available()) {
- video.read();
- }
- image(video, 0, 0, width, height);
- // Apply a threshold filter with parameter level 0.5
- filter(THRESHOLD, 0.5);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement