LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::sonyEviD100P Class Reference

Access to the Sony Evi D100P camera and pan tilt unit. More...

#include <ltiSonyEviD100P.h>

Inheritance diagram for lti::sonyEviD100P:
Inheritance graph
[legend]
Collaboration diagram for lti::sonyEviD100P:
Collaboration graph
[legend]

List of all members.

Classes

class  externPoll
 If an user wants to send inquiries to the device and process the answers explicitly, he may obtain a reference to this class. More...
class  parameters
 the parameters for the class sonyEviD100P More...

Public Member Functions

 sonyEviD100P ()
 sonyEviD100P (const parameters &par)
 sonyEviD100P (const sonyEviD100P &other)
virtual ~sonyEviD100P ()
virtual const char * getTypeName () const
sonyEviD100Pcopy (const sonyEviD100P &other)
sonyEviD100Poperator= (const sonyEviD100P &other)
virtual functorclone () const
const parametersgetParameters () const
virtual bool setParameters (const functor::parameters &par)
virtual bool reset ()
virtual bool stopPanTilt ()
virtual bool setPanTilt (float pan, float tilt)
virtual bool setPanTilt (float pan, float tilt, float panSpeed, float tiltSpeed)
virtual bool setPan (float pan)
virtual bool setTilt (float tilt)
virtual bool getPanTilt (float &pan, float &tilt) const
virtual float getPan () const
virtual float getTilt () const
virtual bool autoExposureOn ()
virtual bool shutterPriorityOn ()
virtual bool manualExposureOn ()
virtual bool irisPriorityOn ()
virtual bool gainPriorityOn ()
virtual bool onlyAutoShutterOn ()
virtual bool onlyAutoGainOn ()
virtual bool onlyAutoIrisOn ()
virtual bool triggerWhiteBalance ()
virtual bool onePushWhiteBalanceOn ()
virtual bool extendedAutoWhiteBalanceOn ()
virtual bool outdoorWhiteBalanceOn ()
virtual bool indoorWhiteBalanceOn ()
virtual bool autoWhiteBalanceOn ()
virtual bool manualWhiteBalanceOn ()
virtual bool autoGainOn ()
virtual bool setGain (float value)
virtual bool setRedGain (float value)
virtual bool setBlueGain (float value)
virtual bool autoShutterSpeedOn ()
virtual bool setShutterSpeed (float value)
virtual bool autoIrisOn ()
virtual bool setIris (parameters::eIrisType value)
virtual bool brightnessOn ()
virtual bool setBrightness (int value)
virtual bool setExposureCompensation (int value)
virtual bool backLightCompensationOn ()
virtual bool backLightCompensationOff ()
virtual bool setAperture (int value)
virtual bool setPictureEffect (parameters::ePictureEffectType effect)
virtual bool setDigitalEffect (parameters::eDigitalEffectType effect)
virtual bool setDigitalEffectLevel (int value)
virtual bool highAutoFocusSensibilityOn ()
virtual bool lowAutoFocusSensibilityOn ()
virtual bool setFocus (float value)
virtual bool setFarFocus (int speed=7)
virtual bool setNearFocus (int speed=7)
virtual bool stopFocus ()
virtual bool setFocusToInfinity ()
virtual bool manualFocusOn ()
virtual bool autoFocusOn ()
virtual bool triggerFocus ()
virtual float getFocus () const
virtual bool stopZoom ()
virtual bool setWideZoom (int speed=7)
virtual bool setTeleZoom (int speed=7)
virtual bool setZoom (float value)
virtual float getZoom () const
virtual bool getLensSetting (float &focus, float &zoom) const
virtual const externPollgetPoller ()
virtual bool completeInit ()
virtual bool pollLensOn ()
virtual bool pollLensOff ()
virtual bool pollPanTiltOn ()
virtual bool pollPanTiltOff ()

Protected Member Functions

parametersgetWritableParameters ()
bool init ()
bool initPosCommand (vector< ubyte > &command, float pan, float tilt, float panSpeed, float tiltSpeed)
int distance2Focus (float &distance) const
float focus2Distance (int focus) const

Protected Attributes

poll * m_poller
externPoll m_externPoller
bool m_completeInit

Static Protected Attributes

static const float m_tiltFactor

Detailed Description

Access to the Sony Evi D100P camera and pan tilt unit.

So far only a single device on the serial port and asynchronous behauvior are supported.

In asynchronous mode a returned true of the set-methods means that the command has been successfully sent to the device. About the proper execution by the device nothing is known at that time. Furthermore the sony protocoll does not tell which commands have been completed successfully or caused an error. It is unclear, if the order of sent commands and received status messages correspond.

If a command is successfully sent to the device, but not executed properly the parameters do not resemble the current status of the device. Therefore all called methods send a command to the device, no matter whether the device should already be in that status or not.


Constructor & Destructor Documentation

lti::sonyEviD100P::sonyEviD100P (  ) 

default constructor

lti::sonyEviD100P::sonyEviD100P ( const parameters par  ) 

Construct a functor using the given parameters.

lti::sonyEviD100P::sonyEviD100P ( const sonyEviD100P other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::sonyEviD100P::~sonyEviD100P (  )  [virtual]

destructor


Member Function Documentation

virtual bool lti::sonyEviD100P::autoExposureOn (  )  [virtual]

turn on automatic exposure (AE) mode.

The iris and gain are set automatically, the shutter speed is fixed to 1/50 s. Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::autoFocusOn (  )  [virtual]

Turn on auto focus.

Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::autoGainOn (  )  [virtual]

turn on automatic gain.

Disables brightness.

Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::autoIrisOn (  )  [virtual]

turn on automatic choice of the iris.

Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::autoShutterSpeedOn (  )  [virtual]

turn on automatic choice of the shutter speed.

The shutter changes automatically depending onf the brightness of the subject. Disables brightness.

Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::autoWhiteBalanceOn (  )  [virtual]

turn on automatic white balance (3000 to 7500 K)

Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::backLightCompensationOff (  )  [virtual]

Turn off the back light compensation.

Returns:
true on success
virtual bool lti::sonyEviD100P::backLightCompensationOn (  )  [virtual]

If the background is too bright or too dark when shooting in automatic exposure mode, back light compensation will make the subject appear clearer.

Returns:
true on success
virtual bool lti::sonyEviD100P::brightnessOn (  )  [virtual]

Turn of the brightness mode.

The bright controll function adjusts both gain and iris depending on the brightness level. It only works if automatic iris and gain are turned on. Otherwise false is returned.

Returns:
true on success
virtual functor* lti::sonyEviD100P::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::camera.

virtual bool lti::sonyEviD100P::completeInit (  )  [virtual]

Check wether the camera was initialized completely on construction.

A complete initialization requires feedback from the hardware. Because this driver only waits a limited amount of time for the feedback, it does not always perform a complete initialization. In this case the hardware still works, but the desired parameters have not been sent to the hardware yet, e.g. the camera might not have the expected zoom. It is up to the user to recall setParameters() after an incomplete initialization.

sonyEviD100P& lti::sonyEviD100P::copy ( const sonyEviD100P other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::camera.

int lti::sonyEviD100P::distance2Focus ( float &  distance  )  const [protected]

Convert focus from distance in m to internal value.

virtual bool lti::sonyEviD100P::extendedAutoWhiteBalanceOn (  )  [virtual]

Extend the auto white balance tracing to 2000 to 10000 K.

This is a special auto white balance mode.

Returns:
true on success
float lti::sonyEviD100P::focus2Distance ( int  focus  )  const [protected]

Convert focus from internal value to distance in m.

virtual bool lti::sonyEviD100P::gainPriorityOn (  )  [virtual]

turn automatic shutter and iris control.

The gain will be set manually. Disables brightness.

Returns:
true on success
virtual float lti::sonyEviD100P::getFocus (  )  const [virtual]
Returns:
the current focus

Implements lti::camera.

virtual bool lti::sonyEviD100P::getLensSetting ( float &  focus,
float &  zoom 
) const [virtual]

Get the focus and zoom values from a single time instant.

Parameters:
focus the current focus value
zoom the current zoom value
Returns:
true on success

Implements lti::camera.

virtual float lti::sonyEviD100P::getPan (  )  const [virtual]
Returns:
the current pan position

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::getPanTilt ( float &  pan,
float &  tilt 
) const [virtual]

get the current pan and tilt position.

The combined get-methods guarantee pan and tilt positions of the same time instant.

Parameters:
pan the pan position which the device is in
tilt the tilt position which the device is in
Returns:
true on success

Implements lti::panTiltUnit.

const parameters& lti::sonyEviD100P::getParameters (  )  const

returns used parameters

Reimplemented from lti::camera.

virtual const externPoll& lti::sonyEviD100P::getPoller (  )  [virtual]

Get a reference to the poller.

This may be usefull if the user wants to send and process inquiries himself. return a reference to the extern poller

virtual float lti::sonyEviD100P::getTilt (  )  const [virtual]
Returns:
the current tilt position

Implements lti::panTiltUnit.

virtual const char* lti::sonyEviD100P::getTypeName (  )  const [virtual]

returns the name of this type ("sonyEviD100P")

Reimplemented from lti::camera.

parameters& lti::sonyEviD100P::getWritableParameters (  )  [protected]

get a pointer to the parameters

virtual float lti::sonyEviD100P::getZoom (  )  const [virtual]
Returns:
the current zoom

Implements lti::camera.

virtual bool lti::sonyEviD100P::highAutoFocusSensibilityOn (  )  [virtual]

Enable the highly sensible auto focus.

Returns:
true on success
virtual bool lti::sonyEviD100P::indoorWhiteBalanceOn (  )  [virtual]

Fix the white balance to 5800 K.

This is a special auto white balance mode.

Returns:
true on success
bool lti::sonyEviD100P::init (  )  [protected]

initialize device

bool lti::sonyEviD100P::initPosCommand ( vector< ubyte > &  command,
float  pan,
float  tilt,
float  panSpeed,
float  tiltSpeed 
) [protected]

initialize Set*Position command string

virtual bool lti::sonyEviD100P::irisPriorityOn (  )  [virtual]

turn automatic shutter and gain control.

The iris will be set manually. Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::lowAutoFocusSensibilityOn (  )  [virtual]

Enable the low sensible auto focus.

Returns:
true on success
virtual bool lti::sonyEviD100P::manualExposureOn (  )  [virtual]

turn on manual gain, shutter and iris.

Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::manualFocusOn (  )  [virtual]

Turn on manual focus.

Returns:
true on success
virtual bool lti::sonyEviD100P::manualWhiteBalanceOn (  )  [virtual]

turn on manual white balance

Returns:
true on success
virtual bool lti::sonyEviD100P::onePushWhiteBalanceOn (  )  [virtual]

The red and blue gain values will be determined on call of the method triggerWhiteBalance().

Returns:
true on success
virtual bool lti::sonyEviD100P::onlyAutoGainOn (  )  [virtual]

turn on automatic gain only.

The shutter and iris will be set manually. Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::onlyAutoIrisOn (  )  [virtual]

turn on automatic iris only.

The shutter and gain will be set manually. Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::onlyAutoShutterOn (  )  [virtual]

turn on automatic shutter only.

The gain and iris will be set manually. Disables brightness.

Returns:
true on success
sonyEviD100P& lti::sonyEviD100P::operator= ( const sonyEviD100P other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::camera.

virtual bool lti::sonyEviD100P::outdoorWhiteBalanceOn (  )  [virtual]

Fix the white balance to 3200 K.

This is a special auto white balance mode.

Returns:
true on success
virtual bool lti::sonyEviD100P::pollLensOff (  )  [virtual]

Turn off polling the lens system.

Returns:
true on success
virtual bool lti::sonyEviD100P::pollLensOn (  )  [virtual]

Turn on polling the lens system.

Returns:
true on success
virtual bool lti::sonyEviD100P::pollPanTiltOff (  )  [virtual]

Turn off polling the pan tilt positions.

Returns:
true on success
virtual bool lti::sonyEviD100P::pollPanTiltOn (  )  [virtual]

Turn on polling the pan tilt positions.

Returns:
true on success
virtual bool lti::sonyEviD100P::reset (  )  [virtual]

Reset the pan tilt device.

This method resets internal pan and tilt registers. Some devices need resets from time to time to avoid accumulation errors. After succesfull execution the pan tilt unit should be in the same position as before the call. During execution the pan tilt unit may move.

Returns:
true on success

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::setAperture ( int  value  )  [virtual]

Aperture controll is a function which adjusts the enhancement of edges of objects in the picture.

Ranges from 0 (no enhancement) to 15. param value the aperture

Returns:
true on success
virtual bool lti::sonyEviD100P::setBlueGain ( float  value  )  [virtual]

set the blue gain.

Switched to manual white balance unless the parameters already indicate that state.

Parameters:
value the blue gain value
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setBrightness ( int  value  )  [virtual]

Set the brightness level.

Enables the brightness mode if its parameter is turned off. Turns on auto white balance and auto iris.

Parameters:
value the brightness value
Returns:
true on success
virtual bool lti::sonyEviD100P::setDigitalEffect ( parameters::eDigitalEffectType  effect  )  [virtual]

set the digital effect, see parameters documentation for details param effect the digital effect

Returns:
true on success
virtual bool lti::sonyEviD100P::setDigitalEffectLevel ( int  value  )  [virtual]

Digital effect level: 00 (flash) to 24 (trail) and 00 (still) t0 32 (lumi).

param value the level of the digital effect

Returns:
true on success
virtual bool lti::sonyEviD100P::setExposureCompensation ( int  value  )  [virtual]

set an offset to the internal reference brightness level

Parameters:
value the degree of exposure compensation
Returns:
true on success
virtual bool lti::sonyEviD100P::setFarFocus ( int  speed = 7  )  [virtual]

Set the focus to its maximum value.

Turns off autofocus if the parameters indicate that it is on.

Parameters:
speed the focusing speed
Returns:
true on success
virtual bool lti::sonyEviD100P::setFocus ( float  value  )  [virtual]

set the focus.

Turns off autofocus if the parameters indicate that it is on.

Parameters:
value the focus value
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setFocusToInfinity (  )  [virtual]

Set the focus to infiniy.

Turns off autofocus if the parameters indicate that it is on.

Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setGain ( float  value  )  [virtual]

set the global gain.

Turns off automatic gain if the according parameter is true.

Parameters:
value the gain value
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setIris ( parameters::eIrisType  value  )  [virtual]

set the iris.

Turns off automatic iris if the according parameter is true.

Parameters:
value the iris setting
Returns:
true on success
virtual bool lti::sonyEviD100P::setNearFocus ( int  speed = 7  )  [virtual]

Set the focus to its minimum value.

Turns off autofocus if the parameters indicate that it is on.

Parameters:
speed the focusing speed
Returns:
true on success
virtual bool lti::sonyEviD100P::setPan ( float  pan  )  [virtual]

set the pan position

Parameters:
pan the pan position the device will move to
Returns:
true on success

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::setPanTilt ( float  pan,
float  tilt,
float  panSpeed,
float  tiltSpeed 
) [virtual]

set the pan and tilt position including pan and tilt speeds.

Parameters:
pan the pan position the device will move to
tilt the pan position the device will move to
panSpeed the speed in pan direction
tiltSpeed the speed in tilt direction
Returns:
true on success
virtual bool lti::sonyEviD100P::setPanTilt ( float  pan,
float  tilt 
) [virtual]

set the pan and tilt position.

Usually pan and tilt are sent to the device in a single package. The pan tilt moves with maximum speed.

Parameters:
pan the pan position the device will move to
tilt the pan position the device will move to
Returns:
true on success

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::setParameters ( const functor::parameters par  )  [virtual]

Set the parameters and inform the hardware about changes.

Parameters:
par the parameters to be used
Returns:
true if successful, false otherwise

Reimplemented from lti::functor.

virtual bool lti::sonyEviD100P::setPictureEffect ( parameters::ePictureEffectType  effect  )  [virtual]

set the picture effect, see parameters documentation for details param effect the picture effect

Returns:
true on success
virtual bool lti::sonyEviD100P::setRedGain ( float  value  )  [virtual]

set the red gain.

Switched to manual white balance unless the parameters already indicate that state.

Parameters:
value the red gain value
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setShutterSpeed ( float  value  )  [virtual]

set the shutter speed.

Turns off automatic shutter if the according parameter is true.

Parameters:
value the shutter speed
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::setTeleZoom ( int  speed = 7  )  [virtual]

set the zoom to its maximum optical value.

Parameters:
speed the zooming speed
Returns:
true on success
virtual bool lti::sonyEviD100P::setTilt ( float  tilt  )  [virtual]

set the tilt position

Parameters:
tilt the tilt position the device will move to
Returns:
true on success

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::setWideZoom ( int  speed = 7  )  [virtual]

set the zoom to its minimum value.

Parameters:
speed the zooming speed
Returns:
true on success
virtual bool lti::sonyEviD100P::setZoom ( float  value  )  [virtual]

set the zoom.

Returns true on success. If the digital zoom is disabled only values up to 10 are allowed. Otherwise a 4 times digital zoom is combined with the 10 times optical zoom resulting in a maximal possible zoom factor of 40.

Parameters:
value the zoom value
Returns:
true on success

Implements lti::camera.

virtual bool lti::sonyEviD100P::shutterPriorityOn (  )  [virtual]

turn automatic gain and iris control.

The shutter will be set manually. Disables brightness.

Returns:
true on success
virtual bool lti::sonyEviD100P::stopFocus (  )  [virtual]

Stop the focus at its current position.

The focus position in the parameter set is not updated, because the actual focus position is unknown yet due to the delay of the inquiries and their answers. Turns off autofocus if the parameters indicate that it is on.

Returns:
true on success
virtual bool lti::sonyEviD100P::stopPanTilt (  )  [virtual]

stop the movement

Returns:
true on success

Implements lti::panTiltUnit.

virtual bool lti::sonyEviD100P::stopZoom (  )  [virtual]

Stop the zoom at its current position.

The zoom position in the parameter set is not updated, because the actual zoom position is unknown yet due to the delay of the inquiries and their answers.

Returns:
true on success
virtual bool lti::sonyEviD100P::triggerFocus (  )  [virtual]

Trigger the focus one push.

Turns off auto focus. The actual focus value is unknown yet and thus the parameter's focus is not updated.

Returns:
true on success
virtual bool lti::sonyEviD100P::triggerWhiteBalance (  )  [virtual]

Trigger the white balance one push, assuming that a white object occupies at least half the image.

The value will be fixed till the next trigger. This is a special manual white balance mode, i.e. the autoWhiteBalance-parameter is false.

Returns:
true on success

Member Data Documentation

false if the constructor did not have enough time to init the camera

the user access to the poller whith limited operations

poll* lti::sonyEviD100P::m_poller [protected]

the poller, which is not static because we may have different serial ports and thus different cameras

const float lti::sonyEviD100P::m_tiltFactor [static, protected]

for conversion between degrees/radiant and sony-format


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:07 2010 for LTI-Lib by Doxygen 1.6.1