Accessor: cameras/Camera

cameras/Camera

An accessor for a camera on the local host. This can be a built-in camera or a USB-connected camera. This accessor has two modes of operation, "triggered" and "open loop." In triggered mode, it captures an image whenever a trigger input is received and produces that image on its output. In open-loop mode, it captures every image produced by the camera, at the speed of the camera, and produces on the output a stream of such images. It limits the number of outputs to maxFrameRate images per second, even if the camera produces more images than that. You can use the maxFrameRate parameter to avoid overwhelming your application.

Version:
  • $$Id$$
Author:
  • Edward A. Lee (eal@eecs.berkeley.edu)
Source:
Inputs:
Name Type Description
trigger A trigger input for triggered mode. The value is ignored and can be anything.
Outputs:
Name Type Description
image Object A stream of captured images.
Parameters:
Name Type Description
triggered boolean If true, use triggered mode. Otherwise, use open-loop mode. This is a boolean that defaults to false.
maxFrameRate number If not triggered, this limits the output to the specified number of frames per second. This is a number that defaults to 25.
camera string The name of the camera to use. A list of available cameras is presented as options. This is a string that defaults to "default camera", which uses the system default, if there is one.
viewSize Object The view size to use for capture, in pixels. A list of available view sizes for the selected camara is presented as options. This is a JSON specification with a "width" and "height" field, as in for example {"width":640, "height":480}.

Methods

(static) initialize()

Set the view size of the camera, open it, and depending on the triggered mode, either set up an input handler for the trigger input or set up a handler for the 'image' event notification from the camera.

Source:

(static) setup()

Create the inputs, outputs, and parameters, and update the parameters for the selected camera.

Source:

(static) wrapup()

Remove handlers and close the camera.

Source: