Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An old 2009 file I had laying around #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Processing/ucam.processing
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Getting Started with Capture.
*
* Reading and displaying an image from an attached Capture device.
*/

import processing.video.*;
import blobDetection.*;

Capture cam;
Capture isight;

BlobDetection theBlobDetection;
PImage img;
boolean newFrame=false;

void setup() {
size(640, 480); // Change size to 320 x 240 if too slow at 640 x 480

// If no device is specified, will just use the default.

// To use another device (i.e. if the default device causes an error),
// list all available capture devices to the console to find your camera.
String[] devices = Capture.list();
println(devices);
println(devices[7]);

// Change devices[0] to the proper index for your camera.
isight = new Capture(this, width, height, devices[7]); // isight identically named to ext. usb camera?
cam = new Capture(this, width, height, devices[7]);
isight = null; //get rid of isight object since we just use it to help select the external

// Opens the settings page for this capture device.
//camera.settings();
}


void captureEvent(Capture myCapture) {
cam.read();
}

void draw() {
image(cam, 0, 0);
}