Machine Vision Camera SDK (C) Developer Guide
See Also
MV_CC_GetImageBuffer
4.4.3 MV_CC_GetImageBuffer
Get one frame of picture, support getting chunk information and setting timeout.
API Definition
int MV_CC_GetImageBuffer(
void
*handle,
MV_FRAME_OUT
*pFrame,
int
nMsec
);
Parameters
handle
[IN] Device handle, which is returned by MV_CC_CreateHandle or
MV_CC_CreateHandleWithoutLog .
pFrame
[OUT] Image data and information, see the structure MV_FRAME_OUT for details.
nMsec
[IN] Timeout duration, unit: millisecond
Return Value
Return MV_OK(0) on success, and return Error Code on failure.
Remarks
Before calling this API to get image data frame, you should call MV_CC_StartGrabbing to start
image acquisition. This API can get frame data actively, the upper layer program should control
the frequency of calling this API according to the frame rate. This API supports setting timeout,
and SDK will wait to return until data appears. This function will increase the streaming stability,
which can be used in the situation with high stability requirement.
This API and MV_CC_FreeImageBuffer should be called in pairs, after processing the acquired
data, you should call MV_CC_FreeImageBuffer to release the data pointer permission of pFrame.
This API whose streaming buffer is allocated by the SDK automatically, has higher image
acquisition efficiency than MV_CC_GetOneFrameTimeout (). Interface A is more efficient than
interface B, because the buffer of interface A is automatically allocated by the SDK, and interface
B is manually allocated by the user
This API cannot be called to stream after calling MV_CC_DisplayOneFrame .
91
    "