THORLABS DCU223x Operation Manual And Sdk page 274

Cdd and cmos cameras
Hide thumbs Also See for DCU223x:
Table of Contents

Advertisement

DCx Cameras
Related functions
is_AOI()
159
is_SetBinning()
is_SetSubSampling()
Example
HIDS hCam;
char
strCamFileName[256];
int
nRet;
// Get number of available formats and size of list
UINT count;
UINT bytesNeeded = sizeof(IMAGE_FORMAT_LIST);
nRet = is_ImageFormat(hCam, IMGFRMT_CMD_GET_NUM_ENTRIES, &count, 4);
bytesNeeded += (count - 1) * sizeof(IMAGE_FORMAT_INFO);
void* ptr = malloc(bytesNeeded);
// Create and fill list
IMAGE_FORMAT_LIST* pformatList = (IMAGE_FORMAT_LIST*) ptr;
pformatList->nSizeOfListEntry = sizeof(IMAGE_FORMAT_INFO);
pformatList->nNumListElements = count;
nRet = is_ImageFormat(hCam, IMGFRMT_CMD_GET_LIST, pformatList, bytesNeeded);
// Activate trigger mode for capturing high resolution images (USB uEye XS)
nRet = is_StopLiveVideo(hCam, IS_WAIT);
nRet = is_SetExternalTrigger(hCam, IS_SET_TRIGGER_SOFTWARE);
// Prepare for creating image buffers
char* pMem = NULL;
int
memID = 0;
// Set each format and then capture an image
IMAGE_FORMAT_INFO formatInfo;
for (int
i = 0; i < count; i++)
{
formatInfo = pformatList->FormatInfo[i];
int
width = formatInfo.nWidth;
int
height = formatInfo.nHeight;
// Allocate image mem for current format, set format
nRet = is_AllocImageMem(hCam, width, height, 24, &pMem, &memID);
nRet = is_SetImageMem(hCam, pMem, memID);
nRet = is_ImageFormat(hCam, IMGFRMT_CMD_SET_FORMAT, &formatInfo.nFormatID, 4);
// Capture image
nRet = is_FreezeVideo(hCam, IS_WAIT);
}
272
310
347
© 2013 Thorlabs GmbH

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents