latest version v1.9 - last update 10 Apr 2010 |
Grab imags from FireWire Cameras. More...
#include <ltiFireWireDCAM.h>
Classes | |
class | busInfo |
IEEE 1394 Bus Information Class. More... | |
class | cameraInfo |
The camera information class. More... | |
class | cameraSet |
Set of cameras. More... | |
struct | format7Info |
Structure to hold format 7 information. More... | |
struct | format7ModeInfo |
Structure to hold format 7 mode information. More... | |
class | nameDB |
Camera database. More... | |
class | parameters |
The parameters for the class fireWireDCAM. More... | |
Public Types | |
enum | eFixMode { NoFix, AutoFix, Upload } |
enum | eFeatureState { FeatureNA = 0, FeatureOff = 1, FeatureAuto = 2, FeatureManual = 4, FeatureOnePush = 8, FeatureAbsolute = 16 } |
enum | eColorMode { Mono8 = 0, Mono16, Mono16s, YUV411, YUV422, YUV444, RGB8, RGB16, RGB16s, Raw8, Raw16, UnknownEncoding } |
Public Member Functions | |
fireWireDCAM () | |
fireWireDCAM (const parameters &par) | |
fireWireDCAM (const fireWireDCAM &other) | |
virtual | ~fireWireDCAM () |
virtual const char * | getTypeName () const |
bool | apply (image &dest) |
bool | apply (channel8 &dest) |
bool | grabRaw (matrix< ubyte > &dest) |
bool | updateParameters () |
bool | getVideoMode (ipoint &resolution, eColorMode &encoding) const |
bool | getFramerate (float &framerate) const |
bool | init () |
bool | printFeatures () const |
bool | dumpParameters (parameters &par) |
fireWireDCAM & | copy (const fireWireDCAM &other) |
fireWireDCAM & | operator= (const fireWireDCAM &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Direct access to camera features. | |
These methods access the camera registers directly, and they try to update the internal parameters. However, since the cameras may adjust themselves, you may find the method fireWireDCAM::dumpParameters() useful, which asks the camera for all parameters in use at once. If a feature supports the "one-push state", then the automatic configuration will begin as soon as you call the corresponding method with the value If you set the state of one or more features to one-push, then you may want to wait for them to be ready with the method onePushWait(). Of course, this will work if and only if the camera supports this feature state. The methods to query information from the camera do indeed ask the camera for the corresponding value (if and only if this is possible). There are cameras which do not support the readout capability for the registers holding the feature values. In that case, the get* methods will return | |
bool | setBrightness (const eFeatureState state, const float brightness=0) |
bool | getBrightness (eFeatureState &state, float &brightness) const |
bool | setExposure (const eFeatureState state, const float exposure=0) |
bool | getExposure (eFeatureState &state, float &exposure) const |
bool | setSharpness (const eFeatureState state, const float sharpness=0) |
bool | getSharpness (eFeatureState &state, float &sharpness) const |
bool | setWhiteBalance (const eFeatureState state, const float ubGain=0, const float vrGain=0) |
bool | getWhiteBalance (eFeatureState &state, float &ubGain, float &vrGain) |
bool | setHue (const eFeatureState state, const float hue=0) |
bool | getHue (eFeatureState &state, float &hue) const |
bool | setSaturation (const eFeatureState state, const float saturation=0) |
bool | getSaturation (eFeatureState &state, float &saturation) const |
bool | setGamma (const eFeatureState state, const float gamma=0) |
bool | getGamma (eFeatureState &state, float &gamma) const |
bool | setShutter (const eFeatureState state, const float shutter=0) |
bool | getShutter (eFeatureState &state, float &shutter) const |
bool | setGain (const eFeatureState state, const float gain=0) |
bool | getGain (eFeatureState &state, float &gain) const |
bool | setIris (const eFeatureState state, const float iris=0) |
bool | getIris (eFeatureState &state, float &iris) const |
bool | setFocus (const eFeatureState state, const float focus=0) |
bool | getFocus (eFeatureState &state, float &focus) const |
bool | setZoom (const eFeatureState state, const float zoom=0) |
bool | getZoom (eFeatureState &state, float &zoom) const |
bool | setPan (const eFeatureState state, const float pan=0) |
bool | getPan (eFeatureState &state, float &pan) const |
bool | setTilt (const eFeatureState state, const float tilt=0) |
bool | getTilt (eFeatureState &state, float &tilt) const |
Access to internal data structures | |
bool | isCameraActive () const |
bool | hasCameraFormat7 () const |
bool | isFeatureAvailable (const unsigned int featureId) const |
bool | isFeatureReadable (const unsigned int featureId) const |
unsigned int | checkFeatureStates (const unsigned int featureId) const |
bool | getFeatureState (const unsigned int featureId, eFeatureState &state) const |
bool | setFeatureState (const unsigned int featureId, const eFeatureState state) |
bool | setFeatureValue (const unsigned int featureId, const eFeatureState state, const float value=0) |
bool | getFeatureValue (const unsigned int featureId, eFeatureState &state, float &value) const |
bool | checkFeatureValueRange (const unsigned int featureId, int &minValue, int &maxValue) const |
Protected Member Functions | |
parameters & | getRWParameters () |
eFeatureState | fixState (const unsigned int states, const eFeatureState desired) const |
bool | fixParameters (parameters &par) const |
unsigned int | convertFramerate (const float fps) const |
float | convertFramerate (const unsigned int eFR) const |
unsigned int | convertMode (const ipoint &resolution, const eColorMode &encoding) const |
void | convertMode (const unsigned int value, ipoint &resolution, eColorMode &encoding) const |
bool | isModeColor (const unsigned int mode) const |
unsigned int | computeClosestMode (const unsigned int mode) const |
float | computeClosestFrameRate (const unsigned int mode, const float fr) const |
void | convertMode7 (const unsigned int value, ipoint &resolution, eColorMode &encoding) const |
eColorMode | getColorCode7 (const unsigned int code) const |
unsigned int | getFormat (const ipoint &resolution) const |
void | yuv411toRGB (image &srcdest) const |
void | yuv422toRGB (image &srcdest) const |
bool | isFeatureAuto (const unsigned int featureId) const |
bool | setFeatureAuto (const unsigned int featureId, const bool on=true) const |
bool | setFeatureOn (const unsigned int featureId, const bool on=true) |
bool | setFeatureAbsoluteState (const unsigned int featureId, const bool on=true) |
bool | captureFrame () |
bool | releaseCamera () |
Protected Attributes | |
int | activeCamera_ |
std::string | activeCameraName_ |
eColorMode | colorMode_ |
channel8 | ch8_ |
dc1394_cameracapture | camera_ |
bool | setupCapture_ |
mergeYCbCrToImage | merger_ |
bayerDemosaicing | bayer_ |
Shadow and pointers for active camera attributes | |
bool | oneShotCapable_ |
const raw1394handle_t * | handle_ |
const dc1394_feature_set * | features_ |
const nodeid_t * | node_ |
unsigned int | busChannel_ |
unsigned int | busSpeed_ |
bool | isoTransStarted_ |
Hardware singletons | |
The following attributes represent the IEEE 1394 bus and all available cameras. | |
static bool | hwCreated_ |
static busInfo | bus_ |
static cameraSet | cams_ |
static nameDB | cameraNames_ |
bool | initHardware () |
bool | initCamera (const parameters &par) |
One-Push Wait Scheduler | |
The following methods provide a very basic scheduler for check of the successful automatic adjustment of features in the one push mode | |
std::set< unsigned int > | waitingFeatures_ |
mutex | onePushLock_ |
bool | onePushWait () |
bool | onePushQueueInsert (const unsigned int featureId) |
Grab imags from FireWire Cameras.
This functor permits to interact with standard FireWire DCAM cameras (aka IIDC v1.3x). It is a wrapper of the libdc1394 library in (linux). You may find the information of the IIDC standard useful, which can be found on the net (for instance, in http://damien.douxchamps.net/ieee1394/libdc1394/iidc_specifications.php ).
System requirements:
Installation:
Example:
// viewer to display taken shot viewer view("FireWireDCAM"); fireWireDCAM::parameters camPar; fireWireDCAM cam; // will be preserved by init() camPar.deviceFile = "/dev/video1394/0"; camPar.oneShot = true; camPar.brightness = 22; // as the camera is initialized now, the new parameters will be written // into the camera cam.setParameters(camPar); // take picture image img; cam.apply(img); // show image view.show(img);
Not yet implemented:
Other things to do:
Enumeration of encoding methods allowed by the IIDC standard of the IEEE 1394.
Many of these constants are available for Format7 modes only, i.e., if the camera supports scalable image sizes.
Some of the following encoding methods are not supported by the LTI-Lib yet, specially those with 16 bits. Hence, the equivalent formats with lower precision would be used instead.
Mono8 |
Monochromatic with 8 bits (unsigned) per pixel. |
Mono16 |
Monochromatic with 16 bits (unsigned) per pixel. |
Mono16s |
Monochromatic with 16 bits (signed) per pixel. |
YUV411 |
Yuv color space with 4:1:1 ratio. |
YUV422 |
Yuv color space with 4:2:2 ratio. |
YUV444 |
Yuv color space with 4:4:4 ratio. |
RGB8 |
RGB encoding with 8 bits per color channel. |
RGB16 |
RGB encoding with 16 bits (unsigned) per color channel. |
RGB16s |
RGB encoding with 16 bits (signed) per color channel. |
Raw8 |
Raw data in 8 bits. |
Raw16 |
Raw data in 16 bits. |
UnknownEncoding |
Dummy value for an unknown encoding. |
Feature state.
Most features, following the IIDC standard, can be used in one of the following states.
Several notes on the values:
Auto correction modes for parameters.
While setting the parameters for a camera, you can decide how to behave on invalid parameters.
NoFix |
Use the parameters as they are given, and if something is invalid, return an error. |
AutoFix |
Try to use the parameters as they are given, but is something is invalid or not supported by the active camera, change it to a valid configuration. |
Upload |
Ignore the parameters given, and simply upload the values in use in the camera indicated by the parameters set, which is set as active. |
lti::fireWireDCAM::fireWireDCAM | ( | ) |
Default constructor.
You usually avoid using this constructor. Using fireWireDCAM(const parameters&) you can provide directly for which camera the constructed instance should work.
lti::fireWireDCAM::fireWireDCAM | ( | const parameters & | par | ) |
Construct with the given parameters instance.
You can give directly in the parameters object for which camera the instance should be created, therefore this is the most used constructor of this functor.
lti::fireWireDCAM::fireWireDCAM | ( | const fireWireDCAM & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::fireWireDCAM::~fireWireDCAM | ( | ) | [virtual] |
Destructor.
bool lti::fireWireDCAM::apply | ( | channel8 & | dest | ) | [virtual] |
Gets one frame from camera.
dest | channel8 the result be left here. |
Implements lti::frameGrabber.
bool lti::fireWireDCAM::apply | ( | image & | dest | ) | [virtual] |
Gets one frame from camera.
dest | image the result will be left here. |
Implements lti::frameGrabber.
bool lti::fireWireDCAM::captureFrame | ( | ) | [protected] |
Just capture a frame through libdc1394.
unsigned int lti::fireWireDCAM::checkFeatureStates | ( | const unsigned int | featureId | ) | const |
Check for availability of feature states.
Following the IIDC 1.3x standard, a given feature (see the list of valid identifiers in lti::fireWireDCAM::isFeatureAvailable() ) can have one of four states:
This method asks the active camera which states are supported and returns a bitwise combination of fireWireDCAM::eFeatureState constants.
You have to ensure that a camera is active (see fireWireDCAM::isCameraActive()).
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) |
bool lti::fireWireDCAM::checkFeatureValueRange | ( | const unsigned int | featureId, | |
int & | minValue, | |||
int & | maxValue | |||
) | const |
Check the valid value range for a specified feature.
You have to ensure that there is an active camera before calling this method. (see fireWireDCAM::isCameraActive() )
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) | |
minValue | minimum value accepted for the specified feature. | |
maxValue | maximum value accepted for the specified feature. |
true
if successful or false
otherwise. virtual functor* lti::fireWireDCAM::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Implements lti::functor.
float lti::fireWireDCAM::computeClosestFrameRate | ( | const unsigned int | mode, | |
const float | fr | |||
) | const [protected] |
Compute the closest supported framerate for a given mode.
unsigned int lti::fireWireDCAM::computeClosestMode | ( | const unsigned int | mode | ) | const [protected] |
Compute the closest supported mode to a given IIDC valid mode.
the approximation is done with the following priorities:
float lti::fireWireDCAM::convertFramerate | ( | const unsigned int | eFR | ) | const [protected] |
Get the float value in fps equivalent to the framerate enum value of the libdc1394.
unsigned int lti::fireWireDCAM::convertFramerate | ( | const float | fps | ) | const [protected] |
Get the closest framerate of the libdc1394 set of enums to the given framerate value coded in a float of fps.
This method does not consider the camera supported framerates, but the simple convertion.
void lti::fireWireDCAM::convertMode | ( | const unsigned int | value, | |
ipoint & | resolution, | |||
eColorMode & | encoding | |||
) | const [protected] |
From the given value for format/mode after IIDC encoding, get the equivalent resolution and pixel encoding.
unsigned int lti::fireWireDCAM::convertMode | ( | const ipoint & | resolution, | |
const eColorMode & | encoding | |||
) | const [protected] |
Get "nearest" IIDC mode value from the given resolution and encoding.
As "nearest" it will be taken the resolution with the most similar number of pixels and within that resolution, the "nearest" encoding will be chosen (RGBs are in a group, Mono in another and YUV in another.
void lti::fireWireDCAM::convertMode7 | ( | const unsigned int | value, | |
ipoint & | resolution, | |||
eColorMode & | encoding | |||
) | const [protected] |
fireWireDCAM& lti::fireWireDCAM::copy | ( | const fireWireDCAM & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::frameGrabber.
bool lti::fireWireDCAM::dumpParameters | ( | parameters & | par | ) |
Read the actual hardware settings of the active camera and leave them into the given parameter instance.
par | the parameters instance on which the gained information will be stored. |
bool lti::fireWireDCAM::fixParameters | ( | parameters & | par | ) | const [protected] |
Analyse the given parameters instance and change its attributes to contain values supported by the active camera.
This method will work only if the camera of the given parameters is connected and found. Otherwise there will be no way to determine which values are appropriate for the camera.
eFeatureState lti::fireWireDCAM::fixState | ( | const unsigned int | states, | |
const eFeatureState | desired | |||
) | const [protected] |
For a bitwise combination of available states and a desired state, return a valid supported state.
bool lti::fireWireDCAM::getBrightness | ( | eFeatureState & | state, | |
float & | brightness | |||
) | const |
Get brightness state and value directly out of camera.
state | Variable where the current brightness state is to be written. | |
brightness | Variable where the brightness value is to be written. |
eColorMode lti::fireWireDCAM::getColorCode7 | ( | const unsigned int | code | ) | const [protected] |
Get a functor valid code for a color space given in the libdc1394 enumeration for a Format7 color code.
bool lti::fireWireDCAM::getExposure | ( | eFeatureState & | state, | |
float & | exposure | |||
) | const |
Get exposure state and value directly out of camera.
state | Variable where the current exposure state is to be written. | |
exposure | Variable where the exposure value is to be written. |
bool lti::fireWireDCAM::getFeatureState | ( | const unsigned int | featureId, | |
eFeatureState & | state | |||
) | const |
bool lti::fireWireDCAM::getFeatureValue | ( | const unsigned int | featureId, | |
eFeatureState & | state, | |||
float & | value | |||
) | const [inline] |
Get control state and value of a particular feature.
This method does not support those features that require two values, like white balance.
featureId | identification for the feature to be queried. | |
state | State in which the feature is being used | |
value | if state is manual, the value to be used. |
true
if operation was successfull, false
otherwise (for example, if the feature is not supported by the camera). bool lti::fireWireDCAM::getFocus | ( | eFeatureState & | state, | |
float & | focus | |||
) | const |
Get focus state and value directly out of camera.
state | Variable where the current focus state is to be written. | |
focus | Variable where the focus value is to be written. |
unsigned int lti::fireWireDCAM::getFormat | ( | const ipoint & | resolution | ) | const [protected] |
Get the corresponding format for the given resolution.
bool lti::fireWireDCAM::getFramerate | ( | float & | framerate | ) | const |
Get current frame rate directly out of camera.
bool lti::fireWireDCAM::getGain | ( | eFeatureState & | state, | |
float & | gain | |||
) | const |
Get gain state and value directly out of camera.
state | Variable where the current gain state is to be written. | |
gain | Variable where the gain value is to be written. |
bool lti::fireWireDCAM::getGamma | ( | eFeatureState & | state, | |
float & | gamma | |||
) | const |
Get gamma state and value directly out of camera.
state | Variable where the current gamma state is to be written. | |
gamma | Variable where the gamma value is to be written. |
bool lti::fireWireDCAM::getHue | ( | eFeatureState & | state, | |
float & | hue | |||
) | const |
Get hue state and value directly out of camera.
state | Variable where the current hue state is to be written. | |
hue | Variable where the hue value is to be written. |
bool lti::fireWireDCAM::getIris | ( | eFeatureState & | state, | |
float & | iris | |||
) | const |
Get iris state and value directly out of camera.
state | Variable where the current iris state is to be written. | |
iris | Variable where the iris value is to be written. |
bool lti::fireWireDCAM::getPan | ( | eFeatureState & | state, | |
float & | pan | |||
) | const |
Get pan state and value directly out of camera.
state | Variable where the current pan state is to be written. | |
pan | Variable where the pan value is to be written. |
const parameters& lti::fireWireDCAM::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::frameGrabber.
parameters& lti::fireWireDCAM::getRWParameters | ( | ) | [protected] |
Returns modifieable parameters.
bool lti::fireWireDCAM::getSaturation | ( | eFeatureState & | state, | |
float & | saturation | |||
) | const |
Get saturation state and value directly out of camera.
state | Variable where the current saturation state is to be written. | |
saturation | Variable where the saturation value is to be written. |
bool lti::fireWireDCAM::getSharpness | ( | eFeatureState & | state, | |
float & | sharpness | |||
) | const |
Get sharpness state and value directly out of camera.
state | Variable where the current sharpness state is to be written. | |
sharpness | Variable where the sharpness value is to be written. |
bool lti::fireWireDCAM::getShutter | ( | eFeatureState & | state, | |
float & | shutter | |||
) | const |
Get shutter state and value directly out of camera.
state | Variable where the current shutter state is to be written. | |
shutter | Variable where the shutter value is to be written. |
bool lti::fireWireDCAM::getTilt | ( | eFeatureState & | state, | |
float & | tilt | |||
) | const |
Get tilt state and value directly out of camera.
state | Variable where the current tilt state is to be written. | |
tilt | Variable where the tilt value is to be written. |
virtual const char* lti::fireWireDCAM::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("fireWireDCAM").
Reimplemented from lti::frameGrabber.
bool lti::fireWireDCAM::getVideoMode | ( | ipoint & | resolution, | |
eColorMode & | encoding | |||
) | const |
Get current video mode directly out of camera.
The IIDC enum value read from the camera is decoded into a resolution and a pixel encoding value.
resolution | ipoint with the image resolution. | |
encoding | encoding type of each pixel (YUV422, RGB, etc.) |
bool lti::fireWireDCAM::getWhiteBalance | ( | eFeatureState & | state, | |
float & | ubGain, | |||
float & | vrGain | |||
) |
bool lti::fireWireDCAM::getZoom | ( | eFeatureState & | state, | |
float & | zoom | |||
) | const |
Get zoom state and value directly out of camera.
state | Variable where the current zoom state is to be written. | |
zoom | Variable where the zoom value is to be written. |
Grabs a raw frame from camera.
dest | channle8 where the result will be left. |
bool lti::fireWireDCAM::hasCameraFormat7 | ( | ) | const |
Check if the active camera supports format 7.
bool lti::fireWireDCAM::init | ( | ) | [virtual] |
Initializes the IEEE Bus and checks for available cameras.
This method will be called automatically, when necessary. Hence, you do not need to worry about it.
Implements lti::frameGrabber.
bool lti::fireWireDCAM::initCamera | ( | const parameters & | par | ) | [protected] |
Initialize the current camera.
bool lti::fireWireDCAM::initHardware | ( | ) | [protected] |
Initialize the hardware.
bool lti::fireWireDCAM::isCameraActive | ( | ) | const |
bool lti::fireWireDCAM::isFeatureAuto | ( | const unsigned int | featureId | ) | const [protected] |
Check if a specific feature is set to "auto".
See lti::fireWireDCAM::isFeatureAvailable() for a list of the valid featureId
and their meanings.
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) |
true
if the feature is set to "auto" or false otherwise. bool lti::fireWireDCAM::isFeatureAvailable | ( | const unsigned int | featureId | ) | const |
Check if a particular feature is available in the current active camera.
You have to ensure that a camera is already active (see isCameraActive()).
featureId | The identification of the feature expects one of the following values, defined in the libdc1394:
|
bool lti::fireWireDCAM::isFeatureReadable | ( | const unsigned int | featureId | ) | const |
Check if a feature is available and is read-out capable.
featureId | identification for the feature to be queried. (see fireWireDCAM::isFeatureAvailable() for a list of valid values) |
true
if feature is read-out capable or false
if it is not available at all, or if it is not readable. bool lti::fireWireDCAM::isModeColor | ( | const unsigned int | mode | ) | const [protected] |
For a mode of the formats 0, 1 or 2, indicate if it is a color mode.
true
if the mode is a color mode (RGB or YUV), or false
if the mode is monochrome. bool lti::fireWireDCAM::onePushQueueInsert | ( | const unsigned int | featureId | ) | [protected] |
Insert the given feature into the waiting queue.
featureId | identification of the feature that want to wait for leaving the one-push state. |
true
if feature could be inserted or false
if it was something wrong (not supported, or a real error). bool lti::fireWireDCAM::onePushWait | ( | ) |
Wait until all features in the waiting queue have left the queue.
true
if all features left the one-push state on a time less than the time-out, or false otherwise. fireWireDCAM& lti::fireWireDCAM::operator= | ( | const fireWireDCAM & | other | ) |
bool lti::fireWireDCAM::printFeatures | ( | ) | const |
Member function that prints informations about camera features on stdout.
bool lti::fireWireDCAM::releaseCamera | ( | ) | [protected] |
bool lti::fireWireDCAM::setBrightness | ( | const eFeatureState | state, | |
const float | brightness = 0 | |||
) |
Set brightness control state and register in camera directly.
state | Camera desired state ( |
brightness | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setExposure | ( | const eFeatureState | state, | |
const float | exposure = 0 | |||
) |
Set exposure control state and register in camera directly.
state | Camera desired state ( |
exposure | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setFeatureAbsoluteState | ( | const unsigned int | featureId, | |
const bool | on = true | |||
) | [protected] |
Turn a feature absolute state on or off.
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) | |
on | if true the absolute mode is turned on, if false then it is turned off |
true
if feature state could be modified, of false otherwise. bool lti::fireWireDCAM::setFeatureAuto | ( | const unsigned int | featureId, | |
const bool | on = true | |||
) | const [protected] |
Set a feature to "auto".
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) | |
on | (default true) if true , the auto state is activated. If false , the auto state is turned off. |
bool lti::fireWireDCAM::setFeatureOn | ( | const unsigned int | featureId, | |
const bool | on = true | |||
) | [protected] |
Turn a feature on or off.
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) | |
on | if true the feature is turned on, if false then it is turned off |
true
if feature state could be modified, of false otherwise. bool lti::fireWireDCAM::setFeatureState | ( | const unsigned int | featureId, | |
const eFeatureState | state | |||
) |
bool lti::fireWireDCAM::setFeatureValue | ( | const unsigned int | featureId, | |
const eFeatureState | state, | |||
const float | value = 0 | |||
) | [inline] |
Set control state and value of a particular feature.
This method does not support those features that require two values, like white balance.
This private method does not modify the internal parameters.
featureId | identification for the feature to be modified (see fireWireDCAM::isFeatureAvailable() for a list of valid values) | |
state | Camera desired state ( |
value | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setFocus | ( | const eFeatureState | state, | |
const float | focus = 0 | |||
) |
Set focus control state and register in camera directly.
state | Camera desired state ( |
focus | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setGain | ( | const eFeatureState | state, | |
const float | gain = 0 | |||
) |
Set gain control state and register in camera directly.
state | Camera desired state ( |
gain | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setGamma | ( | const eFeatureState | state, | |
const float | gamma = 0 | |||
) |
Set gamma control state and register in camera directly.
state | Camera desired state ( |
gamma | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setHue | ( | const eFeatureState | state, | |
const float | hue = 0 | |||
) |
Set hue control state and register in camera directly.
state | Camera desired state ( |
hue | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setIris | ( | const eFeatureState | state, | |
const float | iris = 0 | |||
) |
Set iris control state and register in camera directly.
state | Camera desired state ( |
iris | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setPan | ( | const eFeatureState | state, | |
const float | pan = 0 | |||
) |
Set pan control state and register in camera directly.
state | Camera desired state ( |
pan | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setSaturation | ( | const eFeatureState | state, | |
const float | saturation = 0 | |||
) |
Set saturation control state and register in camera directly.
state | Camera desired state ( |
saturation | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setSharpness | ( | const eFeatureState | state, | |
const float | sharpness = 0 | |||
) |
Set sharpness control state and register in camera directly.
state | Camera desired state ( |
sharpness | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setShutter | ( | const eFeatureState | state, | |
const float | shutter = 0 | |||
) |
Set shutter control state and register in camera directly.
state | Camera desired state ( |
shutter | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setTilt | ( | const eFeatureState | state, | |
const float | tilt = 0 | |||
) |
Set tilt control state and register in camera directly.
state | Camera desired state ( |
tilt | If state is manual, the value to be used. |
bool lti::fireWireDCAM::setWhiteBalance | ( | const eFeatureState | state, | |
const float | ubGain = 0 , |
|||
const float | vrGain = 0 | |||
) |
Set whiteBalance control state and register in camera directly.
Depending on the color space used by the camera (RGB or YUV), the color gains are applied to UV or to BR.
state | Camera desired state ( |
ubGain | gain for the blue channel (or U channel) | |
vrGain | gain for the red channel (or V channel) |
bool lti::fireWireDCAM::setZoom | ( | const eFeatureState | state, | |
const float | zoom = 0 | |||
) |
Set zoom control state and register in camera directly.
state | Camera desired state ( |
zoom | If state is manual, the value to be used. |
bool lti::fireWireDCAM::updateParameters | ( | ) | [virtual] |
write parameters in camera
Reimplemented from lti::functor.
void lti::fireWireDCAM::yuv411toRGB | ( | image & | srcdest | ) | const [protected] |
converts YUV411 to RGB
void lti::fireWireDCAM::yuv422toRGB | ( | image & | srcdest | ) | const [protected] |
converts YUV422 to RGB
int lti::fireWireDCAM::activeCamera_ [protected] |
std::string lti::fireWireDCAM::activeCameraName_ [protected] |
bayerDemosaicing lti::fireWireDCAM::bayer_ [protected] |
demosaicing functor for Mono to RGB conversion
busInfo lti::fireWireDCAM::bus_ [static, protected] |
The one and only instance for the IEEE1394 bus.
unsigned int lti::fireWireDCAM::busChannel_ [protected] |
unsigned int lti::fireWireDCAM::busSpeed_ [protected] |
FireWire bus speed used.
dc1394_cameracapture lti::fireWireDCAM::camera_ [protected] |
Capture handle with the camera node, buffer etc.
nameDB lti::fireWireDCAM::cameraNames_ [static, protected] |
The camera names database.
cameraSet lti::fireWireDCAM::cams_ [static, protected] |
The camera set attached to the IEEE1394 bus found.
channel8 lti::fireWireDCAM::ch8_ [protected] |
Just a buffer channel8.
eColorMode lti::fireWireDCAM::colorMode_ [protected] |
Colormode used for conversion to rgb image.
const dc1394_feature_set* lti::fireWireDCAM::features_ [protected] |
Saves what features are available.
This is a pointer to cams_[activeCamera_].featureSet
const raw1394handle_t* lti::fireWireDCAM::handle_ [protected] |
FireWire handle for low level communication.
This is a pointer to cams_[activeCamera_].info.handle
bool lti::fireWireDCAM::hwCreated_ [static, protected] |
Flag set to true if the bus and camera set were already initialized or false otherwise.
bool lti::fireWireDCAM::isoTransStarted_ [protected] |
Flag to indicate if the ISO transmision has been started.
mergeYCbCrToImage lti::fireWireDCAM::merger_ [protected] |
merger for YUV to RGB conversion
const nodeid_t* lti::fireWireDCAM::node_ [protected] |
Shadow of the node id.
This is a pointer to cams_[activeCamera_].info.id
mutex lti::fireWireDCAM::onePushLock_ [protected] |
Protect the queue from multiple access.
bool lti::fireWireDCAM::oneShotCapable_ [protected] |
Shadow value of current in use camera to indicate that it is capable of oneShot capture.
This is a shadow of cams_[activeCamera_].miscInfo.one_shot_capable;
bool lti::fireWireDCAM::setupCapture_ [protected] |
If a setup capture succeeded.
std::set<unsigned int> lti::fireWireDCAM::waitingFeatures_ [protected] |
Feature list in waiting process.