Transitioning from IC Imaging Control 3.x .NET Component
This section contains information about the IC Imaging Control 4 .NET Class Library from the perspective of a user of the IC Imaging Control 3.x .NET Component.
Key Differences
The IC Imaging Control 4 .NET Class Library is a spiritual successor to the IC Imaging Control 3.x .NET Component, 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 .NET Class Library is compatible with both .NET Framework 4.5 and .NET 6.0 or later.
While the IC Imaging Control 3.x .NET Component supported DirectShow devices, the IC Imaging Control 4 .NET 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.
Familiar Concepts
Device and Stream Handling
Like the TIS.Imaging.ICImagingControl
class, the Grabber class represents an opened video capture device as well
as its possibly enabled data stream.
Display in a Windows Forms Control
Use the WinForms.Display control to display images in a Windows Forms application.
Access to Images Through Sink Types
Like in 3.5, images from the video capture device flow into a Sink object and can be accessed from there. Both
the SnapSink and QueueSink are available and its use should be familiar
to previous users of FrameSnapSink
and FrameQueueSink
.
Changed Concepts
Device Enumeration
Instead of providing only a flat list of device names, the IC Imaging Control 4 .NET Class Library contains a device enumerator class (DeviceEnum).
The device enumerator allows enumerating video capture devices and exposes device information through 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 a description, a display name, a unit and representation hints for user interfaces.
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 VideoWriter object to save images that were captured using a Sink.
Display
In version 3.x, the display was an implicit part of the ICImagingControl
control. In IC 4, a Display can be created and
attached to a data stream while calling Grabber.StreamSetup or one of its
overloads. A display can also be used for manual display of selected ImageBuffer objects.
Display capabilities are available through the generic EmbeddedDisplay and FloatingDisplay classes. For Windows Forms applications, the specialized WinForms.Display control is avaliable.
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.
ICImagingControl.LivePrepare
is roughly equivalent to Grabber.StreamSetup and its overloads.ICImagingControl.LiveStart
is roughly equivalent to Grabber.AcquisitionStart.ICImagingControl.LiveSuspend
is equivalent to Grabber.AcquisitionStop.ICImagingControl.LiveStop
is equivalent to Grabber.StreamStop.ICImagingControl.IsLive
is equivalent to Grabber.IsAcquisitionActive.
Renamed Data Types
FrameType
was replaced by ImageType.- The role of
IFrame
/FrameQueueBuffer
is fulfilled by ImageBuffer objects. Some aspects of the formerFrameType
, e.g. the buffer size, are now part of the image buffer itself (ImageBuffer.BufferSize) VideoCaptureDeviceItem
has been replaced by DeviceInfo.FrameQueueSink
has been replaced by QueueSink, the behavior is slightly changed.FrameSnapSink
has been replaced by SnapSink, the behavior is slightly changed.
New Property API
VCDPropertyItems
is replaced by PropertyMap, which, in addition to property enumeration, also contains methods for direct property access.VCDRangeProperty
is replaced by PropIntegerVCDAbsValProperty
is replaced by PropFloatVCDMapStringsProperty
is replaced by PropEnumerationVCDSwitchProperty
is replaced by PropBoolean