Fawkes API Fawkes Development Version
|
Sony Evi D100P pan/tilt control. More...
#include <>>
Public Member Functions | |
SonyEviD100PControl (const CameraArgumentParser *cap) | |
Constructor. More... | |
SonyEviD100PControl (const char *tty_port) | |
Constructor. More... | |
virtual | ~SonyEviD100PControl () |
Destructor. More... | |
void | open () |
Open visca device. More... | |
void | close () |
Close Visca device. More... | |
void | process_pantilt () |
Process pan/tilt information. More... | |
bool | supports_pan () |
Check whether this controller supports panning. More... | |
bool | supports_tilt () |
Check whether this controller supports tilting. More... | |
void | set_pan (int pan) |
Set pan value. More... | |
void | set_tilt (int tilt) |
Set tilt value. More... | |
void | set_pan_tilt (int pan, int tilt) |
Set pan and tilt in one go. More... | |
void | set_pan_tilt_rad (float pan, float tilt) |
Set pan and tilt as float value. More... | |
int | pan () |
Get pan value. More... | |
int | tilt () |
Get tilt value. More... | |
void | start_get_pan_tilt () |
Start asynchronous fetch operation for pan and tilt values. More... | |
void | pan_tilt (int &pan, int &tilt) |
Get pan and tilt at the same time. More... | |
void | pan_tilt_rad (float &pan, float &tilt) |
Get pan and tilt at the same time in radiant. More... | |
int | min_pan () |
Get minimum pan value. More... | |
int | max_pan () |
Get maximum pan value. More... | |
int | min_tilt () |
Get minimum tilt value. More... | |
int | max_tilt () |
Get maximum tilt value. More... | |
void | reset_pan_tilt () |
Bring camera into home position. More... | |
void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
Set pan/tilt limits. More... | |
void | reset_pan_tilt_limit () |
Reset pan/tilt limits. More... | |
void | reset_zoom () |
Reset zoom. More... | |
void | set_zoom (unsigned int zoom) |
Set new camera-specific zoom value. More... | |
unsigned int | zoom () |
Get current zoom value. More... | |
unsigned int | zoom_max () |
Maximum zoom value. More... | |
unsigned int | zoom_min () |
Minimum zoom value. More... | |
void | set_zoom_speed_tele (unsigned int speed) |
Set speed in tele range. More... | |
void | set_zoom_speed_wide (unsigned int speed) |
Set speed in wide range. More... | |
void | set_zoom_digital_enabled (bool enabled) |
Set if digital zoom may be used. More... | |
unsigned int | white_balance_mode () |
Get current white balance mode. More... | |
bool | supports_effect (unsigned int effect) |
Check if camera control supports desired effect. More... | |
void | set_effect (unsigned int effect) |
Enable effect. More... | |
unsigned int | effect () |
Current effect. More... | |
void | reset_effect () |
Reset effect. More... | |
![]() | |
virtual | ~CameraControlPanTilt () |
Empty virtual destructor. More... | |
virtual void | process_pantilt ()=0 |
Process pan/tilt information. More... | |
virtual bool | supports_pan ()=0 |
Check whether this controller supports panning. More... | |
virtual bool | supports_tilt ()=0 |
Check whether this controller supports tilting. More... | |
virtual void | set_pan (int pan)=0 |
Set pan value. More... | |
virtual void | set_tilt (int tilt)=0 |
Set tilt value. More... | |
virtual void | set_pan_tilt (int pan, int tilt)=0 |
Set pan and tilt in one go. More... | |
virtual void | set_pan_tilt_rad (float pan, float tilt)=0 |
Set pan and tilt as float value. More... | |
virtual int | pan ()=0 |
Get pan value. More... | |
virtual int | tilt ()=0 |
Get tilt value. More... | |
virtual void | start_get_pan_tilt ()=0 |
Start asynchronous fetch operation for pan and tilt values. More... | |
virtual void | pan_tilt (int &pan, int &tilt)=0 |
Get pan and tilt at the same time. More... | |
virtual void | pan_tilt_rad (float &pan, float &tilt)=0 |
Get pan and tilt at the same time in radiant. More... | |
virtual int | min_pan ()=0 |
Get minimum pan value. More... | |
virtual int | max_pan ()=0 |
Get maximum pan value. More... | |
virtual int | min_tilt ()=0 |
Get minimum tilt value. More... | |
virtual int | max_tilt ()=0 |
Get maximum tilt value. More... | |
virtual void | reset_pan_tilt ()=0 |
Bring camera into home position. More... | |
virtual void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down)=0 |
Set pan/tilt limits. More... | |
virtual void | reset_pan_tilt_limit ()=0 |
Reset pan/tilt limits. More... | |
![]() | |
virtual | ~CameraControl () |
Virtual empty destructor. More... | |
![]() | |
virtual | ~CameraControlZoom () |
Empty virtual destructor. More... | |
virtual void | reset_zoom ()=0 |
Reset zoom. More... | |
virtual void | set_zoom (unsigned int zoom)=0 |
Set new camera-specific zoom value. More... | |
virtual unsigned int | zoom ()=0 |
Get current zoom value. More... | |
virtual unsigned int | zoom_max ()=0 |
Maximum zoom value. More... | |
virtual unsigned int | zoom_min ()=0 |
Minimum zoom value. More... | |
virtual void | set_zoom_speed_tele (unsigned int speed) |
Set speed in tele range. More... | |
virtual void | set_zoom_speed_wide (unsigned int speed) |
Set speed in wide range. More... | |
virtual void | set_zoom_digital_enabled (bool enabled) |
Set if digital zoom may be used. More... | |
![]() | |
virtual | ~CameraControlEffect () |
Empty virtual destructor. More... | |
virtual bool | supports_effect (unsigned int effect)=0 |
Check if camera control supports desired effect. More... | |
virtual void | set_effect (unsigned int effect)=0 |
Enable effect. More... | |
virtual unsigned int | effect ()=0 |
Current effect. More... | |
virtual void | reset_effect ()=0 |
Reset effect. More... | |
Static Public Attributes | |
static const unsigned int | EFFECT_PASTEL = 1 |
Pastel effect. More... | |
static const unsigned int | EFFECT_NEGATIVE = 2 |
Negative effect. More... | |
static const unsigned int | EFFECT_SEPIA = 3 |
Sepia effect. More... | |
static const unsigned int | EFFECT_BW = 4 |
B/W effect. More... | |
static const unsigned int | EFFECT_SOLARIZE = 5 |
Solarize effect. More... | |
static const unsigned int | EFFECT_MOSAIC = 6 |
Mosaic effect. More... | |
static const unsigned int | EFFECT_SLIM = 7 |
Slim effect. More... | |
static const unsigned int | EFFECT_STRETCH = 8 |
Stretch effect. More... | |
static const int | MAX_PAN = 1440 |
Maximum pan. More... | |
static const int | MIN_PAN = -1439 |
Minimum pan. More... | |
static const int | MAX_TILT = 360 |
Max Tilt. More... | |
static const int | MIN_TILT = -359 |
Min tilt . More... | |
static const float | MAX_PAN_DEG = 100.f |
Max pan in degrees. More... | |
static const float | MIN_PAN_DEG = -100.f |
Min pan in degrees. More... | |
static const float | MAX_TILT_DEG = 25.f |
Max tilt in degrees. More... | |
static const float | MIN_TILT_DEG = -25.f |
Min tilt in degrees. More... | |
static const float | MAX_PAN_RAD = deg2rad(MAX_PAN_DEG) |
Max pan in rad. More... | |
static const float | MIN_PAN_RAD = deg2rad(MIN_PAN_DEG) |
Min pan in rad. More... | |
static const float | MAX_TILT_RAD = deg2rad(MAX_TILT_DEG) |
Max tilt in rad. More... | |
static const float | MIN_TILT_RAD = deg2rad(MIN_TILT_DEG) |
Min tilt in rad. More... | |
static const float | PAN_STEPS_PER_DEG = MAX_PAN / MAX_PAN_DEG |
Pan steps per degree. More... | |
static const float | TILT_STEPS_PER_DEG = MAX_TILT / MAX_TILT_DEG |
Tilt steps per degree. More... | |
static const float | PAN_STEPS_PER_RAD = MAX_PAN / MAX_PAN_RAD |
Pan steps per rad. More... | |
static const float | TILT_STEPS_PER_RAD = MAX_TILT / MAX_TILT_RAD |
Tilt steps per rad. More... | |
![]() | |
static const unsigned int | EFFECT_NONE = 0 |
No effect constant. More... | |
Sony Evi D100P pan/tilt control.
Internally uses Visca.
Definition at line 36 of file sony_evid100p.h.
firevision::SonyEviD100PControl::SonyEviD100PControl | ( | const CameraArgumentParser * | cap | ) |
Constructor.
Uses camera argument parser to gather arguments. The ID that the camera argument parser returns is used as the serial port (like /dev/ttyS0).
cap | camera argument parser |
Definition at line 118 of file sony_evid100p.cpp.
References firevision::CameraArgumentParser::cam_id(), firevision::CameraControlEffect::EFFECT_NONE, and open().
firevision::SonyEviD100PControl::SonyEviD100PControl | ( | const char * | tty_port | ) |
Constructor.
tty_port | serial port (e.g. /dev/ttyS0) |
Definition at line 101 of file sony_evid100p.cpp.
References firevision::CameraControlEffect::EFFECT_NONE, and open().
|
virtual |
void firevision::SonyEviD100PControl::close | ( | ) |
Close Visca device.
Definition at line 163 of file sony_evid100p.cpp.
References firevision::ViscaControl::close().
Referenced by ~SonyEviD100PControl().
|
virtual |
Current effect.
Implements firevision::CameraControlEffect.
Definition at line 395 of file sony_evid100p.cpp.
|
virtual |
Get maximum pan value.
Implements firevision::CameraControlPanTilt.
Definition at line 263 of file sony_evid100p.cpp.
References MAX_PAN.
|
virtual |
Get maximum tilt value.
Implements firevision::CameraControlPanTilt.
Definition at line 275 of file sony_evid100p.cpp.
References MAX_TILT.
|
virtual |
Get minimum pan value.
Implements firevision::CameraControlPanTilt.
Definition at line 269 of file sony_evid100p.cpp.
References MIN_PAN.
|
virtual |
Get minimum tilt value.
Implements firevision::CameraControlPanTilt.
Definition at line 281 of file sony_evid100p.cpp.
References MIN_TILT.
void firevision::SonyEviD100PControl::open | ( | ) |
Open visca device.
Definition at line 142 of file sony_evid100p.cpp.
References fawkes::Exception::append(), firevision::ViscaControl::clear(), firevision::ViscaControl::close(), firevision::ViscaControl::open(), and firevision::ViscaControl::set_address().
Referenced by SonyEviD100PControl().
|
virtual |
Get pan value.
Implements firevision::CameraControlPanTilt.
Definition at line 247 of file sony_evid100p.cpp.
References firevision::ViscaControl::getPanTilt(), pan(), and tilt().
Referenced by pan(), pan_tilt(), pan_tilt_rad(), set_pan(), set_pan_tilt(), set_pan_tilt_rad(), and tilt().
|
virtual |
Get pan and tilt at the same time.
This will store the current pan and tilt values in the given arguments.
pan | contains current pan after call |
tilt | contains current tilt after call |
Implements firevision::CameraControlPanTilt.
Definition at line 228 of file sony_evid100p.cpp.
References firevision::ViscaControl::getPanTilt(), pan(), and tilt().
|
virtual |
Get pan and tilt at the same time in radiant.
This will store the current pan and tilt values in the given arguments.
pan | contains current pan after call |
tilt | contains current tilt after call |
Implements firevision::CameraControlPanTilt.
Definition at line 237 of file sony_evid100p.cpp.
References firevision::ViscaControl::getPanTilt(), pan(), PAN_STEPS_PER_RAD, and tilt().
|
virtual |
Process pan/tilt information.
Some operations allow for asynchronous usage (like fetching pan/tilt data). This is because some cameras need some time to retrieve the information and thus it is a good idea to let that run besides the image processing loop. With process_control the incoming information is processed.
Implements firevision::CameraControlPanTilt.
Definition at line 171 of file sony_evid100p.cpp.
References firevision::ViscaControl::process().
|
virtual |
Reset effect.
Disable all effects.
Implements firevision::CameraControlEffect.
Definition at line 401 of file sony_evid100p.cpp.
References firevision::ViscaControl::resetEffect().
|
virtual |
Bring camera into home position.
After the reset the camera shall look forward (horizontally and vertically centered "home" position).
Implements firevision::CameraControlPanTilt.
Definition at line 287 of file sony_evid100p.cpp.
References firevision::ViscaControl::resetPanTilt().
|
virtual |
Reset pan/tilt limits.
This removes all limits from the pan/tilt methods thus the only constraints are hardware induced.
Implements firevision::CameraControlPanTilt.
Definition at line 299 of file sony_evid100p.cpp.
References firevision::ViscaControl::resetPanTiltLimit().
|
virtual |
Reset zoom.
NotImplementedException | Not implemented by this control |
Implements firevision::CameraControlZoom.
Definition at line 305 of file sony_evid100p.cpp.
References firevision::ViscaControl::resetZoom().
|
virtual |
Enable effect.
effect | camera-specific effect. |
Implements firevision::CameraControlEffect.
Definition at line 375 of file sony_evid100p.cpp.
References firevision::ViscaControl::applyEffectBnW(), firevision::ViscaControl::applyEffectMosaic(), firevision::ViscaControl::applyEffectNegArt(), firevision::ViscaControl::applyEffectPastel(), firevision::ViscaControl::applyEffectSepia(), firevision::ViscaControl::applyEffectSlim(), firevision::ViscaControl::applyEffectSolarize(), firevision::ViscaControl::applyEffectStretch(), EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, firevision::CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, EFFECT_STRETCH, and firevision::ViscaControl::resetEffect().
|
virtual |
Set pan value.
The pan value is dependent on the camera control. See the implementations documentation for details.
pan | new pan value |
Implements firevision::CameraControlPanTilt.
Definition at line 189 of file sony_evid100p.cpp.
References pan(), and firevision::ViscaControl::setPanTilt().
|
virtual |
Set pan and tilt in one go.
Sometimes camera controls have a command for setting pan and tilt at the same time. If possible this should be preferred since is minimizes the number of required operations and communication acts. See the implementations documentation for details.
pan | new pan value |
tilt | new tilt value |
Implements firevision::CameraControlPanTilt.
Definition at line 203 of file sony_evid100p.cpp.
References pan(), firevision::ViscaControl::setPanTilt(), and tilt().
Referenced by set_pan_tilt_rad().
|
virtual |
Set pan/tilt limits.
Some camera controls allow for extra constraints to the min and max pan/tilt values.
pan_left | new minimum pan limit |
pan_right | new maximum pan limit |
tilt_up | new minimum tilt limit |
tilt_down | new maximum tilt limit |
Implements firevision::CameraControlPanTilt.
Definition at line 293 of file sony_evid100p.cpp.
References firevision::ViscaControl::setPanTiltLimit().
|
virtual |
Set pan and tilt as float value.
You give a radiant value where the camera should head relative to the basic camera position. Implementations shall look forward (center the camera) for if pan equals zero, look right if the pan is positive and left is the pan is negative, they shall look forward (vertically centered) if tilt is zero, upwards if tilt is negative and downwards if tilt is positive.
pan | new pan value in radiant |
tilt | new tilt value in radiant |
Implements firevision::CameraControlPanTilt.
Definition at line 211 of file sony_evid100p.cpp.
References pan(), PAN_STEPS_PER_RAD, set_pan_tilt(), tilt(), and TILT_STEPS_PER_RAD.
|
virtual |
Set tilt value.
The tilt value is dependent on the camera control. See the implementations documentation for details.
tilt | new tilt value |
Implements firevision::CameraControlPanTilt.
Definition at line 196 of file sony_evid100p.cpp.
References firevision::ViscaControl::setPanTilt(), and tilt().
|
virtual |
Set new camera-specific zoom value.
zoom | zoom value |
Implements firevision::CameraControlZoom.
Definition at line 311 of file sony_evid100p.cpp.
References firevision::ViscaControl::setZoom(), and zoom().
|
virtual |
Set if digital zoom may be used.
enabled | true, to enable digital zoom, false otherwise |
NotImplementedException | Not implemented by this control |
Reimplemented from firevision::CameraControlZoom.
Definition at line 349 of file sony_evid100p.cpp.
References firevision::ViscaControl::setZoomDigitalEnabled().
|
virtual |
Set speed in tele range.
speed | camera-specific speed value |
NotImplementedException | Not implemented by this control |
Reimplemented from firevision::CameraControlZoom.
Definition at line 337 of file sony_evid100p.cpp.
References firevision::ViscaControl::setZoomSpeedTele().
|
virtual |
Set speed in wide range.
speed | camera-specific speed value. |
NotImplementedException | Not implemented by this control |
Reimplemented from firevision::CameraControlZoom.
Definition at line 343 of file sony_evid100p.cpp.
References firevision::ViscaControl::setZoomSpeedWide().
|
virtual |
Start asynchronous fetch operation for pan and tilt values.
This will initiate fetching the pan and tilt values but will not wait until the values have been received but will return immediately (non-blocking).
Implements firevision::CameraControlPanTilt.
Definition at line 222 of file sony_evid100p.cpp.
References firevision::ViscaControl::startGetPanTilt().
|
virtual |
Check if camera control supports desired effect.
Use camera-specific constants.
effect | supported effect |
Implements firevision::CameraControlEffect.
Definition at line 355 of file sony_evid100p.cpp.
References EFFECT_BW, EFFECT_MOSAIC, EFFECT_NEGATIVE, firevision::CameraControlEffect::EFFECT_NONE, EFFECT_PASTEL, EFFECT_SEPIA, EFFECT_SLIM, EFFECT_SOLARIZE, and EFFECT_STRETCH.
|
virtual |
Check whether this controller supports panning.
Implements firevision::CameraControlPanTilt.
Definition at line 177 of file sony_evid100p.cpp.
|
virtual |
Check whether this controller supports tilting.
Implements firevision::CameraControlPanTilt.
Definition at line 183 of file sony_evid100p.cpp.
|
virtual |
Get tilt value.
Implements firevision::CameraControlPanTilt.
Definition at line 255 of file sony_evid100p.cpp.
References firevision::ViscaControl::getPanTilt(), pan(), and tilt().
Referenced by pan(), pan_tilt(), pan_tilt_rad(), set_pan_tilt(), set_pan_tilt_rad(), set_tilt(), and tilt().
unsigned int firevision::SonyEviD100PControl::white_balance_mode | ( | ) |
Get current white balance mode.
Definition at line 410 of file sony_evid100p.cpp.
References firevision::ViscaControl::getWhiteBalanceMode().
|
virtual |
Get current zoom value.
Implements firevision::CameraControlZoom.
Definition at line 317 of file sony_evid100p.cpp.
References firevision::ViscaControl::getZoom(), and zoom().
Referenced by set_zoom(), and zoom().
|
virtual |
Maximum zoom value.
Implements firevision::CameraControlZoom.
Definition at line 331 of file sony_evid100p.cpp.
|
virtual |
Minimum zoom value.
Implements firevision::CameraControlZoom.
Definition at line 325 of file sony_evid100p.cpp.
|
static |
B/W effect.
Definition at line 44 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Mosaic effect.
Definition at line 46 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Negative effect.
Definition at line 42 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Pastel effect.
Definition at line 41 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Sepia effect.
Definition at line 43 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Slim effect.
Definition at line 47 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Solarize effect.
Definition at line 45 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
Stretch effect.
Definition at line 48 of file sony_evid100p.h.
Referenced by set_effect(), and supports_effect().
|
static |
|
static |
Max pan in degrees.
Definition at line 101 of file sony_evid100p.h.
|
static |
Max pan in rad.
Definition at line 106 of file sony_evid100p.h.
|
static |
|
static |
Max tilt in degrees.
Definition at line 103 of file sony_evid100p.h.
|
static |
Max tilt in rad.
Definition at line 108 of file sony_evid100p.h.
|
static |
|
static |
Min pan in degrees.
Definition at line 102 of file sony_evid100p.h.
|
static |
Min pan in rad.
Definition at line 107 of file sony_evid100p.h.
|
static |
|
static |
Min tilt in degrees.
Definition at line 104 of file sony_evid100p.h.
|
static |
Min tilt in rad.
Definition at line 109 of file sony_evid100p.h.
|
static |
Pan steps per degree.
Definition at line 111 of file sony_evid100p.h.
|
static |
Pan steps per rad.
Definition at line 114 of file sony_evid100p.h.
Referenced by pan_tilt_rad(), and set_pan_tilt_rad().
|
static |
Tilt steps per degree.
Definition at line 112 of file sony_evid100p.h.
|
static |
Tilt steps per rad.
Definition at line 115 of file sony_evid100p.h.
Referenced by set_pan_tilt_rad().