This reference is for Processing 2.0+. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Class

Capture

Name

list()

Examples
import processing.video.*;

Capture cam;

void setup() {
  size(640, 480);

  String[] cameras = Capture.list();
  
  if (cameras.length == 0) {
    println("There are no cameras available for capture.");
    exit();
  } else {
    println("Available cameras:");
    for (int i = 0; i < cameras.length; i++) {
      println(cameras[i]);
    }
  }      
}

Description Gets a list of all available capture devices such as a camera. Use print() to write the information to the text window.
Syntax
.list()
ReturnsString[]
Updated on August 17, 2014 07:01:17pm EDT

Creative Commons License