| Customize Help

Configuring your GigE Vision camera and Gigabit Ethernet network adapter



There are several features that can improve the performance of your Matrox GigE Vision driver and associated GigE Vision-compliant camera.

Note that, some GigE Vision-compliant cameras include libraries that, when installed, might install network filter drivers or override your network adapter's native driver. While these third-party libraries have their own benefits, we cannot guarantee their compatibility with MIL. For best results, the computer being used to communicate with your GigE Vision-compliant camera should always use MIL for image capture, as well as your network adapter's native driver (for example, an Intel driver for an Intel network adapter).

Automatic format switching

By default, the Matrox GigE Vision driver will tell the camera to transmit images in the same format as the grab buffer; this is called automatic format switching. If the grab buffer is allocated in a format that is not compliant with the camera's current pixel format, the Matrox GigE Vision driver changes the camera's pixel format to a format more compliant with the grab buffer before performing the copy operation. Automatic format switching prevents color space conversion, which can cause additional processing and delays in delivering the image from the camera to your computer. Unfortunately, there are cases where automatic format switching cannot occur (such as when the operation requires grabbing into internal buffers, as is the case when performing Bayer conversion in the camera or when the camera is in chunk mode).

When automatic format switching cannot be performed, the image is copied (in the camera's current pixel format) into a compatible automatically-allocated internal buffer. The Host will then copy the internal buffer to the specified grab buffer to force the conversion to the format of the specified grab buffer.

Ideally, you should try to avoid automatic format switching, by inquiring the camera's current pixel format using MdigInquire() with M_SOURCE_DATA_FORMAT before allocating your grab buffers (that is, using MbufAlloc...() with M_IMAGE and the returned value from MdigInquire() with M_SOURCE_DATA_FORMAT. Note that, the camera's current format typically varies from camera to camera.

Gigabit Ethernet network adapter settings

Adjust the following network adapter settings for more reliable acquisition performance:

  • Receive buffers. Gigabit Ethernet network adapters use receive buffers, also known as receive descriptors, to store received packets. If the number of packets sent by your camera exceeds the number of available receive buffers, the additional packets will be dropped. The number of receive buffers assigned to your network adapter therefore impacts the reliability of your camera's image transmission. Typical bandwidth usage of GigE Vision cameras requires that a large number of receive buffers be assigned to your network adapter. Matrox recommends adjusting this setting to its maximum value (typically 2048 for Intel Gigabit Ethernet network adapters).

  • Packet size. Traffic across the network travels in packets. The maximum packet size is preset (typically at 1.5 Kbytes). When packets larger than 1.5 Kbytes make up the majority of the network traffic, as is the case with typical GigE Vision image streams, increasing the packet size can reduce CPU utilization and improve efficiency. In these cases, enabling jumbo packets (typically 9014 bytes) is recommended.

    Note that, if you want to use jumbo packets and you use an Ethernet switch in your network, you should also enable jumbo packets on your switch, since jumbo packet support is typically disabled by default.

  • Ethernet flow control. Ethernet flow control can pause and restart the flow of packets from your camera. This reduces the chance of on-board memory becoming too full to properly deal with the flow of packets, and reduces the chance of data loss (dropped packets). A number of network adapters support Ethernet flow control. Enabling your network adapter's Ethernet flow control settings is recommended.

  • Interrupt moderation. Interrupt moderation controls the rate at which interrupts are received and processed. Typically, setting the interrupt moderation to a low value is best when dealing with light traffic, while constant heavy traffic requires a higher interrupt moderation value. Controlling the rate at which interrupts are received and processed introduces latency in the communication between your camera and your network adapter, but can improve CPU utilization. You must determine the best tradeoff between these for your application's specific needs.

To configure your network adapter with this information under Microsoft Windows, refer to the Microsoft Windows documentation. Also refer to the Matrox Capture Assistant white paper (located in your Matrox Imaging\Tools folder).

To configure your network adapter with this information under a supported Linux distribution, refer to the Linux release notes.

Optimizing further

If your Gigabit Ethernet network adapter requires further optimization (that is, its performance is still not adequate after modifying the network adapter settings), try changing the inter-packet delay.

Situations can occur that cause delays in the reception of packets by your network adapter. Inter-packet delays help by spreading packet transmission over time, giving the receiving network adapter enough time to deal with incoming packets and reduces the chance of an overworked receiving network adapter dropping packets. You can program your network adapter's inter-packet delay from the GigE Vision Devices tab of the Matrox Capture Assistant utility; use the inter-packet delay calculator to determine the optimal inter-packet delay.