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 <Camera.hpp>
Inherits Sensor.
Inherited by CameraFirewire.
|
| Camera (const std::string &name, const std::string &modelInfo) |
| constructor More...
|
|
void | setModelInfo (const std::string info) |
| sets the camera model information More...
|
|
| 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...
|
|
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();
◆ Camera()
Camera |
( |
const std::string & |
name, |
|
|
const std::string & |
modelInfo |
|
) |
| |
|
protected |
constructor
- Parameters
-
name | [in] name of sensor |
modelInfo | [in] info string |
◆ addListener()
adds a CameraListener to this camera
- Parameters
-
- Returns
- true if listener was added succesfully, false otherwise
◆ getFrameRate()
virtual double getFrameRate |
( |
| ) |
|
|
pure virtual |
returns the framerate that this camera is setup with
- Returns
- the framerate in frames per second
◆ getGain()
virtual double getGain |
( |
| ) |
const |
|
inlinevirtual |
Get actual gain value. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.
- Returns
- Gain value.
◆ getHeight()
virtual unsigned int getHeight |
( |
| ) |
|
|
pure virtual |
get width of the captured images
- Returns
- width
◆ getImage()
virtual const Image* getImage |
( |
| ) |
|
|
pure virtual |
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.
- Returns
- last image captured from camera.
◆ getModelInfo()
virtual std::string getModelInfo |
( |
| ) |
const |
|
inlinevirtual |
returns the camera model information (version, type, size, etc.)
- Returns
- camera model information
◆ getShutter()
virtual double getShutter |
( |
| ) |
const |
|
inlinevirtual |
Get actual shutter value. Note: If shutter is not available then a dummy implementation will throw an error message.
- Returns
- shutter value in micro-seconds.
◆ getShutterBounds()
virtual std::pair<double, double> getShutterBounds |
( |
| ) |
const |
|
inlinevirtual |
gets the shutter bounds. Note: If shutter is not available then a dummy implementation will throw an error message.
- Returns
- first value is the min bound and second value is the max bound
◆ getWidth()
virtual unsigned int getWidth |
( |
| ) |
|
|
pure virtual |
get width of the captured images
- Returns
- width
◆ initialize()
virtual bool initialize |
( |
| ) |
|
|
pure virtual |
initializes the camera to the current settings (CaptureMode,ColorMode,etc.)
- Returns
- true if initialization is succesfully, false otherwise.
◆ isGainAvailable()
virtual bool isGainAvailable |
( |
| ) |
const |
|
inlinevirtual |
Check if gain is available.
- Returns
- True if zoom is available
◆ isImageReady()
virtual bool isImageReady |
( |
| ) |
|
|
pure virtual |
tests whether a image has been acquired
- Returns
- true if an image has been acquired, false otherwise.
◆ isInitialized()
bool isInitialized |
( |
| ) |
const |
|
inline |
returns whether this camera is initialized or not.
- Returns
- true if intialized, false otherwise
◆ isShutterAvailable()
virtual bool isShutterAvailable |
( |
| ) |
const |
|
inlinevirtual |
Check if shutter is available.
- Returns
- True if shutter is available
◆ isStarted()
returns whether this camera is started or not.
- Returns
- true if started, false otherwise
◆ removeListener()
removes a CameraListener from this cameras listener list.
- Parameters
-
listener | [in] the listener that is to be removed |
- Returns
- true if listener was removed succesfully, false otherwise.
◆ setFrameRate()
virtual void setFrameRate |
( |
double |
framerate | ) |
|
|
pure virtual |
sets the framerate of this camera. If the framerate is not supported the closest supported framerate is choosen.
- Parameters
-
framerate | [in] the framerate |
◆ setGain()
virtual double setGain |
( |
double |
Value | ) |
|
|
inlinevirtual |
Set gain value. If the given value is not possible the nearest value are choosen. Note: If gain is not available then a dummy implementation returning -1 is used and an error message is produced.
- Parameters
-
- Returns
- New nearest gain value.
◆ setModelInfo()
void setModelInfo |
( |
const std::string |
info | ) |
|
|
inlineprotected |
sets the camera model information
- Parameters
-
info | [in] information of the camera |
◆ setShutter()
virtual void setShutter |
( |
double |
Value | ) |
|
|
inlinevirtual |
Set shutter value. If the given value is not possible the nearest value are choosen. Note: If shutter is not available then a dummy implementation will throw an error message.
- Parameters
-
◆ start()
starts this camera, if the camera has not been initialized the initialize function will be called.
- Returns
- true if camera was successfully started, false otherwise
The documentation for this class was generated from the following file: