dLife Home Page

dlife.robot.khepera2
Class Khepera2Camera

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

public class Khepera2Camera
extends Camera

A Camera for processing video streamed from a Khepera2 robot via the dLife VisionServer.

Version:
Jan 31, 2011
Author:
Grant Braught, Dickinson College
See Also:
dlife.vision.server

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
Khepera2Camera()
          Create a new Khepera2Camera.
Khepera2Camera(String host, int tcpPort, int udpPort, String dev, String input, String std, int width, int height, int quality)
          Create a Khepera2Camera using the given parameters.
 
Method Summary
 
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

Khepera2Camera

public Khepera2Camera()
               throws VideoSourceCreationFailedException
Create a new Khepera2Camera. This method will prompt the user for the IP/port of the vision server and then for the parameters to use with the video capture device (e.g. device name, input, size and image quality.)

Throws:
VideoSourceCreationFailedException - if there is a problem contacting the vision server or if the user cancels the creation.

Khepera2Camera

public Khepera2Camera(String host,
                      int tcpPort,
                      int udpPort,
                      String dev,
                      String input,
                      String std,
                      int width,
                      int height,
                      int quality)
Create a Khepera2Camera using the given parameters.

Parameters:
host - the host of the VisionServer
tcpPort - the port which to connect to the VisionServer
udpPort - the UDP port we wish to receive the video on
dev - the name of the device file on the VisionServer to connect to
input - the name of the input for the given device to connect to
std - the name of the video standard we wish to stream in
width - the width of the video
height - the height of the video
quality - the quality of the image within the range [1,100]

dLife Home Page