DummyCameraControl Class Reference
Plain dummy control. More...
#include <dummy.h>

Public Member Functions | |
| virtual bool | auto_gain () |
| Return whether auto gain is enabled. | |
| virtual void | set_auto_gain (bool enabled) |
| Enable/disable auto gain. | |
| virtual bool | auto_white_balance () |
| Return whether auto white balance is enabled. | |
| virtual void | set_auto_white_balance (bool enabled) |
| Enable/disable auto white balance. | |
| virtual bool | auto_exposure () |
| Return whether auto exposure is enabled. | |
| virtual void | set_auto_exposure (bool enabled) |
| Enable/disable auto exposure. | |
| virtual int | red_balance () |
| Get current red balance. | |
| virtual void | set_red_balance (int red_balance) |
| Set red balance. | |
| virtual int | blue_balance () |
| Get current blue balance. | |
| virtual void | set_blue_balance (int blue_balance) |
| Set blue balance. | |
| virtual int | u_balance () |
| Get current u balance. | |
| virtual void | set_u_balance (int u_balance) |
| Set u balance. | |
| virtual int | v_balance () |
| Get current v balance. | |
| virtual void | set_v_balance (int v_balance) |
| Set v balance. | |
| virtual unsigned int | brightness () |
| Get current brightness. | |
| virtual void | set_brightness (unsigned int brightness) |
| Set new brightness. | |
| virtual unsigned int | contrast () |
| Get current contrast. | |
| virtual void | set_contrast (unsigned int contrast) |
| Set new contrast. | |
| virtual unsigned int | saturation () |
| Get current saturation. | |
| virtual void | set_saturation (unsigned int saturation) |
| Set new saturation. | |
| virtual int | hue () |
| Get current hue. | |
| virtual void | set_hue (int hue) |
| Set new hue. | |
| virtual unsigned int | exposure () |
| Get current exposure. | |
| virtual void | set_exposure (unsigned int exposure) |
| Set new exposure. | |
| virtual unsigned int | gain () |
| Get current gain. | |
| virtual void | set_gain (unsigned int gain) |
| Set new gain. | |
| virtual const char * | format () |
| Get the image format the camera currently uses. | |
| virtual void | set_format (const char *format) |
| Set the image format the camera should use. | |
| virtual unsigned int | width () |
| Get the current width of the image. | |
| virtual unsigned int | height () |
| Get the current height of the image. | |
| virtual void | size (unsigned int &width, unsigned int &height) |
| Get the current image size. | |
| virtual void | set_size (unsigned int width, unsigned int height) |
| Set the image size the camera should use. | |
| virtual bool | horiz_mirror () |
| Return whether the camera image is horizontally mirrored. | |
| virtual bool | vert_mirror () |
| Return whether the camera image is vertically mirrored. | |
| virtual void | mirror (bool &horiz, bool &vert) |
| Get information about current camera image mirroring. | |
| virtual void | set_horiz_mirror (bool enabled) |
| Set whether the camera should mirror images horizontally. | |
| virtual void | set_vert_mirror (bool enabled) |
| Set whether the camera should mirror images vertically. | |
| virtual void | set_mirror (bool horiz, bool vert) |
| Set whether the camera should mirror images. | |
| virtual unsigned int | fps () |
| Get the number of frames per second the camera tries to deliver. | |
| virtual void | set_fps (unsigned int fps) |
| Set the number of frames per second the camera tries to deliver. | |
| virtual unsigned int | lens_x_corr () |
| Get current lens x correction. | |
| virtual unsigned int | lens_y_corr () |
| Get current lens y correction. | |
| virtual void | lens_corr (unsigned int &x_corr, unsigned int &y_corr) |
| Get current lens correction. | |
| virtual void | set_lens_x_corr (unsigned int x_corr) |
| Set lens x correction. | |
| virtual void | set_lens_y_corr (unsigned int y_corr) |
| Set lens y correction. | |
| virtual void | set_lens_corr (unsigned int x_corr, unsigned int y_corr) |
| Set lens correction. | |
| virtual void | process_pantilt () |
| Process pan/tilt information. | |
| virtual bool | supports_pan () |
| Check whether this controller supports panning. | |
| virtual bool | supports_tilt () |
| Check whether this controller supports tilting. | |
| virtual void | set_pan (int pan) |
| Set pan value. | |
| virtual void | set_tilt (int tilt) |
| Set tilt value. | |
| virtual void | set_pan_tilt (int pan, int tilt) |
| Set pan and tilt in one go. | |
| virtual void | set_pan_tilt_rad (float pan, float tilt) |
| Set pan and tilt as float value. | |
| virtual int | pan () |
| Get pan value. | |
| virtual int | tilt () |
| Get tilt value. | |
| virtual void | start_get_pan_tilt () |
| Start asynchronous fetch operation for pan and tilt values. | |
| virtual void | pan_tilt (int &pan, int &tilt) |
| Get pan and tilt at the same time. | |
| virtual void | pan_tilt_rad (float &pan, float &tilt) |
| Get pan and tilt at the same time in radiant. | |
| virtual int | min_pan () |
| Get minimum pan value. | |
| virtual int | max_pan () |
| Get maximum pan value. | |
| virtual int | min_tilt () |
| Get minimum tilt value. | |
| virtual int | max_tilt () |
| Get maximum tilt value. | |
| virtual void | reset_pan_tilt () |
| Bring camera into home position. | |
| virtual void | set_pan_tilt_limit (int pan_left, int pan_right, int tilt_up, int tilt_down) |
| Set pan/tilt limits. | |
| virtual void | reset_pan_tilt_limit () |
| Reset pan/tilt limits. | |
| virtual void | reset_zoom () |
| Reset zoom. | |
| virtual void | set_zoom (unsigned int zoom) |
| Set new camera-specific zoom value. | |
| virtual unsigned int | zoom () |
| Get current zoom value. | |
| virtual unsigned int | zoom_max () |
| Maximum zoom value. | |
| virtual unsigned int | zoom_min () |
| Minimum zoom value. | |
| virtual void | set_zoom_speed_tele (unsigned int speed) |
| Set speed in tele range. | |
| virtual void | set_zoom_speed_wide (unsigned int speed) |
| Set speed in wide range. | |
| virtual void | set_zoom_digital_enabled (bool enabled) |
| Set if digital zoom may be used. | |
| virtual bool | supports_effect (unsigned int effect) |
| Check if camera control supports desired effect. | |
| virtual void | set_effect (unsigned int effect) |
| Enable effect. | |
| virtual unsigned int | effect () |
| Current effect. | |
| virtual void | reset_effect () |
| Reset effect. | |
| virtual bool | auto_focus () |
| Check if auto focus is enabled. | |
| virtual void | set_auto_focus (bool enabled) |
| Enable or disable auto focus. | |
| virtual unsigned int | focus () |
| Get current focus value. | |
| virtual void | set_focus (unsigned int focus) |
| Set new focus value. | |
| virtual unsigned int | focus_min () |
| Get minimum focus value. | |
| virtual unsigned int | focus_max () |
| Get maximum focus value. | |
Detailed Description
Plain dummy control.Dummy camera control.
Does nothing, supports nothing. Use to avoid unecessary NULL checks
This control supports every control type, but the operations are NOOPs. This is useful to instantiate the dummy control to avoid NULL checks.
Definition at line 39 of file dummy.h.
Member Function Documentation
| bool DummyCameraControl::auto_exposure | ( | ) | [virtual] |
Return whether auto exposure is enabled.
- Returns:
- true if auto exposure is enabled
Implements CameraControlColor.
| bool DummyCameraControl::auto_focus | ( | ) | [virtual] |
Check if auto focus is enabled.
- Returns:
- true, if the camera is in auto focus mode, false otherwise
- Exceptions:
-
NotImplementedException Not implemented by this control
Implements CameraControlFocus.
| bool DummyCameraControl::auto_gain | ( | ) | [virtual] |
Return whether auto gain is enabled.
- Returns:
- true if auto gain is enabled
Implements CameraControlColor.
| bool DummyCameraControl::auto_white_balance | ( | ) | [virtual] |
Return whether auto white balance is enabled.
- Returns:
- true if auto white balance is enabled
Implements CameraControlColor.
| int DummyCameraControl::blue_balance | ( | ) | [virtual] |
| unsigned int DummyCameraControl::brightness | ( | ) | [virtual] |
| unsigned int DummyCameraControl::contrast | ( | ) | [virtual] |
| unsigned int DummyCameraControl::effect | ( | ) | [virtual] |
Current effect.
- Returns:
- current effect.
Implements CameraControlEffect.
Definition at line 382 of file dummy.cpp.
References CameraControlEffect::EFFECT_NONE.
| unsigned int DummyCameraControl::exposure | ( | ) | [virtual] |
| unsigned int DummyCameraControl::focus | ( | ) | [virtual] |
| unsigned int DummyCameraControl::focus_max | ( | ) | [virtual] |
| unsigned int DummyCameraControl::focus_min | ( | ) | [virtual] |
| const char * DummyCameraControl::format | ( | ) | [virtual] |
Get the image format the camera currently uses.
Check implementation documentation for details on the format.
- Returns:
- a string describing the image format
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| unsigned int DummyCameraControl::fps | ( | ) | [virtual] |
Get the number of frames per second the camera tries to deliver.
- Returns:
- the current fps
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| unsigned int DummyCameraControl::gain | ( | ) | [virtual] |
| unsigned int DummyCameraControl::height | ( | ) | [virtual] |
| bool DummyCameraControl::horiz_mirror | ( | ) | [virtual] |
Return whether the camera image is horizontally mirrored.
- Returns:
- true if the image is horizontally mirrored
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| int DummyCameraControl::hue | ( | ) | [virtual] |
| void DummyCameraControl::lens_corr | ( | unsigned int & | x_corr, | |
| unsigned int & | y_corr | |||
| ) | [virtual] |
Get current lens correction.
- Parameters:
-
[out] x_corr where the current lens x correction will be stored [out] y_corr where the current lens y correction will be stored
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| unsigned int DummyCameraControl::lens_x_corr | ( | ) | [virtual] |
Get current lens x correction.
- Returns:
- current lens x correction
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| unsigned int DummyCameraControl::lens_y_corr | ( | ) | [virtual] |
Get current lens y correction.
- Returns:
- current lens y correction
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| int DummyCameraControl::max_pan | ( | ) | [virtual] |
| int DummyCameraControl::max_tilt | ( | ) | [virtual] |
| int DummyCameraControl::min_pan | ( | ) | [virtual] |
| int DummyCameraControl::min_tilt | ( | ) | [virtual] |
| void DummyCameraControl::mirror | ( | bool & | horiz, | |
| bool & | vert | |||
| ) | [virtual] |
Get information about current camera image mirroring.
- Parameters:
-
[out] horiz upon return contains flag if horizontal mirroring is enabled [out] vert upon return contains flag if vertical mirroring is enabled
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| int DummyCameraControl::pan | ( | ) | [virtual] |
| void DummyCameraControl::pan_tilt | ( | int & | pan, | |
| int & | tilt | |||
| ) | [virtual] |
Get pan and tilt at the same time.
This will store the current pan and tilt values in the given arguments.
- Parameters:
-
pan contains current pan after call tilt contains current tilt after call
Implements CameraControlPanTilt.
| void DummyCameraControl::pan_tilt_rad | ( | float & | pan, | |
| float & | 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.
- Parameters:
-
pan contains current pan after call tilt contains current tilt after call
- See also:
- set_pan_tilt_rad()
Implements CameraControlPanTilt.
| void DummyCameraControl::process_pantilt | ( | ) | [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 CameraControlPanTilt.
| int DummyCameraControl::red_balance | ( | ) | [virtual] |
| void DummyCameraControl::reset_effect | ( | ) | [virtual] |
| void DummyCameraControl::reset_pan_tilt | ( | ) | [virtual] |
Bring camera into home position.
After the reset the camera shall look forward (horizontally and vertically centered "home" position).
Implements CameraControlPanTilt.
| void DummyCameraControl::reset_pan_tilt_limit | ( | ) | [virtual] |
Reset pan/tilt limits.
This removes all limits from the pan/tilt methods thus the only constraints are hardware induced.
Implements CameraControlPanTilt.
| void DummyCameraControl::reset_zoom | ( | ) | [virtual] |
Reset zoom.
- Exceptions:
-
NotImplementedException Not implemented by this control
Implements CameraControlZoom.
| unsigned int DummyCameraControl::saturation | ( | ) | [virtual] |
| void DummyCameraControl::set_auto_exposure | ( | bool | enabled | ) | [virtual] |
Enable/disable auto exposure.
- Parameters:
-
enabled whether auto exposure should be enabled
Implements CameraControlColor.
| void DummyCameraControl::set_auto_focus | ( | bool | enabled | ) | [virtual] |
Enable or disable auto focus.
- Parameters:
-
enabled if true, enable auto focus, otherwise disable
- Exceptions:
-
NotImplementedException Not implemented by this control
Implements CameraControlFocus.
| void DummyCameraControl::set_auto_gain | ( | bool | enabled | ) | [virtual] |
Enable/disable auto gain.
- Parameters:
-
enabled whether auto gain should be enabled
Implements CameraControlColor.
| void DummyCameraControl::set_auto_white_balance | ( | bool | enabled | ) | [virtual] |
Enable/disable auto white balance.
- Parameters:
-
enabled whether auto white balance should be enabled
Implements CameraControlColor.
| void DummyCameraControl::set_blue_balance | ( | int | blue_balance | ) | [virtual] |
| void DummyCameraControl::set_brightness | ( | unsigned int | brightness | ) | [virtual] |
| void DummyCameraControl::set_contrast | ( | unsigned int | contrast | ) | [virtual] |
| void DummyCameraControl::set_effect | ( | unsigned int | effect | ) | [virtual] |
| void DummyCameraControl::set_exposure | ( | unsigned int | exposure | ) | [virtual] |
| void DummyCameraControl::set_focus | ( | unsigned int | focus | ) | [virtual] |
| void DummyCameraControl::set_format | ( | const char * | format | ) | [virtual] |
Set the image format the camera should use.
Check implementation documentation for details on the format.
- Parameters:
-
format the new image format
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_fps | ( | unsigned int | fps | ) | [virtual] |
Set the number of frames per second the camera tries to deliver.
- Parameters:
-
fps the new fps
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_gain | ( | unsigned int | gain | ) | [virtual] |
| void DummyCameraControl::set_horiz_mirror | ( | bool | enabled | ) | [virtual] |
Set whether the camera should mirror images horizontally.
- Parameters:
-
enabled if true, images should be mirrored horizontally
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_hue | ( | int | hue | ) | [virtual] |
| void DummyCameraControl::set_lens_corr | ( | unsigned int | x_corr, | |
| unsigned int | y_corr | |||
| ) | [virtual] |
Set lens correction.
- Parameters:
-
x_corr new lens x correction y_corr new lens y correction
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_lens_x_corr | ( | unsigned int | x_corr | ) | [virtual] |
Set lens x correction.
- Parameters:
-
x_corr new lens x correction
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_lens_y_corr | ( | unsigned int | y_corr | ) | [virtual] |
Set lens y correction.
- Parameters:
-
y_corr new lens y correction
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_mirror | ( | bool | horiz, | |
| bool | vert | |||
| ) | [virtual] |
Set whether the camera should mirror images.
- Parameters:
-
horiz true to mirror images horizontally, false to disable mirroring vert true to mirror images vertically, false to disable mirroring
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_pan | ( | int | pan | ) | [virtual] |
Set pan value.
The pan value is dependent on the camera control. See the implementations documentation for details.
- Parameters:
-
pan new pan value
Implements CameraControlPanTilt.
| void DummyCameraControl::set_pan_tilt | ( | int | pan, | |
| int | tilt | |||
| ) | [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.
- Parameters:
-
pan new pan value tilt new tilt value
Implements CameraControlPanTilt.
| void DummyCameraControl::set_pan_tilt_limit | ( | int | pan_left, | |
| int | pan_right, | |||
| int | tilt_up, | |||
| int | tilt_down | |||
| ) | [virtual] |
Set pan/tilt limits.
Some camera controls allow for extra constraints to the min and max pan/tilt values.
- Parameters:
-
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 CameraControlPanTilt.
| void DummyCameraControl::set_pan_tilt_rad | ( | float | pan, | |
| float | tilt | |||
| ) | [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.
- Parameters:
-
pan new pan value in radiant tilt new tilt value in radiant
Implements CameraControlPanTilt.
| void DummyCameraControl::set_red_balance | ( | int | red_balance | ) | [virtual] |
| void DummyCameraControl::set_saturation | ( | unsigned int | saturation | ) | [virtual] |
| void DummyCameraControl::set_size | ( | unsigned int | width, | |
| unsigned int | height | |||
| ) | [virtual] |
Set the image size the camera should use.
- Parameters:
-
width new width of the image height new height of the image
- Exceptions:
-
Exception thrown for instance if size setting at run-time is not supported
Implements CameraControlImage.
| void DummyCameraControl::set_tilt | ( | int | tilt | ) | [virtual] |
Set tilt value.
The tilt value is dependent on the camera control. See the implementations documentation for details.
- Parameters:
-
tilt new tilt value
Implements CameraControlPanTilt.
| void DummyCameraControl::set_u_balance | ( | int | u_balance | ) | [virtual] |
| void DummyCameraControl::set_v_balance | ( | int | v_balance | ) | [virtual] |
| void DummyCameraControl::set_vert_mirror | ( | bool | enabled | ) | [virtual] |
Set whether the camera should mirror images vertically.
- Parameters:
-
enabled if true, images should be mirrored vertically
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| void DummyCameraControl::set_zoom | ( | unsigned int | zoom | ) | [virtual] |
| void DummyCameraControl::set_zoom_digital_enabled | ( | bool | enabled | ) | [virtual] |
Set if digital zoom may be used.
- Parameters:
-
enabled true, to enable digital zoom, false otherwise
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
| void DummyCameraControl::set_zoom_speed_tele | ( | unsigned int | speed | ) | [virtual] |
Set speed in tele range.
- Parameters:
-
speed camera-specific speed value
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
| void DummyCameraControl::set_zoom_speed_wide | ( | unsigned int | speed | ) | [virtual] |
Set speed in wide range.
- Parameters:
-
speed camera-specific speed value.
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlZoom.
| void DummyCameraControl::size | ( | unsigned int & | width, | |
| unsigned int & | height | |||
| ) | [virtual] |
Get the current image size.
- Parameters:
-
[out] width upon return contains the width of the image [out] height upon return contains the height of the image
Reimplemented from CameraControlImage.
| void DummyCameraControl::start_get_pan_tilt | ( | ) | [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 CameraControlPanTilt.
| bool DummyCameraControl::supports_effect | ( | unsigned int | effect | ) | [virtual] |
Check if camera control supports desired effect.
Use camera-specific constants.
- Parameters:
-
effect supported effect
- Returns:
- true, if effect is supported, false otherwise
Implements CameraControlEffect.
| bool DummyCameraControl::supports_pan | ( | ) | [virtual] |
Check whether this controller supports panning.
- Returns:
- true if panning is supported
Implements CameraControlPanTilt.
| bool DummyCameraControl::supports_tilt | ( | ) | [virtual] |
Check whether this controller supports tilting.
- Returns:
- true if tilting is supported
Implements CameraControlPanTilt.
| int DummyCameraControl::tilt | ( | ) | [virtual] |
| int DummyCameraControl::u_balance | ( | ) | [virtual] |
| int DummyCameraControl::v_balance | ( | ) | [virtual] |
| bool DummyCameraControl::vert_mirror | ( | ) | [virtual] |
Return whether the camera image is vertically mirrored.
- Returns:
- true if the image is vertically mirrored
- Exceptions:
-
NotImplementedException Not implemented by this control
Reimplemented from CameraControlImage.
| unsigned int DummyCameraControl::width | ( | ) | [virtual] |
| unsigned int DummyCameraControl::zoom | ( | ) | [virtual] |
| unsigned int DummyCameraControl::zoom_max | ( | ) | [virtual] |
| unsigned int DummyCameraControl::zoom_min | ( | ) | [virtual] |
The documentation for this class was generated from the following files:

