Created
September 22, 2016 15:58
-
-
Save yumu19/5ecffb2533678e6a3ffaf3b3257755fd to your computer and use it in GitHub Desktop.
プレゼンテーションのデモのときなどにWebカメラの映像を映すProcessingのプログラム(いろいろハードコーディング)
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
// 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