dlife.vision.cameras
Class SingleImageCamera
java.lang.Object
java.util.Observable
dlife.robot.Device
dlife.vision.Camera
dlife.vision.cameras.SingleImageCamera
- All Implemented Interfaces:
- Observer
public class SingleImageCamera
- extends Camera
A Camera that displays a single image.
The image 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 SingleImageCamera in Stand Alone mode:
- Ensure that the basic
dLife installation is done.
- Double click the
dLifeDist/UserScripts/SingleImageCamera file (Mac/Linux)
or the dLifeDist/UserScripts/SingleImageCamera.bat file (Windows).
- Version:
- Sep 23, 2010
- Author:
- Grant Braught, Dickinson College
|
Constructor Summary |
SingleImageCamera()
Construct a new SingleImageCamera that prompts the user to choose an image to
use. |
SingleImageCamera(URL path)
Construct a new SingleImageCamera using the file specified by the given URL. |
|
Method Summary |
static void |
main(String[] args)
Display the GUI for a Camera using a single image 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 |
SingleImageCamera
public SingleImageCamera()
throws VideoSourceCreationFailedException
- Construct a new SingleImageCamera that prompts the user to choose an image to
use.
- Throws:
VideoSourceCreationFailedException
SingleImageCamera
public SingleImageCamera(URL path)
throws VideoSourceCreationFailedException
- Construct a new SingleImageCamera using the file specified by the given URL.
The URL may indicate a file on the local machine or available via a
network.
- Parameters:
path - the path to an image file.
- Throws:
VideoSourceCreationFailedException - if the source cannot be
created from the given URL.
main
public static void main(String[] args)
throws VideoSourceCreationFailedException
- Display the GUI for a Camera using a single image as the video source.
The user is asked to select a file containing the image to use.
- Parameters:
args - none
- Throws:
VideoSourceCreationFailedException