Created
November 23, 2019 10:54
-
-
Save companje/f6e70f179680318525332db68c9ab51c to your computer and use it in GitHub Desktop.
Two cams / cameras
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
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