kaos.robots.activmedia
Class CannonCamera

java.lang.Object
  extended by kaos.robots.activmedia.CannonCamera
All Implemented Interfaces:
PanTiltBase, VideoCamera, Zoomable

public class CannonCamera
extends java.lang.Object
implements VideoCamera, Zoomable, PanTiltBase


Field Summary
protected  Logger _logger
           
 
Constructor Summary
CannonCamera()
           
 
Method Summary
protected static void center()
           
 void CenterPanTilt()
          CenterPanTilt
 java.lang.Double GetMaxZoom()
          GetMaxZoom
protected static double getPan()
           
 java.lang.Double GetPan()
          GetPan
 Pose GetPanTiltPose()
          GetPanTiltPose
protected static double getTilt()
           
 java.lang.Double GetTilt()
          GetTilt
protected static double getZoom()
           
 java.lang.Double GetZoom()
          GetZoom
 SerializableBufferImage GrabFrameAsBuffer()
          CaptureImage
protected static int initCamera()
           
protected static void pan(double direction)
           
 void Pan(java.util.HashMap properties)
          Pan
protected static void panRel(double direction)
           
 void SetPan(java.util.HashMap properties)
          SetPan
 void SetPanTiltPose(java.util.HashMap properties)
          SetPanTiltPose
 void SetTilt(java.util.HashMap properties)
          SetTilt
 void SetZoom(java.util.HashMap properties)
          SetZoom
protected static void tilt(double direction)
           
 void Tilt(java.util.HashMap properties)
          Tilt
protected static void tiltRel(double direction)
           
protected static void zoom(double direction)
           
 void Zoom(java.util.HashMap properties)
          Zoom
protected static void zoomRel(double direction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected Logger _logger
Constructor Detail

CannonCamera

public CannonCamera()
Method Detail

GrabFrameAsBuffer

public SerializableBufferImage GrabFrameAsBuffer()
                                          throws java.lang.Exception
CaptureImage

Specified by:
GrabFrameAsBuffer in interface VideoCamera
Parameters:
none -
Returns:
Buffer buffer of image
Throws:
java.lang.Exception

Zoom

public void Zoom(java.util.HashMap properties)
          throws java.lang.Exception
Zoom

Specified by:
Zoom in interface Zoomable
Parameters:
HashMap - of properties required key hasDirection values in | out optional key hasValue values amount to zoom relative to current setting | [default 20%]
Throws:
java.lang.Exception

SetZoom

public void SetZoom(java.util.HashMap properties)
             throws java.lang.Exception
SetZoom

Specified by:
SetZoom in interface Zoomable
Parameters:
HashMap - of properties required key hasPercent values Double [0-1] indicating percentage
Throws:
java.lang.Exception

GetZoom

public java.lang.Double GetZoom()
                         throws java.lang.Exception
GetZoom

Specified by:
GetZoom in interface Zoomable
Parameters:
None -
Returns:
double [0-1] indicating current zoom percentage
Throws:
java.lang.Exception

GetMaxZoom

public java.lang.Double GetMaxZoom()
                            throws java.lang.Exception
GetMaxZoom

Specified by:
GetMaxZoom in interface Zoomable
Parameters:
None -
Returns:
int indicating the maximum zoom
Throws:
java.lang.Exception

Pan

public void Pan(java.util.HashMap properties)
         throws java.lang.Exception
Pan

Specified by:
Pan in interface PanTiltBase
Parameters:
HashMap - of properties required key hasDirection values left|right optional key hasDegrees values number of degrees to pan relative to current angle | [default 20 degrees]
Throws:
java.lang.Exception

SetPan

public void SetPan(java.util.HashMap properties)
            throws java.lang.Exception
SetPan

Specified by:
SetPan in interface PanTiltBase
Parameters:
HashMap - of properties required key hasPercent values percent of degrees to pan absolute from center OR key hasDegrees values number of degrees to pan absolute from center
Throws:
java.lang.Exception

Tilt

public void Tilt(java.util.HashMap properties)
          throws java.lang.Exception
Tilt

Specified by:
Tilt in interface PanTiltBase
Parameters:
HashMap - of properties required key hasDirection values up|down optional key hasDegrees values number of degrees to pan relative to current angle | [default 20 degrees]
Throws:
java.lang.Exception

SetTilt

public void SetTilt(java.util.HashMap properties)
             throws java.lang.Exception
SetTilt

Specified by:
SetTilt in interface PanTiltBase
Parameters:
HashMap - of properties required key hasPercent values percent of degrees to pan absolute from center OR key hasDegrees values number of degrees to pan absolute from center
Throws:
java.lang.Exception

SetPanTiltPose

public void SetPanTiltPose(java.util.HashMap properties)
                    throws java.lang.Exception
SetPanTiltPose

Specified by:
SetPanTiltPose in interface PanTiltBase
Parameters:
HashMap - of properties required key hasPose values Pose with pan (Yaw) and tilt (pitch) in absolute degrees
Throws:
java.lang.Exception

GetPan

public java.lang.Double GetPan()
                        throws java.lang.Exception
GetPan

Specified by:
GetPan in interface PanTiltBase
Parameters:
None -
Returns:
Double pan angle in absolute degrees
Throws:
java.lang.Exception

GetTilt

public java.lang.Double GetTilt()
                         throws java.lang.Exception
GetTilt

Specified by:
GetTilt in interface PanTiltBase
Parameters:
None -
Returns:
Double tilt angle in absolute degrees
Throws:
java.lang.Exception

GetPanTiltPose

public Pose GetPanTiltPose()
                    throws java.lang.Exception
GetPanTiltPose

Specified by:
GetPanTiltPose in interface PanTiltBase
Parameters:
None -
Returns:
Pose pan (Yaw) and tilt (pitch) in absolute degrees
Throws:
java.lang.Exception

CenterPanTilt

public void CenterPanTilt()
                   throws java.lang.Exception
CenterPanTilt

Specified by:
CenterPanTilt in interface PanTiltBase
Parameters:
None -
Throws:
java.lang.Exception

initCamera

protected static int initCamera()

pan

protected static void pan(double direction)

tilt

protected static void tilt(double direction)

zoom

protected static void zoom(double direction)

panRel

protected static void panRel(double direction)

tiltRel

protected static void tiltRel(double direction)

zoomRel

protected static void zoomRel(double direction)

center

protected static void center()

getPan

protected static double getPan()

getTilt

protected static double getTilt()

getZoom

protected static double getZoom()