Transitioning from IC Imaging Control 3.x C++ Class Library
This section contains information about the IC Imaging Control 4 C++ Library from the perspective of a user of the IC Imaging Control 3.x C++ Class Library.
Differences between IC Imaging Control 3.x Class Library and IC Imaging Control 4 C++ Class Library
The IC Imaging Control 4 C++ Class Library is a spiritual successor to the IC Imaging Control 3.x Class Library, but not source code compatible. Support for many DirectShow-specific concepts, such as video formats and fixed frame rates has been dropped. Rarely used functionalities such as frame filters, debayering configuration were removed.
The IC Imaging Control 4 C++ Class Library is available for both Windows and multiple Linux platforms.
While the IC Imaging Control 3.x C++ Class Library supported DirectShow devices, the IC Imaging Control 4 C++ Class Library uses the machine vision standard GenICam GenTL as its driver interface. This allows the use of advanced camera features such as asynchronous device events or chunk data.
Transition Hints
Familiar Concepts
Grabber
Like Grabber
class in version 3.x, the ic4::Grabber class represents an opened video capture device as well as its possibly enabled data stream.
Changed Concepts
Device Enumeration
Instead of providing only a flat list of device names, IC Imaging Control 4 C++ Class Library contains a device enumerator class (ic4::DeviceEnum).
The device enumerator allows enumerating video capture devices and exposes device information through ic4::DeviceInfo. It also provides information about the system topology, like information about the network adapters or USB controllers GigEVision or USB3 Vision devices are attached to.
Device Properties
The VCDProperty interface with replaced with a new object-oriented API (See Accessing Device Properties) Since device drivers describe their property interfaces via GenICam, the new property API can provide a rich set of information about properties, such as descriptions, display names or unit.
Additionally, properties provide a callback mechanism to notify the program when an aspect of the property such as value or availability changes.
Video Formats, Video Norms, Frame Rates
There no longer are API functions for video format or frame rate enumeration. Instead, the image size and frame rate are configured using the Width
, Height
and AcquisitionFrameRate
device properties.
Video Files
Video encoding functionality was detached from the grabber. Instead, create a ic4::VideoWriter object to save images that were captured using a ic4::Sink.
Display
In version 3.x, the display was an implicit part of the Grabber
. In IC 4.0, a ic4::Display has to be created and attached to a data stream while calling ic4::Grabber::streamSetup(). A display can also be used for manual display of selected ic4::ImageBuffer objects.
Renamed Concepts
Live Mode
Grabber functions that 3.x were related live mode were renamed to match the GenICam GenTL nomenclature consisting of a two-stage initialization: First, a data stream is established, and then image acquisition is started.
Grabber::prepareLive
is roughly equivalent to ic4::Grabber::streamSetup().Grabber::startLive
is roughly equivalent to ic4::Grabber::acquisitionStart().Grabber::suspendLive
is equivalent to ic4::Grabber::acquisitionStop().Grabber::stopLive
is equivalent to ic4::Grabber::streamStop().Grabber::isLive
is equivalent to ic4::Grabber::isAcquisitionActive().
Data Types
FrameTypeInfo
was replaced by ic4::ImageType.- The role of
IFrame/FrameQueueBuffer
is fulfilled by ic4::ImageBuffer objects. Some aspects of the formerFrameTypeInfo
, e.g. the buffer size, are now part of the image buffer itself (ic4::ImageBuffer::bufferSize()) VideoCaptureDeviceItem
has been replaced by ic4::DeviceInfo.FrameQueueSink
has been replaced by ic4::QueueSink, the behavior is slightly changed.FrameSnapSink
has been replaced by ic4::SnapSink, the behavior is slightly changed.
Property API
IVCDPropertyItems
is replaced by ic4::PropertyMapIVCDRangeProperty
is replaced by ic4::PropIntegerIVCDAbsValProperty
is replaced by ic4::PropFloatIVCDMapStringsProperty
is replaced by ic4::PropEnumerationIVCDSwitchProperty
is replaced by ic4::PropBoolean