
Machine Vision Camera SDK (C) Developer Guide
//Set the number of image nodes
nRet = MV_CC_SetImageNodeNum(handle, nImageNodeNum);
if (MV_OK != nRet)
{
printf("Set number of image node fail! nRet [0x%x]\n", nRet);
break;
}
printf("\n**********************************************************************
****\n");
printf("* 0.MV_GrabStrategy_OneByOne;
1.MV_GrabStrategy_LatestImagesOnly; *\n");
printf("* 2.MV_GrabStrategy_LatestImages;
3.MV_GrabStrategy_UpcomingImage;
*\n");
printf("************************************************************************
**\n");
printf("Please Intput Grab Strategy:");
unsigned int nGrabStrategy = 0;
scanf("%d", &nGrabStrategy);
//U3V device does not support UpcomingImage
if (nGrabStrategy == MV_GrabStrategy_UpcomingImage && MV_USB_DEVICE ==
stDeviceList.pDeviceInfo[nIndex]->nTLayerType)
{
printf("U3V device not support UpcomingImage\n");
break;
}
switch(nGrabStrategy)
{
case MV_GrabStrategy_OneByOne:
{
printf("Grab using the MV_GrabStrategy_OneByOne default strategy
\n");
nRet = MV_CC_SetGrabStrategy(handle, MV_GrabStrategy_OneByOne);
if (MV_OK != nRet)
{
printf("Set Grab Strategy fail! nRet [0x%x]\n", nRet);
break;
}
}
break;
case MV_GrabStrategy_LatestImagesOnly:
{
printf("Grab using strategy MV_GrabStrategy_LatestImagesOnly
\n");
nRet = MV_CC_SetGrabStrategy(handle,
MV_GrabStrategy_LatestImagesOnly);
if (MV_OK != nRet)
60



































































































































































































































































































































































































