MIL_ID DigId, | //in |
MIL_ID DestImageBufId | //in |
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.
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.
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.
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:
For the identifier of the destination
buffer image
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
MIL system-specific tooltip (†) |
|||||||||||||||||||||||||||||||||||||
MIL color image buffer identifier |
Specifies the identifier of a color destination image buffer with an M_IMAGE + M_GRAB attribute. (more details...) |
† | 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 | |||||||||||||||||||||||||||||||||||||
MIL monochrome image buffer identifier |
Specifies the identifier of a monochrome destination image buffer with an M_IMAGE + M_GRAB attribute. (more details...) |
† | 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 |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |