Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

Grabber implementation for handling DC-Devices using libdc1394 (Version >= 2.0.rc9) \. More...

#include <DCGrabber.h>

Inheritance diagram for icl::io::DCGrabber:
icl::io::Grabber icl::utils::Uncopyable icl::utils::Configurable

List of all members.

Public Member Functions

ICLIO_API DCGrabber (const DCDevice &dev=DCDevice::null, int isoMBits=0)
 Constructor creates a new DCGrabber instance from a given DCDevice.
ICLIO_API ~DCGrabber ()
 Destructor.
virtual ICLIO_API const
core::ImgBase
acquireImage ()
 grab function grabs an image (destination image is adapted on demand)
virtual ICLIO_API std::vector
< std::string > 
get_io_property_list ()
 filters out the size property, as it is set by the core::format property

Static Public Member Functions

static ICLIO_API std::vector
< DCDevice
getDCDeviceList (bool resetBusFirst=false)
 Returns a list of all connected DCDevices.
static void dc1394_reset_bus (bool verbose=false)
 calls dc1394_reset_bus functions (see DCDevice)

Private Member Functions

void restartGrabberThread ()
 internally used function to restart the DCGrabberThread
void addProperties ()
 adds DCGrabbers properties to Configurable.
void processPropertyChange (const utils::Configurable::Property &p)
 callback function for property changes.

Private Attributes

DCDevice m_oDev
 Wrapped DCDevice struct.
DCDeviceFeatures m_oDeviceFeatures
 Features corrsponding to m_oDev.
dc::DCGrabberThreadm_poGT
 Wrapped DCGrabberThread struct.
utils::Mutex m_GrabberThreadMutex
 Mutex for clean restarting of GrabberThread.
core::ImgBasem_poImage
 Internally used buffer images.
core::ImgBasem_poImageTmp
core::Converter m_oConverter
 Internally used image converter.
DCDeviceOptions m_oOptions
 Internal DCDeviceOptions struct.
std::string m_sUserDefinedBayerPattern
 only for unknown device types

Detailed Description

Grabber implementation for handling DC-Devices using libdc1394 (Version >= 2.0.rc9) \.

The DCGrabber class implements the ICL's Grabber interface for providing libdc1395.so.2 based camera device access. Internally it wraps some additional classes with name prefix "DC".

The first time the "grab(..)"-function of the DCGrabber is invoked, it internally creates a so called DCGrabberThread. This thread then will create a so called DCFrameQueue internally. This queue is used to handle dma-image-frames, owned by the libdc which have been temporarily de-queued from the dma ring buffer queue into the user space. Here, the user has read-only access to these frames. The DCGrabberThread runs as fast as the current camera-settings allow and de-queues dma-frames from the system space into the user space DCFrameQueue and it en-queues old user space frames from this DCFrameQueue back into the dma ring buffer. At each time, the newest frame is available at the back of the DCFrameQueue whereas the oldest frame is located at the front of this queue. When the DCGrabbers grab-function is called, it will internally lock the current DCFrameQueue and convert the current frame into another buffer before the DCFrameQueue is unlocked again.
Internally the DCGrabber wraps an instance of type DCDeviceOptions, which is a container for all currently implemented options. The wrapped classes DCGrabberThread and DCFrameQueue get a pointer to this option-struct at construction time, so these objects are able to work with the options currently set inside the parent DCGrabber instance.
In addition, another class called DCDevice is used internally as a high-level wrapper for the libdc1394's camera struct. This DCDevice class provides some additional information to the low level information of the dc1394camera_t struct, e.g. some very camera-model specific information about the bayer-filter layout and so on. Note: New cameras, which should be supported must be included here!.
As in other Grabber implementations, a static function "getDeviceList()" can be used to detect currently supported cameras.

See also:
DCDevice, DCDeviceOptions, DCGrabberThread, DCFrameQueue

Constructor & Destructor Documentation

ICLIO_API icl::io::DCGrabber::DCGrabber ( const DCDevice dev = DCDevice::null,
int  isoMBits = 0 
)

Constructor creates a new DCGrabber instance from a given DCDevice.

Parameters:
devDCDevice to use (this device can only be created by the static function getDeviceList()
isoMBitsgive the initializer a hint to set instantiated grabber to a specific iso mode by default allowed values are
  • 400 -> IEEE-1394-A (400MBit)
  • 800 -> IEEE-1394-B (800MBit)
  • 0 (default) value is not chaged!

(please note, that this parameter can also be set by the property iso-speed)

Destructor.


Member Function Documentation

grab function grabs an image (destination image is adapted on demand)

grab function calls the Grabber-specific acquireImage-method and applies distortion if necessary

If dst is not NULL, it is exploited and filled with image data

Reimplemented from icl::io::Grabber.

adds DCGrabbers properties to Configurable.

static void icl::io::DCGrabber::dc1394_reset_bus ( bool  verbose = false) [inline, static]

calls dc1394_reset_bus functions (see DCDevice)

virtual ICLIO_API std::vector<std::string> icl::io::DCGrabber::get_io_property_list ( ) [virtual]

filters out the size property, as it is set by the core::format property

static ICLIO_API std::vector<DCDevice> icl::io::DCGrabber::getDCDeviceList ( bool  resetBusFirst = false) [static]

Returns a list of all connected DCDevices.

callback function for property changes.

Reimplemented from icl::io::Grabber.

internally used function to restart the DCGrabberThread

useful if the grabber thread must have been deleted to update some internal properties


Member Data Documentation

Mutex for clean restarting of GrabberThread.

Internally used image converter.

This converter is used, if the wrapped DCGrabberThread was not able to satisfy all desired parameter claims.

Wrapped DCDevice struct.

Features corrsponding to m_oDev.

Internal DCDeviceOptions struct.

Wrapped DCGrabberThread struct.

Internally used buffer images.

only for unknown device types


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines