Skip to content

Instantly share code, notes, and snippets.

@companje companje/TwoCams.pde
Created Nov 23, 2019

Embed
What would you like to do?
Two cams / cameras
import processing.video.*;
Capture cam1, cam2;
void setup() {
size(1280, 480);
//printArray(Capture.list());
cam1 = new Capture(this, "name=HD Pro Webcam C920,size=640x480,fps=30");
//cam2 = new Capture(this, "name=BRIO 4K Stream Edition,size=640x480,fps=30");
cam2 = new Capture(this, "name=Logitech Webcam C930e,size=640x480,fps=30");
cam1.start();
cam2.start();
}
void draw() {
if (cam1.available()) cam1.read();
if (cam2.available()) cam2.read();
image(cam1, 0, 0, 640,480);
image(cam2, 640, 0, 640,480);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.