DIYbio:Software/ucam: Difference between revisions
From OpenWetWare
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== ucam 2-axis digital stage == | |||
code to control two servos via an arduino to move a 2-axis microscope slide stage can be found on at [http://github.com/100ideas/ucam]. | |||
''last updated: 8 Feb 2009'' | |||
== ucam blob detection == | |||
=== requirements === | === requirements === | ||
* [http://processing.org/download/index.html processing.org 1.0.9] | * [http://processing.org/download/index.html processing.org 1.0.9] | ||
Line 5: | Line 12: | ||
=== code === | === code === | ||
''last updated: 13 Dec 2009 '' | ''code last updated: 13 Dec 2009'' | ||
<pre> | <pre> |
Revision as of 14:19, 8 February 2010
ucam 2-axis digital stage
code to control two servos via an arduino to move a 2-axis microscope slide stage can be found on at [1].
last updated: 8 Feb 2009
ucam blob detection
requirements
- processing.org 1.0.9
- v3ga blob-detection library)
- note: after installing the library, you must restart the processing ide.
code
code last updated: 13 Dec 2009
/** * 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); }