Last active
August 18, 2016 22:22
-
-
Save GalNissim/bce5e7449828e029c458ef446fbfbf11 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** | |
| * Getting Started with Capture. | |
| * | |
| * Reading and displaying an image from an attached Capture device. | |
| */ | |
| import processing.video.*; | |
| Capture cam; | |
| void setup() { | |
| size(640, 480); | |
| String[] cameras = Capture.list(); | |
| // Capture | |
| cam = new Capture(this, 1280, 960); //change "cameras[15]" if you are | |
| cam.start(); | |
| println(cameras); | |
| } | |
| void captureEvent(Capture cam) { | |
| cam.read(); | |
| } | |
| void draw() { | |
| image(cam, 0, 0, width, height); | |
| println(cam.pixels.length); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment