What is GigE Vision GigE Vision is fundamentally a standard for transmitting video from a camera (see Figure 1) or similar device over Ethernet and is primarily intended for industrial imaging applications. The GigE Vision standard was created and is maintained under the auspices of the Automated Imaging Association (AIA). The GigE Vision standard is based on existing Ethernet standards (i.e., IEEE and Internet) with some extensions. These extensions consists of a method for finding a device (e.g., camera) on a network, a method for describing a camera s feature set, a protocol for device/application control, and a protocol for streaming (i.e., transmitting) data such as pixels. Using mainstream Gigabit Ethernet (GbE) technology, GigE Vision can deliver close to 125 MB/s across 100 meters. MIL Driver for GigE Vision Matrox Imaging has expanded its support for camera interface standards with the introduction of a GigE Vision driver for the Matrox Imaging Library (MIL), a high-level programming library for image capture, processing, analysis, display and archiving. The MIL Driver for GigE Vision is implemented under Windows as a Network Driver Interface Specification (NDIS) filter module for handling the streaming protocol and another kernel module for managing the other aspects of the standard. The MIL Driver for GigE Vision is designed to work with any network interface card (NIC) and coexists with the standard Windows network stack, which for example, allows an application to simultaneously perform GigE Vision and TCP/IP communication (see Figure 2). Running the MIL Driver for GigE Vision requires true low CPU usage with images ready for processing (see Table 1). Figure 1: Mainstream Gigabit Ethernet (GbE) networking gear - switch (left), cable (center) and network interface card (right). Insert - A typical GigE Vision camera. MIL-based application Other applications Matrox Imaging Library (MIL) Other protocol drivers (UDP, TCP/IP, etc.) Matrox Imaging GigE Vision NDIS filter module GVSP* Matrox Imaging kernel driver GVSP* Miniport driver *GigE Vision Stream Protocol (GVSP) **GigE Vision Control Protocol (GVCP) Regular network traffic GVSP* Network Figure 2: The MIL driver for GigE Vision within the standard Windows network stack. White Paper/Video capture using GigE Vision with MIL Page 1 of 6
MIL Driver for GigE Vision (cont.) Table 1 - MIL Driver for GigE Vision delivers true low CPU usage with images ready for processing. Acquisition-only 1 Processing-only (Bayer interpolation) 2 Acquisition and processing CPU usage 7.4% 19.6% 27% Benchmark performed using a 2.33 GHz dual-core Intel Xeon (single core active) and a 2K x 2K 8-bit camera generating 15 fps (i.e., 60 MB/s). The MIL Driver for GigE Vision supports the peer-to-peer or switched network topologies using single or multi-port NICs. Up to 16 GigE Vision cameras are supported, depending on available network bandwidth and system (e.g., CPU) resources. The MIL Driver for GigE Vision supports both the mandatory and recommended standard camera features and provides a back door for accessing custom camera features. The MIL Driver for GigE Vision requires the presence of a MIL development license 3, or the appropriate MIL/MIL-Lite run-time license. Optimal NIC configuration As already discussed, the MIL Driver for GigE Vision works with any NIC. However, its performance depends on the type of NIC and its configuration. The handling of the GigE Vision protocol requires interrupting the CPU in order to process incoming packets. However this interrupt load, which directly affects CPU usage, can be minimized by carefully choosing and configuring the NIC. The first step is to use a NIC (and other associated network hardware) that supports jumbo frames. Jumbo frames allow image data to be transferred in chunks larger than the standard 1500 Bytes per frame (see Figure 3). As a result, larger packets generate fewer interrupts and are more efficiently copied into image buffers during frame reconstruction (see Table 2). Figure 3 - An example of configuring a NIC for jumbo frames. The next step for minimizing the interrupt load is to configure the NIC for the highest interrupt moderation rate (also known as throttling rate). Setting a high interrupt moderation rate reduces the number of interrupts received by the CPU (see Figure 4). The NIC waits to receive a certain amount of packets (as opposed to every packet) before notifying the CPU that data is available, resulting in fewer interruptions, leaving the CPU free to perform other tasks (see Table 2). However, it does have the side-effect of increasing latency. White Paper/Video capture using GigE Vision with MIL Page 2 of 6
Optimal NIC configuration (cont.) Figure 4 - An example of increasing the NIC s interrupt moderation rate. The NIC should also be configured to use the maximum number of receive descriptors (see Figure 5). Using the maximum amount of receive descriptors reduces the possibility of data loss as the NIC buffers more data until the CPU is ready to accept it. Figure 5 - An example of configuring a NIC for the maximum number of receive descriptors. Table 2 - GigE Vision performance CPU usage Interrupt Load Without jumbo frames and interrupt moderation 21%. 42,420 per sec. Without jumbo frames but with interrupt moderation 11% 1,165 per sec. With jumbo frames but without interrupt moderation 9% 7,050 per sec. With jumbo frames and interrupt moderation 7.4% 1,165 per sec. Benchmarked using a 2.33GHz dual-core Intel Xeon (single core active) and a 2Kx2K 8-bit camera generating 15 fps (i.e., 60 MB/s). White Paper/Video capture using GigE Vision with MIL Page 3 of 6
Optimal NIC configuration (cont.) Although the PCI interface is rated at 132 MB/sec, a NIC with a PCI-X or PCIe interface is more suitable for handling GbE because of their higher bandwidths and thus higher margins over GbE. Further optimization can be achieved by using a Matrox Solios GigE instead of a generic GbE NIC (see Figure 6). The Matrox Solios GigE incorporates a GigE Vision protocol offload engine, which further minimizes CPU involvement 4. Figure 6 - Matrox Solios GigE industrial Gigabit Ethernet NIC with customizable FPGA-based processing core. Understanding Standard Features According to the GigE Vision standard, a Gigabit Ethernet camera must provide an XML file that describes and gives access to its functionality. The XML file (see Figure 7) maps the high-level features of a GigE Vision camera to its low-level internal registers and is based on the GenICam Standard Features Naming Convention. The standard features list embodies mandatory features (i.e., image width and height, pixel format, payload size, acquisition mode 5, start and stop) required by the GigE Vision standard as well as recommended features and optional features (e.g., trigger mode, exposure mode, gain control, etc.). An XML file can also include custom features (e.g., custom gain control). The mandatory features are for the setup and control of continuous video capture. More advanced functionality, such as trigger control, is invoked through recommended, optional or custom features. The MIL driver for GigE Vision works with the XML file to give access to standard (mandatory, recommended and optional) features as well as custom features. The combination of standard and custom features exposed in the XML file is intended to be flexible enough for any kind of GbE camera. Figure 7 - An excerpt of an XML file. White Paper/Video capture using GigE Vision with MIL Page 4 of 6
GigE Vision -specific MIL API features The GigE Vision functionality is mapped to the existing MIL API for video capture control or, in other words, the Mdig () digitizer control functions. However, the MIL API also includes several additions that are specific to GigE Vision. The most notable addition is a pair of functions for directly controlling and inquiring standard/custom features: MdigControlFeature() and MdigInquireFeature(). Also available is a feature browser interactive dialog that can be invoked directly from within a MIL-based application (see Figure 8). Figure 8 - The feature browser interactive dialog No more DCF files? Interfacing an analog or digital camera to Matrox Imaging hardware typically requires the use of a Digitizer Configuration Format (DCF) file, which contains information (i.e., register values) that allows a user to configure a Matrox Imaging board to acquire from a specific analog or digital camera. Matrox Imaging software (e.g., MIL) uses the DCF file to initialize the digitizer (i.e., frame grabber or vision processor board) and configures it to acquire the particular video signal from the camera. However, GigE Vision cameras do not require DCF files. The DCF file is replaced by the XML file, which is usually stored on the camera and describes the available features of a camera, and then maps the features to the hardware register required for controlling them. However, a DCF file can still be created in Matrox Intellicam to record alternate static settings for the camera and be used to compliment the XML file since it is stored on the system. The alternative settings (see Figure 9) for the camera registers are applied during digitizer allocation. If no DCF file is used, then the camera will operate in the default or current mode defined by the camera. White Paper/Video capture using GigE Vision with MIL Page 5 of 6
No more DCF files? (cont.) Figure 9 - Matrox Intellicam dialogs for creating a DCF for GigE Vision Reference GigE Vision Specification version 1.0 GenICam Standard Features Naming Convention version 1.00 Endnotes 1. Acquisition performance depends on the format of the video stream (e.g., monochrome vs. color). 2. Performed at a rate that matches the acquisition rate. 3. Refer to the "Understanding the MIL Licensing Mechanism" document for more information. 4. Use of the Matrox Solios GigE's GigE Vision offload engine requires a separate MIL driver. Refer to the Matrox Solios GigE datasheet for more information. 5. Only the continuous acquisition mode is mandatory. White Paper/Video capture using GigE Vision with MIL Page 6 of 6