Acquire images (directly or in callback function), start and stopp acquisition, etc.
Supports performing ISP algorithm processing on images inside the API via the configuration file generated by the ISP tool. Before using the ISP tool, an ISP plug-in library needs to be installed, and a folder named "ISPTool" needs to be created in the personal directory in the C disk (for example, C:\Users(user name)\ISPTool). In addition, the configuration file generated by camera connecting should be placed in a folder named with the camera model or serial No., inside the ISPTool folder. To get the configuration file, please contact technical support.
More...
Functions | |
| MV_CAMCTRL_API int __stdcall | MV_CC_RegisterImageCallBackEx (IN void *handle, IN void(__stdcall *cbOutput)(unsigned char *pData, MV_FRAME_OUT_INFO_EX *pFrameInfo, void *pUser), IN void *pUser) |
| Register an image data callback, supporting getting chunk information. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_StartGrabbing (IN void *handle) |
| Start grabbing images. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_StopGrabbing (IN void *handle) |
| End grabbing images. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_GetImageBuffer (IN void *handle, IN OUT MV_FRAME_OUT *pstFrame, IN unsigned int nMsec) |
| Get one frame of picture using internal buffer. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_FreeImageBuffer (IN void *handle, IN MV_FRAME_OUT *pstFrame) |
| Release image buffer. This API is used to release the image buffer which is no longer used, and it should be used with MV_CC_GetImageBuffer() in pairs. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_GetOneFrameTimeout (IN void *handle, IN OUT unsigned char *pData, IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX *pstFrameInfo, IN unsigned int nMsec) |
| Get one frame of picture, and the SDK waits internally until data is returned. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_ClearImageBuffer (IN void *handle) |
| Clear the streaming data buffer. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_GetValidImageNum (IN void *handle, IN OUT unsigned int *pnValidImageNum) |
| Get the number of valid images in the current image buffer. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_SetImageNodeNum (IN void *handle, IN unsigned int nNum) |
| Set the number of SDK internal image buffer nodes (no less than 1). It should be called before calling MV_CC_StartGrabbing(). More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_SetGrabStrategy (IN void *handle, IN MV_GRAB_STRATEGY enGrabStrategy) |
| Set the streaming strategy. This API is only supported by USB devices. More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_SetOutputQueueSize (IN void *handle, IN unsigned int nOutputQueueSize) |
| Set number of output image buffers, with range of 1 to ImageNodeNum (only valid when MV_GRAB_STRATEGY() is set to MV_GrabStrategy_LatestImages). More... | |
| MV_CAMCTRL_API int __stdcall | MV_CC_GetPayloadSize (IN void *handle, IN OUT uint64_t *pnPayloadSize, IN OUT unsigned int *pnAlignment) |
| Get the device payload size (including image data and Chunk data) and memory alignment method, which is used by the application layer to allocate sufficient buffer and correct memory alignment when registering external memory for SDK. More... | |
Acquire images (directly or in callback function), start and stopp acquisition, etc.
Supports performing ISP algorithm processing on images inside the API via the configuration file generated by the ISP tool. Before using the ISP tool, an ISP plug-in library needs to be installed, and a folder named "ISPTool" needs to be created in the personal directory in the C disk (for example, C:\Users(user name)\ISPTool). In addition, the configuration file generated by camera connecting should be placed in a folder named with the camera model or serial No., inside the ISPTool folder. To get the configuration file, please contact technical support.
| MV_CAMCTRL_API int __stdcall MV_CC_RegisterImageCallBackEx | ( | IN void * | handle, |
| IN | void__stdcall *cbOutput)(unsigned char *pData, MV_FRAME_OUT_INFO_EX *pFrameInfo, void *pUser, | ||
| IN void * | pUser | ||
| ) |
Register an image data callback, supporting getting chunk information.
| handle | [IN] Device handle. |
| cbOutput | [IN] Image data callback function. |
| pUser | [IN] User data. |
| MV_CAMCTRL_API int __stdcall MV_CC_StartGrabbing | ( | IN void * | handle | ) |
Start grabbing images.
| handle | [IN] Device handle. |
| MV_CAMCTRL_API int __stdcall MV_CC_StopGrabbing | ( | IN void * | handle | ) |
End grabbing images.
| handle | [IN] Device handle. |
| MV_CAMCTRL_API int __stdcall MV_CC_GetImageBuffer | ( | IN void * | handle, |
| IN OUT MV_FRAME_OUT * | pstFrame, | ||
| IN unsigned int | nMsec | ||
| ) |
Get one frame of picture using internal buffer.
| handle | [IN] Device handle. |
| pstFrame | [IN][OUT] Image data and information. |
| nMsec | [IN] Timeout duration, unit: millisecond. Input INFINITE to set unlimited timeout period, and image acquisition will not stop until receiving a frame of picture. |
| MV_CAMCTRL_API int __stdcall MV_CC_FreeImageBuffer | ( | IN void * | handle, |
| IN MV_FRAME_OUT * | pstFrame | ||
| ) |
Release image buffer. This API is used to release the image buffer which is no longer used, and it should be used with MV_CC_GetImageBuffer() in pairs.
| handle | [IN] Device handle. |
| pstFrame | [IN] Image data and information. |
| MV_CAMCTRL_API int __stdcall MV_CC_GetOneFrameTimeout | ( | IN void * | handle, |
| IN OUT unsigned char * | pData, | ||
| IN unsigned int | nDataSize, | ||
| IN OUT MV_FRAME_OUT_INFO_EX * | pstFrameInfo, | ||
| IN unsigned int | nMsec | ||
| ) |
Get one frame of picture, and the SDK waits internally until data is returned.
| handle | [IN] Device handle. |
| pData | [OUT] Buffer address used to save image data |
| nDataSize | [IN] Buffer size. |
| pstFrameInfo | [OUT] Obtained frame information. |
| nMsec | [IN] Waiting timeout, unit: millisecond. |
| MV_CAMCTRL_API int __stdcall MV_CC_ClearImageBuffer | ( | IN void * | handle | ) |
Clear the streaming data buffer.
| handle | [IN] Device handle. |
| MV_CAMCTRL_API int __stdcall MV_CC_GetValidImageNum | ( | IN void * | handle, |
| IN OUT unsigned int * | pnValidImageNum | ||
| ) |
Get the number of valid images in the current image buffer.
| handle | [IN] Device handle. |
| pnValidImageNum | [IN][OUT] The number of valid images in the current image buffer. |
| MV_CAMCTRL_API int __stdcall MV_CC_SetImageNodeNum | ( | IN void * | handle, |
| IN unsigned int | nNum | ||
| ) |
Set the number of SDK internal image buffer nodes (no less than 1). It should be called before calling MV_CC_StartGrabbing().
| handle | [IN] Device handle. |
| nNum | [IN] The number of SDK internal image buffer nodes. |
| MV_CAMCTRL_API int __stdcall MV_CC_SetGrabStrategy | ( | IN void * | handle, |
| IN MV_GRAB_STRATEGY | enGrabStrategy | ||
| ) |
Set the streaming strategy. This API is only supported by USB devices.
| handle | [IN] Device handle. |
| enGrabStrategy | [IN] Streaming strategy. |
| Macro Definition | Description |
|---|---|
| OneByOne | Get image frames one by one in the chronological order. It is the default strategy. |
| LatestImagesOnly | Only get the latest one frame from the output buffer list, and clear the rest images in the list. |
| LatestImages | Get the latest image from the output buffer list, and the quantity of frames depends on the parameter OutputQueueSize, value range: [1,ImageNodeNum]. If the OutputQueueSize values "1", the strategy is same to "LatestImagesOnly", and if the OutputQueueSize values "ImageNodeNum", the strategy is same to "OneByOne". You can set the OutputQueueSize via API MV_CC_SetOutputQueueSize(), and set the ImageNodeNum via API MV_CC_SetImageNodeNum(). |
| MV_CAMCTRL_API int __stdcall MV_CC_SetOutputQueueSize | ( | IN void * | handle, |
| IN unsigned int | nOutputQueueSize | ||
| ) |
Set number of output image buffers, with range of 1 to ImageNodeNum (only valid when MV_GRAB_STRATEGY() is set to MV_GrabStrategy_LatestImages).
| handle | [IN] Device handle. |
| nOutputQueueSize | [IN] Number of output image buffers. |
| MV_CAMCTRL_API int __stdcall MV_CC_GetPayloadSize | ( | IN void * | handle, |
| IN OUT uint64_t * | pnPayloadSize, | ||
| IN OUT unsigned int * | pnAlignment | ||
| ) |
Get the device payload size (including image data and Chunk data) and memory alignment method, which is used by the application layer to allocate sufficient buffer and correct memory alignment when registering external memory for SDK.
| handle | [IN] Device Handle. |
| pnPayloadSize | [IN][OUT] Payload size. |
| pnAlignment | [IN][OUT] Alignment bytes. |