Processing (BETA) version 125+のためのリファレンス. もしあなたが旧バージョンを使っているならば、ソフトウェア内のリファレンスを使用してください。 もし何らかのエラーやコメントがあれば 私たちに知らせてください

Name

captureEvent()

Examples
import processing.video.*;
Capture myCapture;

void setup() 
{
  size(200, 200);
  // The name of the device is dependent on what's
  // 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);
}

import processing.video.*;
Capture myCapture;
String[] caps;

void setup() 
{
  size(200, 200);
  caps = Capture.list()
  myCapture = new Capture(this, caps[0], width, height, 30);
  myCapture = new Capture(this, caps[1], width, height, 30);
}

void captureEvent(Capture c) {
  if(c == caps[0]) {
    myCapture.read();
  } else if (c == caps[1]) {
    myCapture.read();
  }
}

void draw() {
  image(myCapture, 0, 0);
}
Description Called when a new camera frame is available. Use the read() method to capture this frame. If there is more than one capture device in the program, captureEvent() is called each time any of the devices has a new frame available. Use an if() to determine which device is triggering the event. See the above example for implementation details.
Syntax
void captureEvent(Capture which) {
  statements
}
Parameters
statements any valid statements
which the camera with the event
Usage Web & Application
Related Capture
Updated on September 23, 2006 05:40:19pm PDT

Creative Commons License
この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org