OpenCV
index
 
Name capture ( )
Examples
import hypermedia.video.*;


OpenCV opencv;

void setup() {
  size( 640, 480 );
  opencv = new OpenCV( this );
  opencv.capture( width, height );  // open video stream
}

void draw() {
  opencv.read();                   // grab frame from camera
  image( opencv.image(), 0, 0 );   // and display image
}
Description Allocates and initialise resources for reading a video stream from the default camera.
note : this method automatically update previous memory allocation
Syntax
capture(width, height);
capture(width, height, index);
Parameters
width   int : the width of frames for the video stream
height   int : the height of frames for the video stream
index   int : the index of the camera to be used
Returns None
Usage Web & Application
Related