Updated capture examples

This commit is contained in:
codeanticode
2012-08-15 22:18:15 +00:00
parent a406170c1e
commit 26e6038f61
2 changed files with 15 additions and 23 deletions
@@ -22,19 +22,10 @@ void setup() {
println(cameras[i]);
}
cam = new Capture(this, 320, 240, cameras[0]);
cam.start();
// You can get the list of resolutions (width x height x fps)
// supported capture device by calling the resolutions()
// method. It must be called after creating the capture
// object.
Resolution[] res = cam.resolutions();
println("Supported resolutions:");
for (int i = 0; i < res.length; i++) {
println(res[i].width + "x" + res[i].height + ", " +
res[i].fps + " fps (" + res[i].fpsString +")");
}
// The camera can be initialized directly using an element
// from the array returned by list():
cam = new Capture(this, cameras[0]);
cam.start();
}
}
@@ -46,4 +37,4 @@ void draw() {
// The following does the same, and is faster when just drawing the image
// without any additional resizing, transformations, or tint.
//set(0, 0, cam);
}
}