import codeanticode.gsvideo.*;
GSCapture video;
void setup() {
size(1920, 1080);
video = new GSCapture(this, width, height);
}
void draw() {
video.start(); //开始读取摄像头
/////////检查是否有摄像头,如果检查到摄像头开始读取//
if (video.available() == true ) {
video.read();
}
///摄像头显示//
image(video, 0, 0);
}