RobWorkProject
24.12.4-
|
The Camera class defines a generel interface to a camera. A great deal of the interface resembles the DCAM standard since DCAM allready defines a very wide interface. More...
#include <CameraFirewire.hpp>
Inherits Camera.
Public Types | |
enum | CameraFeature { SHUTTER , ZOOM , GAIN , FOCUS , IRIS , HUE , WHITEBALANCE , SHARPNESS , SATURATION , GAMMA , BRIGHTNESS , AUTOEXPOSURE } |
Optional features of a camera. | |
enum | ColorCode { MONO8 , YUV411 , YUV422 , YUV444 , RGB8 , MONO16 , RGB16 , MONO16S , RGB16S , RAW8 , RAW16 , RGB24 } |
Optional colormodes available when capturing. | |
enum | CapturePolicy { SINGLE_SHOT , CONTINUES , CONTINUES_BUFFERED } |
defines how images are captured. When the SINGLE_SHOT CapturePolicy is used the user has to trigger the camera through acquire. When CONTINUES is used images are captured according to the given frameRate and getImage is more efficient to use. The image returned is allways the newest captured image. When using CONTINUES_BUFFERED images are continuesly captured and put in a buffer. | |
enum | CaptureMode { M160x120 , M320x240 , M640x480 , M800x600 , M1024x768 , M1280x960 , M1600x1200 , MFORMAT7 } |
The resolution of the camera capture. | |
enum | Format7Mode { F7MODE0 , F7MODE1 , F7MODE2 , F7MODE3 , F7MODE4 , F7MODE5 , F7MODE6 , F7MODE7 } |
The resolution of the camera capture. | |
enum | TriggerMode { MODE0 , MODE1 , MODE2 , MODE3 , MODE4 , MODE5 , MODE14 , MODE15 } |
Modes of the camera, inspired by the DCAM standard modes. | |
enum | ErrorCode { SUCCES , FAILURE , NOT_INITIALIZED , NOT_STARTED , UNSUPPORTED_CAPTURE_MODE , UNSUPPORTED_FEATURE } |
error codes for a camera | |
Public Types inherited from Camera | |
typedef rw::core::Ptr< Camera > | Ptr |
smart pointer type to this class | |
Public Types inherited from Sensor | |
typedef rw::core::Ptr< Sensor > | Ptr |
smart pointer type | |
Public Member Functions | |
virtual | ~CameraFirewire () |
destructor | |
virtual CaptureMode | getCaptureMode ()=0 |
returns the CaptureMode of this camera More... | |
virtual bool | setCaptureMode (CaptureMode mode)=0 |
sets the CaptureMode of this camera. More... | |
virtual ColorCode | getColorMode ()=0 |
returns the CaptureMode of this camera More... | |
virtual bool | setColorMode (ColorCode mode)=0 |
sets the CaptureMode of this camera. More... | |
virtual ErrorCode | getError () |
returns the errorcode of the latest error. If no error has occured then SUCCES is returned. More... | |
virtual bool | isError () |
tests whether this camera is in an error state. More... | |
virtual CapturePolicy | getCapturePolicy ()=0 |
returns the capture policy of this camera. More... | |
virtual bool | setCapturePolicy (CapturePolicy policy) |
sets the capture policy of this camera More... | |
virtual bool | isFeatureAvailable (CameraFeature option) |
returns whether the specified camera option is supported by the camera. More... | |
virtual double | getFeature (CameraFeature setting) |
returns the value of the specified camera setting. If the camera is not initialized or the setting is unsupported -1 is returned. More... | |
virtual bool | setFeature (CameraFeature setting, double value) |
sets the value of the specified camera setting. If the camera is not initialized or the setting is unsupported false is returned. More... | |
Public Member Functions inherited from Camera | |
virtual | ~Camera () |
destructor | |
virtual std::string | getModelInfo () const |
returns the camera model information (version, type, size, etc.) More... | |
virtual bool | initialize ()=0 |
initializes the camera to the current settings (CaptureMode,ColorMode,etc.) More... | |
bool | isInitialized () const |
returns whether this camera is initialized or not. More... | |
virtual bool | start ()=0 |
starts this camera, if the camera has not been initialized the initialize function will be called. More... | |
bool | isStarted () const |
returns whether this camera is started or not. More... | |
virtual void | stop ()=0 |
stops this camera. When the camera is stopped it can be reinitialized using initialize() | |
virtual void | acquire ()=0 |
aquires an image from the camera. This method is not blocking. Use isImageReady to poll for completion of acquire. | |
virtual bool | isImageReady ()=0 |
tests whether a image has been acquired More... | |
virtual const Image * | getImage ()=0 |
returns the last image acquired from the camera. This method is not blocking, if no image has been acquired yet an empty image is returned. The image returned can for some specific drivers be read only. More... | |
virtual double | getFrameRate ()=0 |
returns the framerate that this camera is setup with More... | |
virtual void | setFrameRate (double framerate)=0 |
sets the framerate of this camera. If the framerate is not supported the closest supported framerate is choosen. More... | |
virtual unsigned int | getWidth ()=0 |
get width of the captured images More... | |
virtual unsigned int | getHeight ()=0 |
get width of the captured images More... | |
virtual bool | addListener (CameraListener &listener) |
adds a CameraListener to this camera More... | |
virtual bool | removeListener (CameraListener &listener) |
removes a CameraListener from this cameras listener list. More... | |
virtual bool | isShutterAvailable () const |
virtual double | getShutter () const |
virtual void | setShutter (double Value) |
virtual std::pair< double, double > | getShutterBounds () const |
virtual bool | isGainAvailable () const |
virtual double | getGain () const |
virtual double | setGain (double Value) |
Public Member Functions inherited from Sensor | |
virtual | ~Sensor () |
destructor | |
const std::string & | getName () const |
returns the name of this sensor More... | |
const std::string & | getDescription () const |
returns a description of this sensor More... | |
rw::core::Ptr< rw::sensor::SensorModel > | getSensorModel () const |
The frame to which the sensor is attached. More... | |
virtual void | setSensorModel (rw::core::Ptr< rw::sensor::SensorModel > smodel) |
Sets the frame to which the sensor should be attached. More... | |
rw::core::PropertyMap & | getPropertyMap () |
gets the propertymap of this sensor | |
const rw::core::PropertyMap & | getPropertyMap () const |
gets the propertymap of this sensor | |
Protected Member Functions | |
CameraFirewire (const std::string &name, const std::string &modelInfo) | |
constructor More... | |
Protected Member Functions inherited from Camera | |
Camera (const std::string &name, const std::string &modelInfo) | |
constructor More... | |
void | setModelInfo (const std::string info) |
sets the camera model information More... | |
Protected Member Functions inherited from Sensor | |
Sensor (const std::string &name) | |
constructor More... | |
Sensor (const std::string &name, const std::string &description) | |
constructor More... | |
void | setName (const std::string &name) |
sets the name of this sensor More... | |
void | setDescription (const std::string &description) |
sets the description of this sensor More... | |
Additional Inherited Members | |
Protected Attributes inherited from Camera | |
std::vector< CameraListener * > | _listeners |
the list of CameraListeners | |
std::string | _modelInfo |
name of camera model information | |
bool | _initialized |
state variable - true if camera is initialized | |
bool | _started |
state variable - true if camera is started | |
The Camera class defines a generel interface to a camera. A great deal of the interface resembles the DCAM standard since DCAM allready defines a very wide interface.
typical usage: Camera c; // setup camera features modes and so on c.initialize(); c.start(); // acquire images c.stop();
|
protected |
constructor
name | [in] name of sensor |
modelInfo | [in] info string |
|
pure virtual |
returns the CaptureMode of this camera
|
pure virtual |
returns the capture policy of this camera.
|
pure virtual |
returns the CaptureMode of this camera
|
inlinevirtual |
returns the errorcode of the latest error. If no error has occured then SUCCES is returned.
|
inlinevirtual |
returns the value of the specified camera setting. If the camera is not initialized or the setting is unsupported -1 is returned.
setting | [in] the CameraFeature |
|
inlinevirtual |
tests whether this camera is in an error state.
|
inlinevirtual |
returns whether the specified camera option is supported by the camera.
option | [in] the specific CameraOption |
|
pure virtual |
sets the CaptureMode of this camera.
mode | [in] the wanted capture mode |
|
inlinevirtual |
sets the capture policy of this camera
policy | [in] the capture policy |
|
pure virtual |
sets the CaptureMode of this camera.
mode | [in] the wanted capture mode |
|
inlinevirtual |
sets the value of the specified camera setting. If the camera is not initialized or the setting is unsupported false is returned.
setting | [in] the CameraFeature |
value | [in] the value of the feature |