dlife.vision.cameras
Class ImageSequenceCamera
java.lang.Object
java.util.Observable
dlife.robot.Device
dlife.vision.Camera
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:
img001.jpg
img002.jpg
...
img127.jpg
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:
- Ensure that the basic
dLife installation is done.
- 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
|
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.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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