latest version v1.9 - last update 10 Apr 2010 |
The parameters for the class fireWireDCAM. More...
#include <ltiFireWireDCAM.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
eFixMode | fixMode |
ipoint | resolution |
eColorMode | encoding |
float | framerate |
bool | oneShot |
int | dmaBufferSize |
bool | dropFrames |
std::string | deviceFile |
bayerDemosaicing::parameters | bayerParameters |
std::string | cameraName |
Camera features | |
The following attributes give access to most of the features supported by the libdc1394. Each particular camera usually support just a subset of these features. You can use the method lti::fireWireDCAM::isFeatureAvailable() to check if a particular feature is supported by your camera or not. The attributes with the word "State" control the "state" in which the feature is to be used (see the IIDC 1.3x specifications for details, which can be found at http://damien.douxchamps.net/ieee1394/libdc1394/iidc_specifications.php Not all cameras support all possible states of a particular feature. You can use the method lti::fireWireDCAM::checkFeatureStates() to test the camera support for the on-off, auto, manual, one-push and absolute states. If a camera supports the one-push state, then the corresponding values for the feature will be automatically adjusted exaclty once, just when you set the parameters or update them. Then the camera automatically returns into the manual state. You can use the dumpParameters() method to obtain the adjusted values. Please note that the LTI-Lib uses float values for the features to cover directly the values that a "absolute-setting capable" camera would admit. The supported features of the IIDC specification are:
The yet unsupported features are (patches to add support for these missing features are always welcome).
| |
eFeatureState | brightnessState |
float | brightness |
eFeatureState | exposureState |
float | exposure |
eFeatureState | sharpnessState |
float | sharpness |
eFeatureState | whiteBalanceState |
float | redGain |
float | blueGain |
eFeatureState | hueState |
float | hue |
eFeatureState | saturationState |
float | saturation |
eFeatureState | gammaState |
float | gamma |
eFeatureState | shutterState |
float | shutter |
eFeatureState | gainState |
float | gain |
eFeatureState | irisState |
float | iris |
eFeatureState | focusState |
float | focus |
eFeatureState | zoomState |
float | zoom |
eFeatureState | panState |
float | pan |
eFeatureState | tiltState |
float | tilt |
One-Push related parameters. | |
When you set a feature state in "FeatureOnePush", then the camera is told to switch into a "one-push" state. You can indicate with the following attributes, first, if you want to wait for the camera to automatically return to the manual control state; second, if you do want to wait, then how often you want to check if the camera returned from the "one-push" state, and for how long. | |
bool | waitOnePush |
float | onePushUpdateRate |
float | onePushTimeout |
Static Public Attributes | |
static std::string | cameraNamesFile |
Protected Member Functions | |
const char * | encodingName (const eColorMode &code) const |
const eColorMode | getEncoding (const std::string &name) const |
const char * | fixModeName (const eFixMode &mode) const |
const eFixMode | getFixMode (const std::string &name) const |
The parameters for the class fireWireDCAM.
lti::fireWireDCAM::parameters::parameters | ( | ) |
Default constructor.
Reimplemented from lti::frameGrabber::parameters.
lti::fireWireDCAM::parameters::parameters | ( | const parameters & | other | ) |
Copy constructor.
other | the parameters object to be copied |
Reimplemented from lti::frameGrabber::parameters.
lti::fireWireDCAM::parameters::~parameters | ( | ) | [virtual] |
Destructor.
Reimplemented from lti::functor::parameters.
virtual functor::parameters* lti::fireWireDCAM::parameters::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of the parameters.
Reimplemented from lti::frameGrabber::parameters.
parameters& lti::fireWireDCAM::parameters::copy | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
Reimplemented from lti::frameGrabber::parameters.
const char* lti::fireWireDCAM::parameters::encodingName | ( | const eColorMode & | code | ) | const [protected] |
Write the name of the encoding method into a string.
const char* lti::fireWireDCAM::parameters::fixModeName | ( | const eFixMode & | mode | ) | const [protected] |
Get a string for the fix mode.
const eColorMode lti::fireWireDCAM::parameters::getEncoding | ( | const std::string & | name | ) | const [protected] |
Convert the name of an encoding type to the corresponding enum value.
const eFixMode lti::fireWireDCAM::parameters::getFixMode | ( | const std::string & | name | ) | const [protected] |
For the given string, return a valid fix mode.
const char* lti::fireWireDCAM::parameters::getTypeName | ( | ) | const [virtual] |
Returns name of this type.
Reimplemented from lti::frameGrabber::parameters.
parameters& lti::fireWireDCAM::parameters::operator= | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
virtual bool lti::fireWireDCAM::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read the parameters from the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::frameGrabber::parameters.
virtual bool lti::fireWireDCAM::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
Write the parameters in the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::frameGrabber::parameters.
Parameters for the Bayer pattern demosaicing method.
Default values: NearestNeighbor and RGGB
Gain applied to blue (or U) components if the parameters::whiteBalanceState requires it.
Default value: 0
Overall brightness.
Default value: 0
Brightness feature state.
The brightness usually refers to an offset value that is added to the CCD signal before the A/D conversion, and is used to remove residual offsets in the signal chain. Therefore, is is also known as "black level". You may check, however, which use is being assigned to this feature in your camera.
parameters::brightness
Default value: FeatureAuto
std::string lti::fireWireDCAM::parameters::cameraName |
Camera name.
The camera with the given name in the cameraNamesFile will be used. If the name has not yet been registered in the cameraNamesFiles, then the first available camera will be taken and asigned this cameraName
, which can be later modified by hand in the corresponding names file.
Default value: "Default"
std::string lti::fireWireDCAM::parameters::cameraNamesFile [static] |
Camera names file.
To provide an easy way to identify your cameras, this functor manages a very simple table of camera names associated with a 64bit number. The table is stored in the file with the name given here. You can provide an absolute path with the file if you want a system-wide name convention for your cameras.
If a new camera has been detected, and the cameraName
is not in the current table, then a new line will be added with that name. If the file is in use, then a name "Camera-x" will be added with "x" a sequence number.
The first camera in the file will always be the default one used.
Please note that this is a class attribute (a static attribute), which means that all instances share the same file, since it makes sense that all cameras can be addressed using the same names.
Default value: "cameras.txt"
std::string lti::fireWireDCAM::parameters::deviceFile |
Device file for video capture.
Default: "/dev/video1394/0"
DMA buffer size in frames.
For DMA access provided by the video1394 library, a buffer ring of the given number of images is used. This means, the higher this number, the higher the latency of the read images (i.e. the time-shift between the image provided by the apply method and the actual time in which that image was taken is much higher), as it will be the given number of frames in the past.
Default: 2
Whether frames will be dropped to keep down latency.
This indicates what to do if the ring buffer is full: should the last image there be kept until read (false), or should the buffer be overwritten with the incomming images.
Default: true
Pixel color encoding.
Each resolution in IIDC standard supports only a subset of the possible encodings and each camera usually supports just a subset of those.
The following table summarizes the possible combinations of resolutions and encodings (red means "not allowed", F# indicates the format #).
Mono8 | Mono16 | YUV411 | YUV422 | YUV444 | RGB8 | RGB16 | |
160x120 | F0 | ||||||
320x240 | F0 | ||||||
640x480 | F0 | F0 | F0 | F0 | F0 | ||
800x600 | F1 | F1 | F1 | F1 | |||
1024x768 | F1 | F1 | F1 | F1 | |||
1280x960 | F2 | F2 | F2 | F2 | |||
1600x1200 | F2 | F2 | F2 | F2 |
Default value: YUV422
Auto exposure control.
Reference level used for the auto exposure control
Default value: 0
Auto Exposure state.
Default value: FeatureAuto
Indicate how to behave if invalid parameters are given.
You can choose if you want your parameters to be taken exactly as they are given, and if there is an invalid configuration to report an error (NoFix). You can also indicate that those invalid parameters should be automatically modified to valid ones (AutoFix). A third possibility is to upload the configuration within the physical camera exactly as they are, overwriting everything is given here.
Default value: Upload
Value used for manual lens focus control.
Default: 0
State used for lens focus control.
Default value: FeatureAuto
Desired framerate.
Only a finite set of framerates are allowed:
If you give another value then the nearest one will be used. If the nearest value of the above list is not supported by the current camera, then the behaviour will depend on autofix
.
Default: 15
Gain of the camera, usually applied on all colors.
Default: 0
State used for gain control.
Gain is usually a factor used to multiply the CCD signal, modifying the entire dynamic range.
Default value: FeatureAuto
Gamma control value.
Controls gamma value used in the adjustment between incomming light level and output picture level.
Default value: 0
Gamma control state.
Default value: FeatureAuto
Hue control value.
Controls color phase of the picture
Default value: 0
Hue control state.
Default value: FeatureAuto
Manually set value for the mechanical iris control.
Default: 0
State used for mechanical iris control.
Default value: FeatureAuto
Time-out for the one-push checks (in seconds).
Default value: 10 (seconds)
Frequency (in Herz) of tests if the one-push features are ready.
Default value: 2 (twice a second)
Whether one shot mode should be used.
In oneShot mode the computer advises the camera to shot one picture and transfer it to the computer. If oneShot is false, the camera will transfer pictures
all the time, thus using a lot of fireWire bandwith. The latter mode should be faster and recommended if high framerates are desired.
If the camera does not support the one shot mode, then it will be assumed as if this value were set to false.
Default: true
Value used for manual lens pan control.
Default: 0
State used for lens pan control.
Default value: FeatureAuto
Gain applied to red (or V) components if the parameters::whiteBalanceState requires it.
Default value: 0
Size of the image to be acquired.
The standard IIDC establishes a finite set of valid resolutions for IEEE1394 cameras, and groups them in so called formats. These formats have the following names:
The set of accepted image sizes is
For each format, only a subset of valid pixel encodings are valid. (see the documentation of attribute parameters::encoding
for a detailed list).
Default: 640x480
Saturation control value.
Controls color saturation of the picture
Default value: 0
Saturation control state.
Default value: FeatureAuto
Sharpness control value.
Default value: 0
Sharpness control state.
Default value: FeatureAuto
Integration time of the incomming light.
Influences shutter speed of the camera, higher values usually mean lower shutter speed.
Default value: 0
State for the shutter control.
"Shutter" means the integration time of the incomming light.
Default value: FeatureAuto
Value used for manual lens tilt control.
Default: 0
State used for lens tilt control.
Default value: FeatureAuto
Wait for one-push state ready.
This indicates if you want to way for a one-push capable feature to finish the automatic configuration.
Default value: false;
Automatic white balance.
Default value: FeatureAuto
Value used for manual lens zoom control.
Default: 0
State used for lens zoom control.
Default value: FeatureAuto