squint
Class Camera

java.lang.Object
  extended by squint.Camera

public class Camera
extends java.lang.Object

Camera is a class that provides access to the iSight camera built in to Apple iMac and Macbook computers. It should also provide access to cameras attached to other systems, but it has only been tested with iSight cameras.


Constructor Summary
Camera()
          Constructs a new Camera that will access the last (and hopefully only) camera used on the machine.
Camera(java.lang.String name)
          Constructs a new Camera given the name of the camera to access.
 
Method Summary
 void activate()
          Activate a camera for use in video mode (i.e., invoking getImage frequently).
 void deactivate()
          Deactivate a camera.
 SImage getImage()
          Retrieve an image file from a camera.
static java.lang.String[] list()
          Retrieve a list of the names of all available cameras.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Camera

public Camera()
Constructs a new Camera that will access the last (and hopefully only) camera used on the machine. The Camera.list() method may help determine names that can be used.


Camera

public Camera(java.lang.String name)
Constructs a new Camera given the name of the camera to access.

Parameters:
name - the name of the camera device
Method Detail

activate

public void activate()
Activate a camera for use in video mode (i.e., invoking getImage frequently).


deactivate

public void deactivate()
Deactivate a camera.


getImage

public SImage getImage()
Retrieve an image file from a camera.

Returns:
the latest image available from the camera

list

public static java.lang.String[] list()
Retrieve a list of the names of all available cameras.

Returns:
the names of the cameras