/// \~chinese <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ0<CEAA><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸 \~english Open camera with 0 index and configure camera device
inttmpIndex=-1;
fprintf(stderr,"total device count: %d, the index of which you want to open is:",numDevices);
fflush(stderr);
intscanTmp=scanf_s("%u",&tmpIndex);
if(scanTmp!=1){
fprintf(stderr,"Invalid input. Expect an integer.\n");
ItkManTerminate();
pressEnterToExit();
exit(EXIT_FAILURE);
}
if(tmpIndex>=numDevices)
{
fprintf(stderr,"index: %d is more than %d.\n",tmpIndex,numDevices-1);
ItkManTerminate();
pressEnterToExit();
exit(EXIT_FAILURE);
}
ConfigureCamera(&cam,tmpIndex);
res=SetWidth(&cam,1024);
CHECK_IKAPC(res);
int64_twidth=0;
res=GetWidth(&cam,&width);
CHECK_IKAPC(res);
printf("%d camera's width is %lld.\n",tmpIndex,width);
res=SetHeight(&cam,1024);
int64_theight=0;
res=GetHeight(&cam,&height);
CHECK_IKAPC(res);
printf("%d camera's height is %lld.\n",tmpIndex,height);
res=SetExposureTime(&cam,100.0);
CHECK_IKAPC(res);
doubleexposure=0;
res=GetExposureTime(&cam,&exposure);
CHECK_IKAPC(res);
printf("%d camera's exposureTime is %f.\n",tmpIndex,exposure);
/// \~chinese <20>رղɼ<D5B2><C9BC><EFBFBD><EFBFBD>豸 \~english Close frame grabber device
if(cam.g_hBoard!=INVALID_HANDLE_VALUE){
ret=IKapClose(cam.g_hBoard);
CHECK_IKAPBOARD(ret);
}
/// \~chinese <20>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸 \~english Close camera device