| MIL 10 Reference
| Customize Help
| Save Settings

MdigGrabContinuous



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Not supported on:
Not supported on Matrox GPU processing driver
Partially supported on:
Partially supported on Host system
Partially supported on Matrox CronosPlus
Partially supported on Matrox GigE Vision driver
Partially supported on Matrox Iris GT
Partially supported on Matrox Morphis
Partially supported on Matrox Morphis QxT
Partially supported on Matrox Orion HD
Partially supported on Matrox Radient eCL
Partially supported on Matrox Radient eV-CXP
Partially supported on Matrox Solios eA/XA
Partially supported on Matrox Solios ecl/xcl/ev-cl
Partially supported on Matrox USB3 Vision driver (requires Update 19)
Partially supported on Matrox Vio

Fully supported on:
Fully supported on Matrox IEEE 1394 IIDC driver

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Grab data continuously from a camera.
Syntax
void MdigGrabContinuous(
MIL_ID DigId, //in
MIL_ID DestImageBufId //in
)
Description

This function uses the specified digitizer to continuously acquire frames of data and store this data in the destination image buffer, until MdigHalt() is called. If the destination buffer is selected to the display, the display is continuously updated, however only the last frame grabbed is written to the specified buffer.

When acquiring data from a line-scan type of camera, the exact number of rows grabbed is determined by the DCF.

In all cases, if the grab destination buffer is smaller than the digitizer's frame size, the buffer will be filled and all other data will be lost. If the grab destination buffer is larger than the digitizer's frame size, the buffer will be filled up to the digitizer's frame size. The rest of the buffer will remain untouched.

If you need to save/process each grabbed frame, you should perform the grab using MdigGrab(); alternatively, you can use MdigProcess() for its multiple buffering capabilities. Refer to MbufAlloc...() for potential restrictions relating to your destination buffer.

[Matrox GigE Vision driver; Matrox GigE Vision driver (requires Update 25); Matrox Radient eV-CLHS (requires Update 21); Matrox Radient eV-CXP; Matrox USB3 Vision driver (requires Update 19)]

This function transparently sets up the camera to start the acquisition of images, in either streaming or triggered mode, depending on your settings. If the camera is in triggered mode, it will start waiting for a trigger. To control this behavior, use MdigControl() with M_GC_STREAMING_MODE.

[Host system]

When grabbing from a video or directory of images, once the last image is grabbed, grabbing will restart from the beginning of the video or from the first image in the directory.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
DigId

Specifies the identifier of the digitizer.

DestImageBufId

Specifies the identifier of the destination image buffer.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

This parameter should be set to one of the following values:

function map For the identifier of the destination buffer image
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse MIL color image buffer identifier

Specifies the identifier of a color destination image buffer with an M_IMAGE + M_GRAB attribute.

(summarize)
b c e f g h i j k l m n o p q r s
MIL system specific

The width and the horizontal position of the grab destination buffer and the grab region (set using MdigControl() with M_SOURCE_SIZE_X and M_SOURCE_SIZE_Y, or M_SOURCE_OFFSET_X and M_SOURCE_OFFSET_Y) must be a multiple of 4 bytes. If not, the grab will be clipped accordingly.

j k l m p q r

The destination buffer's depth can only be 8 bits per band.

b f g h i n

The destination buffer's depth can be 8 or 16 bits per band.

c o s

The width of the destination buffer must be at least 17 bytes. If not, an error will occur.

l m

When dealing with color smart-cameras, the color destination image buffer can only be a BGR packed buffer with a 32-bit color depth (allocated using MbufAllocColor() with M_IMAGE + M_GRAB + M_BGR32). When dealing with monochrome smart-cameras, you cannot grab into a MIL color image buffer.

f
Collapse MIL monochrome image buffer identifier

Specifies the identifier of a monochrome destination image buffer with an M_IMAGE + M_GRAB attribute.

It is not possible to grab into a color-band child buffer (that is, a child buffer created from one band of a color parent buffer) when the parent when the buffer is packed.

(summarize)
b c e f g h i j k l m n o p q r s
MIL system specific

The width and the horizontal position of the destination buffer and the grab region (set using MdigControl() with M_SOURCE_SIZE_X and M_SOURCE_SIZE_Y, or M_SOURCE_OFFSET_X and M_SOURCE_OFFSET_Y) must be a multiple of 4 bytes. If not, the grab will be clipped accordingly.

j k l m p q r

When using a color smart-camera, the color data is first converted into YUV, and then the Y (luminance) component is stored in the buffer. The color space conversion is done in the hardware.

b f g h i k l m n q

The destination buffer's depth can only be 8 bits per band.

g h i n

The destination buffer's depth can be 8 or 16 bits per band.

c j k l m o p q r s

The width of the destination buffer must be at least 17 bytes. If not, an error will occur.

l m

The destination buffer can only be an 8-bit monochrome buffer.

f
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
GRAB PROC GRAB PROC