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 | Static Private Member Functions | Private Attributes | Static Private Attributes
icl::io::pylon::PylonGrabber Class Reference

Grabber implementation for a Basler Pylon-based GIG-E Grabber. More...

#include <PylonGrabber.h>

Inheritance diagram for icl::io::pylon::PylonGrabber:
icl::io::Grabber icl::io::pylon::Interruptable icl::utils::Uncopyable icl::utils::Configurable

List of all members.

Public Member Functions

ICLIO_API PylonGrabber (const Pylon::CDeviceInfo &dev, const std::string args)
 The constructor.
ICLIO_API ~PylonGrabber ()
 Destructor.
virtual ICLIO_API const
core::ImgBase
acquireImage ()
 grab function grabs an image (destination image is adapted on demand)

Static Public Member Functions

static ICLIO_API Pylon::CDeviceInfo getDeviceFromArgs (std::string args) throw (utils::ICLException)
 Uses args to choose a pylon device.

Private Member Functions

void acquisitionStart ()
 starts the acquisition of pictures by the camera
void acquisitionStop ()
 stops the acquisition of pictures by the camera
void grabbingStart ()
 creates buffers and registers them at the grabber
void grabbingStop ()
 deregisters buffers from grabber and deletes them
void cameraDefaultSettings ()
 helper function that makes default settings for the camera.
void convert (const void *pImageBuffer)
 Converts pImageBuffer to correct type and writes it into m_Image.

Static Private Member Functions

static void printHelp ()
 Prints information about the startup argument options.

Private Attributes

utils::Mutex m_ImgMutex
 A mutex lock to synchronize buffer and color converter access.
PylonAutoEnv m_PylonEnv
 The PylonEnvironment automation.
Pylon::IPylonDevice * m_Camera
 The camera interface.
Pylon::IStreamGrabber * m_Grabber
 The streamGrabber of the camera.
PylonCameraOptionsm_CameraOptions
 PylonCameraOptions used to get and set camera settings.
PylonColorConverterm_ColorConverter
 PylonColorConverter used for color conversion.
PylonGrabberThreadm_GrabberThread
 PylonGrabberThread used for continous image acquisition.
std::vector
< PylonGrabberBuffer< uint16_t > * > 
m_BufferList
 A list of used buffers.
core::ImgBasem_LastBuffer
 A pointer to the last used buffer.

Static Private Attributes

static const int m_NumBuffers = 3
 Count of buffers for grabbing.

Detailed Description

Grabber implementation for a Basler Pylon-based GIG-E Grabber.

This is just a wrapper class of the underlying PylonGrabberImpl class

Some useful hints to increase GigE camera output:

  1. Jumbo Frames: If your Network Adapter supports Jumbo Frames they should be enabled by setting the Maximum Transfer Unit (MTU) size to 8192. Accordingly the cameras property "GevSCPSPacketSize" is set to 8192 per default. Setting this property to a value higher then the Network Adapters MTU may create transfer errors.
  2. Real-time thread priorities: To minimize network packet losses it helps to grant pylon the permission to change a threads priority to real time. This can be achieved by adding the line:
          -      rtprio      99
    
    to
                /etc/security/limits.conf
    
    This can make the difference between a network throughput of 32 and 100Mb/s.
  3. Transmission errors: If you often get the error code 'GX status 0xe1000014' and already followed the previous hints increasing the 'GevSCPD' (Inter packet delay) parameter can help to minimize these transmission errors.
  4. Camera IP Configuration: can be made with the IpConfigurator which is included in the Pylon driver package. When the tool does not find the camera, ICL will neither. This most commonly means that the camera is in an other ip-address block then the computer. Because a connection to the camera is needed in order to change the cameras ip settings, it is possible to either chnage the ip address of the computer to the same ip-address block or to use the Windows version of the IpConfigurator - which does not seem to have souch problems - to change the cameras ip settings once.
  5. Network Adapter: Basler is recommending Network Adapters of the Intel PRO 1000 series. They observed a significantly higher CPU load when working with other.

Constructor & Destructor Documentation

ICLIO_API icl::io::pylon::PylonGrabber::PylonGrabber ( const Pylon::CDeviceInfo &  dev,
const std::string  args 
)

The constructor.

Parameters:
devThe PylonDevice that should be used for image acquisition.
argsThe arguments provided to this grabber.

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.

starts the acquisition of pictures by the camera

Implements icl::io::pylon::Interruptable.

void icl::io::pylon::PylonGrabber::acquisitionStop ( ) [private, virtual]

stops the acquisition of pictures by the camera

Implements icl::io::pylon::Interruptable.

helper function that makes default settings for the camera.

void icl::io::pylon::PylonGrabber::convert ( const void *  pImageBuffer) [private]

Converts pImageBuffer to correct type and writes it into m_Image.

static ICLIO_API Pylon::CDeviceInfo icl::io::pylon::PylonGrabber::getDeviceFromArgs ( std::string  args) throw (utils::ICLException) [static]

Uses args to choose a pylon device.

Parameters:
argsThe arguments provided to this grabber.
Exceptions:
ICLExceptionwhen no suitable device exists.
void icl::io::pylon::PylonGrabber::grabbingStart ( ) [private, virtual]

creates buffers and registers them at the grabber

Implements icl::io::pylon::Interruptable.

void icl::io::pylon::PylonGrabber::grabbingStop ( ) [private, virtual]

deregisters buffers from grabber and deletes them

Implements icl::io::pylon::Interruptable.

static void icl::io::pylon::PylonGrabber::printHelp ( ) [static, private]

Prints information about the startup argument options.


Member Data Documentation

A list of used buffers.

Pylon::IPylonDevice* icl::io::pylon::PylonGrabber::m_Camera [private]

The camera interface.

PylonCameraOptions used to get and set camera settings.

PylonColorConverter used for color conversion.

Pylon::IStreamGrabber* icl::io::pylon::PylonGrabber::m_Grabber [private]

The streamGrabber of the camera.

PylonGrabberThread used for continous image acquisition.

A mutex lock to synchronize buffer and color converter access.

A pointer to the last used buffer.

const int icl::io::pylon::PylonGrabber::m_NumBuffers = 3 [static, private]

Count of buffers for grabbing.

The PylonEnvironment automation.


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