FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Back  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

Capture

   
Examples  
import processing.video.*; 
Capture myCapture; 
 
void setup() 
{ 
  size(200, 200); 
  // The name of the capture device is dependent those 
  // plugged into the computer. To get a list of the 
  // choices, uncomment the following line 
  // println(Capture.list()); 
  String s = "Logitech QuickCam Messenger-WDM"; 
  myCapture = new Capture(this, s, width, height, 30); 
} 
 
void captureEvent(Capture myCapture) { 
  myCapture.read(); 
} 
 
void draw() { 
  image(myCapture, 0, 0); 
} 
 

Description   Datatype for storing and manipulating video frames from an attached capture device such as a camera. Use Capture.list() to show the names of any attached devices. Using the version of the constructor without name will attempt to use the last device used by a QuickTime program.
   
Methods  
read()
  Reads the current image

available()
  Returns true when a new image is available

list()
  Lists the devices current attached and on

framerate()
  Sets how often new frames are read

stop()
  Stops capturing frames

   
   
Constructors  
Capture(parent, width, height)
Capture(parent, width, height, fps)
Capture(parent, name, width, height)
Capture(parent, name, width, height, fps)
   
Parameters  
parent   PApplet: typically use "this"

width   int: width of the frame

height   int: height of the frame

fps   int: number of frames to read per second

name   String: name of the camera

   
Usage   Application
   
Related   captureEvent()
 
 






   
 
Updated: Fri Jul 15 16:41:04 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info  
Casey Reas et al. Casey Reas -->     Processing is an open project initiated by Ben Fry and Casey Reas     © Info   A versatile input provider, a popup window with a set of interactive