LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::fireWireDCAM::parameters Class Reference

The parameters for the class fireWireDCAM. More...

#include <ltiFireWireDCAM.h>

Inheritance diagram for lti::fireWireDCAM::parameters:
Inheritance graph
[legend]
Collaboration diagram for lti::fireWireDCAM::parameters:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 parameters ()
 parameters (const parameters &other)
 ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
parametersoperator= (const parameters &other)
virtual functor::parametersclone () 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:

  • FEATURE_BRIGHTNESS
  • FEATURE_EXPOSURE
  • FEATURE_SHARPNESS
  • FEATURE_WHITE_BALANCE
  • FEATURE_HUE
  • FEATURE_SATURATION
  • FEATURE_GAMMA
  • FEATURE_SHUTTER
  • FEATURE_GAIN
  • FEATURE_IRIS
  • FEATURE_FOCUS
  • FEATURE_ZOOM
  • FEATURE_PAN
  • FEATURE_TILT

The yet unsupported features are (patches to add support for these missing features are always welcome).

  • FEATURE_TEMPERATURE
  • FEATURE_TRIGGER
  • FEATURE_TRIGGER_DELAY
  • FEATURE_WHITE_SHADING
  • FEATURE_FRAME_RATE
  • FEATURE_OPTICAL_FILTER
  • FEATURE_CAPTURE_SIZE
  • FEATURE_CAPTURE_QUALITY


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

Detailed Description

The parameters for the class fireWireDCAM.


Constructor & Destructor Documentation

lti::fireWireDCAM::parameters::parameters (  ) 

Default constructor.

Reimplemented from lti::frameGrabber::parameters.

lti::fireWireDCAM::parameters::parameters ( const parameters other  ) 

Copy constructor.

Parameters:
other the parameters object to be copied

Reimplemented from lti::frameGrabber::parameters.

lti::fireWireDCAM::parameters::~parameters (  )  [virtual]

Destructor.

Reimplemented from lti::functor::parameters.


Member Function Documentation

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.

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object

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.

Parameters:
other the parameters object to be copied
Returns:
a reference to this parameters object
virtual bool lti::fireWireDCAM::parameters::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

Read the parameters from the given ioHandler.

Parameters:
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.
Returns:
true if write was successful

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.

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::frameGrabber::parameters.


Member Data Documentation

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.

  • FeatureOff: Brightness level will have a fixed value.
  • FeatureAuto: Camera will control the brightness level automatically.
  • FeatureManual: User sets the brightness level manually with the attribute parameters::brightness
  • FeatureOnePush: Brightness value is automatically set and then returns to manual state.

Default value: FeatureAuto

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"

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"

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.

  • FeatureOff: Exposure will be manually controlled by gain, iris and shutter features.
  • FeatureAuto: reference level is automatically adjusted continuously.
  • FeatureManual: exposure level automatically set, but the user selects the reference level in parameters::exposure
  • FeatureOnePush: reference level is set once automatically and then the state returns to manual.

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.

  • FeatureOff: focus control will have fixed values.
  • FeatureAuto: camera controls focus automatically.
  • FeatureManual: focus will be manually controlled through the value parameters::focus.
  • FeatureOnePush: focus is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Desired framerate.

Only a finite set of framerates are allowed:

  • 1.875
  • 3.75
  • 7.5
  • 15
  • 30
  • 60
  • 120
  • 240

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.

  • FeatureOff: gain control will have fixed values.
  • FeatureAuto: camera controls gain automatically.
  • FeatureManual: gain will be manually controlled through the value parameters::gain.
  • FeatureOnePush: gain is set once automatically and then the state returns to manual.

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.

  • FeatureOff: gamma control will have fixed values.
  • FeatureAuto: camera controls gamma automatically.
  • FeatureManual: gamma will be manually controlled through the value parameters::gamma.
  • FeatureOnePush: gamma is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Hue control value.

Controls color phase of the picture

Default value: 0

Hue control state.

  • FeatureOff: hue control will have fixed values.
  • FeatureAuto: camera controls hue automatically.
  • FeatureManual: hue will be manually controlled through the value parameters::hue.
  • FeatureOnePush: hue is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Manually set value for the mechanical iris control.

Default: 0

State used for mechanical iris control.

  • FeatureOff: iris control will have fixed values.
  • FeatureAuto: camera controls iris automatically.
  • FeatureManual: iris will be manually controlled through the value parameters::iris.
  • FeatureOnePush: iris is set once automatically and then the state returns to manual.

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.

  • FeatureOff: pan control will have fixed values.
  • FeatureAuto: camera controls pan automatically.
  • FeatureManual: pan will be manually controlled through the value parameters::pan.
  • FeatureOnePush: pan is set once automatically and then the state returns to manual.

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:

  • Format 0: VGA non compressed, for resolutions less than or equal to 640x480
  • Format 1: SVGA non compressed, for resolutions greater than Format 0 and less than or equal to 1024x768
  • Format 2: SVGA non compressed, for resolutions greater than Format 1 and less than or equal to 1600x1200
  • Format 6: Still image
  • Format 7: Scalable image size

The set of accepted image sizes is

  • 160x120 (format 0)
  • 320x240 (format 0)
  • 640x480 (format 0)
  • 800x600 (format 1)
  • 1024x768 (format 1)
  • 1280x960 (format 2)
  • 1600x1200 (format 2)

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.

  • FeatureOff: saturation control will have fixed values.
  • FeatureAuto: camera controls saturation automatically.
  • FeatureManual: saturation will be manually controlled through the value parameters::saturation.
  • FeatureOnePush: saturation is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Sharpness control value.

Default value: 0

Sharpness control state.

  • FeatureOff: sharpness level will have a fixed value
  • FeatureAuto: camera controls sharpness level automatically.
  • FeatureManual: Sharpness level is set to the value in parameters::sharpness
  • FeatureOnePush: sharpness level is set once automatically and then the state returns to manual.

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.

  • FeatureOff: integration time will have fixed values.
  • FeatureAuto: camera controls shutter automatically.
  • FeatureManual: shutter will be manually controlled through the value parameters::shutter.
  • FeatureOnePush: shutter is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Value used for manual lens tilt control.

Default: 0

State used for lens tilt control.

  • FeatureOff: tilt control will have fixed values.
  • FeatureAuto: camera controls tilt automatically.
  • FeatureManual: tilt will be manually controlled through the value parameters::tilt.
  • FeatureOnePush: tilt is set once automatically and then the state returns to manual.

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.

  • FeatureOff: white balance will have fixed values.
  • FeatureAuto: camera controls white balance automatically.
  • FeatureManual: white balance will be manually controlled through the values parameters::redGain and parameters::blueGain.
  • FeatureOnePush: white balance is set once automatically and then the state returns to manual.

Default value: FeatureAuto

Value used for manual lens zoom control.

Default: 0

State used for lens zoom control.

  • FeatureOff: zoom control will have fixed values.
  • FeatureAuto: camera controls zoom automatically.
  • FeatureManual: zoom will be manually controlled through the value parameters::zoom.
  • FeatureOnePush: zoom is set once automatically and then the state returns to manual.

Default value: FeatureAuto


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:28:02 2010 for LTI-Lib by Doxygen 1.6.1