EasyManuals Logo

THORLABS DCU22 Series Description And Sdk Manual

THORLABS DCU22 Series
513 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #277 background imageLoading...
Page #277 background image
© 2016 Thorlabs Scientific Imaging
4 Programming (SDK)
275
Related functions
is_AOI()
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);
}

Table of Contents

Other manuals for THORLABS DCU22 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the THORLABS DCU22 Series and is the answer not in the manual?

THORLABS DCU22 Series Specifications

General IconGeneral
BrandTHORLABS
ModelDCU22 Series
CategorySecurity Camera
LanguageEnglish

Related product manuals