Skip to content

Instantly share code, notes, and snippets.

@yumu19
Created September 22, 2016 15:58
Show Gist options
  • Save yumu19/5ecffb2533678e6a3ffaf3b3257755fd to your computer and use it in GitHub Desktop.
Save yumu19/5ecffb2533678e6a3ffaf3b3257755fd to your computer and use it in GitHub Desktop.
プレゼンテーションのデモのときなどにWebカメラの映像を映すProcessingのプログラム(いろいろハードコーディング)
// This program needs library named 'Video'
import processing.video.*;
Capture video;
void setup() {
size(1280,960);
String[] cams = Capture.list();
video = new Capture(this, cams[1]);
video.start();
}
void draw() {
if (video.available() == true) {
video.read();
image(video, 0, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment