latest version v1.9 - last update 10 Apr 2010 |
Access to the Sony Evi D100P camera and pan tilt unit. More...
#include <ltiSonyEviD100P.h>
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 |
sonyEviD100P & | copy (const sonyEviD100P &other) |
sonyEviD100P & | operator= (const sonyEviD100P &other) |
virtual functor * | clone () const |
const parameters & | getParameters () 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 externPoll & | getPoller () |
virtual bool | completeInit () |
virtual bool | pollLensOn () |
virtual bool | pollLensOff () |
virtual bool | pollPanTiltOn () |
virtual bool | pollPanTiltOff () |
Protected Member Functions | |
parameters & | getWritableParameters () |
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 |
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.
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
other | the object to be copied |
virtual lti::sonyEviD100P::~sonyEviD100P | ( | ) | [virtual] |
destructor
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.
virtual bool lti::sonyEviD100P::autoFocusOn | ( | ) | [virtual] |
virtual bool lti::sonyEviD100P::autoGainOn | ( | ) | [virtual] |
virtual bool lti::sonyEviD100P::autoIrisOn | ( | ) | [virtual] |
turn on automatic choice of the iris.
Disables brightness.
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.
Implements lti::camera.
virtual bool lti::sonyEviD100P::autoWhiteBalanceOn | ( | ) | [virtual] |
virtual bool lti::sonyEviD100P::backLightCompensationOff | ( | ) | [virtual] |
Turn off the back light compensation.
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.
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.
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.
other | the functor to be copied |
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.
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.
virtual float lti::sonyEviD100P::getFocus | ( | ) | const [virtual] |
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.
focus | the current focus value | |
zoom | the current zoom value |
Implements lti::camera.
virtual float lti::sonyEviD100P::getPan | ( | ) | const [virtual] |
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.
pan | the pan position which the device is in | |
tilt | the tilt position which the device is in |
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] |
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] |
Implements lti::camera.
virtual bool lti::sonyEviD100P::highAutoFocusSensibilityOn | ( | ) | [virtual] |
Enable the highly sensible auto focus.
virtual bool lti::sonyEviD100P::indoorWhiteBalanceOn | ( | ) | [virtual] |
Fix the white balance to 5800 K.
This is a special auto white balance mode.
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.
virtual bool lti::sonyEviD100P::lowAutoFocusSensibilityOn | ( | ) | [virtual] |
Enable the low sensible auto focus.
virtual bool lti::sonyEviD100P::manualExposureOn | ( | ) | [virtual] |
turn on manual gain, shutter and iris.
Disables brightness.
virtual bool lti::sonyEviD100P::manualFocusOn | ( | ) | [virtual] |
Turn on manual focus.
virtual bool lti::sonyEviD100P::manualWhiteBalanceOn | ( | ) | [virtual] |
turn on manual white balance
virtual bool lti::sonyEviD100P::onePushWhiteBalanceOn | ( | ) | [virtual] |
The red and blue gain values will be determined on call of the method triggerWhiteBalance().
virtual bool lti::sonyEviD100P::onlyAutoGainOn | ( | ) | [virtual] |
turn on automatic gain only.
The shutter and iris will be set manually. Disables brightness.
virtual bool lti::sonyEviD100P::onlyAutoIrisOn | ( | ) | [virtual] |
turn on automatic iris only.
The shutter and gain will be set manually. Disables brightness.
virtual bool lti::sonyEviD100P::onlyAutoShutterOn | ( | ) | [virtual] |
turn on automatic shutter only.
The gain and iris will be set manually. Disables brightness.
sonyEviD100P& lti::sonyEviD100P::operator= | ( | const sonyEviD100P & | other | ) |
virtual bool lti::sonyEviD100P::outdoorWhiteBalanceOn | ( | ) | [virtual] |
Fix the white balance to 3200 K.
This is a special auto white balance mode.
virtual bool lti::sonyEviD100P::pollLensOff | ( | ) | [virtual] |
Turn off polling the lens system.
virtual bool lti::sonyEviD100P::pollLensOn | ( | ) | [virtual] |
Turn on polling the lens system.
virtual bool lti::sonyEviD100P::pollPanTiltOff | ( | ) | [virtual] |
Turn off polling the pan tilt positions.
virtual bool lti::sonyEviD100P::pollPanTiltOn | ( | ) | [virtual] |
Turn on polling the pan tilt positions.
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.
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
virtual bool lti::sonyEviD100P::setBlueGain | ( | float | value | ) | [virtual] |
set the blue gain.
Switched to manual white balance unless the parameters already indicate that state.
value | the blue gain value |
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.
value | the brightness value |
virtual bool lti::sonyEviD100P::setDigitalEffect | ( | parameters::eDigitalEffectType | effect | ) | [virtual] |
set the digital effect, see parameters documentation for details param effect the digital effect
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
virtual bool lti::sonyEviD100P::setExposureCompensation | ( | int | value | ) | [virtual] |
set an offset to the internal reference brightness level
value | the degree of exposure compensation |
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.
speed | the focusing speed |
virtual bool lti::sonyEviD100P::setFocus | ( | float | value | ) | [virtual] |
set the focus.
Turns off autofocus if the parameters indicate that it is on.
value | the focus value |
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.
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.
value | the gain value |
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.
value | the iris setting |
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.
speed | the focusing speed |
virtual bool lti::sonyEviD100P::setPan | ( | float | pan | ) | [virtual] |
set the pan position
pan | the pan position the device will move to |
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.
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 |
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.
pan | the pan position the device will move to | |
tilt | the pan position the device will move to |
Implements lti::panTiltUnit.
virtual bool lti::sonyEviD100P::setParameters | ( | const functor::parameters & | par | ) | [virtual] |
Set the parameters and inform the hardware about changes.
par | the parameters to be used |
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
virtual bool lti::sonyEviD100P::setRedGain | ( | float | value | ) | [virtual] |
set the red gain.
Switched to manual white balance unless the parameters already indicate that state.
value | the red gain value |
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.
value | the shutter speed |
Implements lti::camera.
virtual bool lti::sonyEviD100P::setTeleZoom | ( | int | speed = 7 |
) | [virtual] |
set the zoom to its maximum optical value.
speed | the zooming speed |
virtual bool lti::sonyEviD100P::setTilt | ( | float | tilt | ) | [virtual] |
set the tilt position
tilt | the tilt position the device will move to |
Implements lti::panTiltUnit.
virtual bool lti::sonyEviD100P::setWideZoom | ( | int | speed = 7 |
) | [virtual] |
set the zoom to its minimum value.
speed | the zooming speed |
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.
value | the zoom value |
Implements lti::camera.
virtual bool lti::sonyEviD100P::shutterPriorityOn | ( | ) | [virtual] |
turn automatic gain and iris control.
The shutter will be set manually. Disables brightness.
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.
virtual bool lti::sonyEviD100P::stopPanTilt | ( | ) | [virtual] |
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.
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.
virtual bool lti::sonyEviD100P::triggerWhiteBalance | ( | ) | [virtual] |
bool lti::sonyEviD100P::m_completeInit [protected] |
false if the constructor did not have enough time to init the camera
externPoll lti::sonyEviD100P::m_externPoller [protected] |
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