| Customize Help

Minimum latency and grabbing all frames



When grabbing with either MdigGrab() or MdigProcess(), Matrox Radient eV is optimized to have the smallest latency possible between the last pixel sent from the camera to the last pixel written into the buffer. This allows the buffer to be available for processing with a minimum amount of delay.

By default, Matrox Radient eV grabs into buffers in Host memory. On-board memory is used to protect against PCIe latency. To perform real-time grabs, your rate of acquisition (grabbing bandwidth) must be lower than the PCIe maximum transfer rate (PCIe bandwidth). If the acquisition rate is higher than the transfer rate across the PCIe bus, frames will be skipped rather than allowing a grab over-run to occur. To determine the image transfer speed from Matrox Radient eV to the Host, use the Matrox Radient eV Bench utility.

Detecting missed frames

To be certain that no frames were missed when MdigProcess() was last used, use MdigInquire() with M_PROCESS_FRAME_MISSED. This value reads the number of frames that were transmitted by the camera when no buffer was available to receive the frame; for example, if a grab is triggered and the associated hooked function is slow, then a frame can be missed.

Efficiently copying an on-board buffer to a destination buffer in Host memory

When copying an on-board buffer into a destination buffer in Host memory, the copy operation is performed by your Matrox Radient eV using the board's DMA write engine, rather than the Host. Your Matrox Radient eV will perform the operation faster than the Host. To ensure that Matrox Radient eV performs the operation, use the following:

  • To copy an on-board buffer into a destination buffer in Host memory, use MbufCopy().

  • To resize an on-board buffer while copying it to a destination buffer in Host memory, use MimResize() with a factor of 1/n, where n is a value between 1 to 16, and with an interpolation mode of M_NEAREST_NEIGHBOR. Alternatively, you can use MbufTransfer() to perform the same operation.

  • To flip an on-board buffer while copying it to a destination buffer in Host memory, use MimFlip().

Note that for your Matrox Radient eV to perform these operations, the destination buffer must be allocated in non-paged memory (that is, using MbufAlloc...() with + M_IMAGE + M_NON_PAGED).

Efficiently converting buffer formats while copying

When copying an on-board buffer into a destination buffer in Host memory, the color space converter and image formatter can automatically convert the bit-depth and color format of the source buffer to the bit-depth and color format of the destination buffer.

For on-board conversion of buffers to take place, the following on-board buffer and destination buffer depth and color formats are supported.

On-board buffer depth and color format (specified in the DCF)

Destination buffer depth and color format

8-bit monochrome

16-bit monochrome

M_PACKED + M_BGR24

M_PACKED + M_BGR32

M_YUV16_YUYV / M_YUV16

M_PLANAR + M_RGB24

M_PLANAR + M_RGB48

8-bit monochrome

Yes

No

Yes

Yes

Yes

Yes

No

16-bit monochrome

Yes

Yes

Yes

Yes

Yes

Yes

Yes

M_PACKED + M_BGR24

Yes

No

Yes

Yes

Yes

Yes

Yes

M_RGB48 + M_PACKED

Yes

Yes

No

No

No

Yes

Yes

For information about YUV or RGB/BGR buffers, refer to Chapter 21: Data buffers. For the calculations used to convert to YUV, refer to the Matrox Radient eV Hardware and Installation manual.