dLife Home Page

dlife.vision.cameras
Class ImageSequenceCamera

java.lang.Object
  extended by java.util.Observable
      extended by dlife.robot.Device
          extended by dlife.vision.Camera
              extended by dlife.vision.cameras.ImageSequenceCamera
All Implemented Interfaces:
Observer

public class ImageSequenceCamera
extends Camera

A Camera that displays a sequence of images as a video stream. The sequence of images must be contained within a single directory. The images will be displayed in lexicographical order. A good practice is to name the images using a numbering scheme such as:

The images can be in any format that is supported by the ImageIO class. This includes at least bmp, wbmp, jpeg, gif, and png images.

To launch an ImageSequenceCamera in Stand Alone mode:

  1. Ensure that the basic dLife installation is done.
  2. Double click the dLifeDist/UserScripts/ImageSequenceCamera file (Mac/Linux) or the dLifeDist/UserScripts/ImageSequenceCamera.bat file (Windows).

For an example of using an ImageSequenceCamera in a Contoller see the examples.dlife.vision.CokeCanTracker example.

Version:
Aug 2, 2010
Author:
Grant Braught, Dickinson College

Field Summary
 
Fields inherited from class dlife.vision.Camera
BOTH_VIDEO, FILTERED_VIDEO, RAW_VIDEO
 
Fields inherited from class dlife.robot.Device
DEFAULT_GUI_UPDATE_DELAY, DEFAULT_READ_DELAY, myRobot, readCount
 
Constructor Summary
ImageSequenceCamera()
          Construct a new ImageSequenceCamera that prompts the user to choose a directory containing the images to use.
ImageSequenceCamera(String path)
          Construct a new ImageSequenceCamera using the files in the directory specified by file.
 
Method Summary
static void main(String[] args)
          Display the GUI for a Camera using a sequence of images as the video source.
 
Methods inherited from class dlife.vision.Camera
addFilter, clearDrawing, createGUIObjects, drawCircle, drawLine, drawOval, drawRectangle, drawString, freeze, getFilterManager, getFilters, getHeight, getSeekLocation, getVideoDisplay, getVideoSource, getWidth, insertFilter, pause, play, readStateFromRobot, removeFilter, removeFilter, rewind, seek, setFilters, shutDown, startUp, stepBackward, stepForward, update
 
Methods inherited from class dlife.robot.Device
getAutoRead, getGUI, getGUIUpdateDelay, getReadDelay, getRobot, getSensorReadCount, getSensorReadRate, setAutoRead, setGUIUpdateDelay, setReadDelay, setRobot, startAutoReadTimer, stopAutoReadTimer
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageSequenceCamera

public ImageSequenceCamera()
                    throws VideoSourceCreationFailedException
Construct a new ImageSequenceCamera that prompts the user to choose a directory containing the images to use.

Throws:
VideoSourceCreationFailedException

ImageSequenceCamera

public ImageSequenceCamera(String path)
                    throws VideoSourceCreationFailedException
Construct a new ImageSequenceCamera using the files in the directory specified by file.

Parameters:
path - the path to a directory containing the images to be used.
Throws:
VideoSourceCreationFailedException - if the source cannot be created from the given path.
Method Detail

main

public static void main(String[] args)
                 throws VideoSourceCreationFailedException
Display the GUI for a Camera using a sequence of images as the video source. The user is asked to select a directory containing the images to use.

Parameters:
args - none
Throws:
VideoSourceCreationFailedException

dLife Home Page