Image Component Library (ICL)
Classes
Gigabit Ethernet (GIG-E) based grabber

Classes

class  icl::io::pylon::PylonCameraOptions
 This is a helper class for Pylon camera settings. More...
 
class  icl::io::pylon::ColorConverter
 Pure virtual interface for color converters. More...
 
class  icl::io::pylon::PylonColorConverter
 This is the color-conversion-class for Pylon images. More...
 
class  icl::io::pylon::PylonGrabber
 Grabber implementation for a Basler Pylon-based GIG-E Grabber. More...
 
class  icl::io::pylon::PylonGrabberThread
 Internally spawned thread class for continuous grabbing. More...
 
class  icl::io::pylon::PylonGrabberBuffer< T >
 Buffer, registered to the Pylon-drivers StreamGrabber. More...
 
class  icl::io::pylon::TsBuffer< T >
 A buffer holding image information and timestamp. More...
 
struct  icl::io::pylon::PylonAutoEnv
 Utility Structure. More...
 
struct  icl::io::pylon::Interruptable
 Utility Structure. More...
 
struct  icl::io::pylon::AcquisitionInterruptor
 Utility Structure. More...
 
struct  icl::io::pylon::GrabbingInterruptor
 Utility Structure. More...
 

Detailed Description

Overview

The ICLIO Package encloses a wide range of images sources that are all derived from the abstract icl::Grabber interface. Furthermore some utility functions and classes for File handling and management are provided. The functionalities can be grouped into the following modules:

  1. LibDC1394-2 based IEEE-1394 Camera Grabber and Control API
  2. Common File-I/O Utility Functions and Classes
  3. Plugin-based File-Writer and File-Grabber implementation
  4. grabbers for movie file sources
  5. Video 4 Linux based grabbesr
  6. Gigabit Ethernet (GIG-E) based grabber
  7. List of all provided Grabber implementations

Grabbers

However, a large set of Grabber implementations is available, we recommend to use instances of the icl::GenericGrabber class. Instances of the GenericGrabber class can wrap all other supported Grabber implementations internally. At construction time, the GenericGrabber is set up with a pair of string parameters (usually specified on the application's command line) that specify which device has to be used internally. By these means, you can simply write applications that are able to acquire images from all available sources without having to check which of all possible back-ends manually. furthermore, your application will also benefit from ICL-updates, which provide further grabber-implementations automatically.

Here is a small example for a dynamic-source grab example

#include <ICLQt/Common.h>
GenericGrabber grabber;
void init(){
grabber.init(pa("-i"));
gui << Image().handle("image") << Show();
}
void run(){
gui["image"] = grabber.grab();
}
int main(int n, char **args){
return ICLApp(n,args,"-input|-i(2)",init,run).exec();
}

viewer.jpg

A slightly adapted version of this application is available as an example application called 'icl-camviewer' (ICL/ICLQt/examples/camviewer.cpp). Here, you can check to power of the combination of ICL's program argument evaluation toolbox and the icl::GenericGrabber. Here are some examples:

# grab from the first fire-wire device available
icl-camviewer -input dc 0
# grab from a file
icl-camviewer -input file my-image.png
# grab from a list of files (note, the pattern has be be set in single tics)
icl-camviewer -input file 'images/*.jpg'
# create the famous 'lena' demo image (also possible: 'parrot', 'cameraman' and others)
icl-camviewer -input create lena
# create an animated demo image (a moving red square)
icl-camviewer -input demo 0
# grab from a standad webcam using opencv
icl-camviewer -input cvcam 0
# grab from a pylon compatible GigE device
icl-camviewer -input pylon 0

In addition to the simple device selection, also camera device properties can be set from command line

# force VGA size (this must be supported by the device)
icl-camviewer -input dc 0@size=VGA
# list all possible properties and their allowed values and ranges
icl-camviewer -input dc 0@info
# instantiate a grabber and directly load a property configuration file
# note: these files can be created interactively with the camera-configuration tool icl-camcfg
# or by reading a devices properties using e.g. 'icl-camera-param-io -d dc 0 -o my-file.xml'
icl-camviewer -input dc 0@load=my-file.xml
# set several options at once
icl-camviewer -input kinectc '0@LED=green@core::format=IR Image (10Bit)'
# enable image undistortion according to undistortion parameters stored in an appropriate** xml file.
icl-camviewer -input dc 0@udist=my-udist-properties.xml
# **appropriate means, that the xml-files were created by serializing an icl::ImageUndistortion
# structure to a file. The tools  todo fix this sentence according to the fixed application names
# icl-opencvcamcalib-demo, icl-intrinsic-camera-calibration and icl-intrinsic-calibrator-demo can
# be setup to write the calibration results in the correct file format

Furthermore, since almost all ICL-applications use the icl::GenericGrabber in combination with ICL's programm argument evaluation toolbox, nearly all ICL applications can be set up to grab the source images from an arbitrary image source. In this context, the example- application 'icl-pipe' might be very useful: icl-pipe does not only have a generic image souce, but is does also use the icl::GenericImageOutput to stream the grabber images somewhere else. Here are some examples:

# grab images an pipe the results into files (#### is replaced by the image index, here 0000, 0001, ...
# for more ore less trailing zeros, just add more or less hashes #)
icl-pipe -input dc 0 -o file images/image-####.ppm
# grab images and pipe them to a shared memory segment which can directly be accessed by other
# icl-applications
icl-pipe -input dc 0 -o sm my-segment
# now, the images can be read online from the shared memory
icl-camviewer -input sm my-segment
# capture a video using an opencv based video writer (here, with DIVX code, VGA-resolution
# and playback speed of 24 frames per second (note, not all combinations of codecs, resolutions
# and sizes are possible (actually, most are not :-)
icl-pipe -input dc 0 -o video my-video.avi,DIVX,VGA,24
# re-encode a video using a xine-based grabber
icl-pipe -input video some-file.mpg -o some-file-converted,DIVX,SVGA,30
# grab images from a robotics service bus scope /foo/bar (using spread-based multicast connection)
icl-camviewer -input rsb /foo/bar
# grab images from a robotics service bus scope /foo/bar (using socket connection)
icl-camviewer -input rsb socket:/foo/bar
# grab video file and use a robotics service bus informer to publish the image via spread and socket
icl-pipe -input cvvideo myfile.avi -o rsb spread,socket:/foo/bar

For further details and a complete list of possible Grabber-backends, please refer to the icl::GenericGrabber and icl::GenericImageOutput documentation.

Grabber Backends and Corresponding 3rd Party Libraries