THORLABS DCU223x Operation Manual And Sdk page 245

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

Advertisement

Example
char
* pcSource;
INT nIDSource;
is_AllocImageMem
(hCam, 256, 256, 24, &pcSource, &nIDSource);
int
nX, nY, nBits, nPitch;
is_InquireImageMem
(hCam, pcSource, nIDSource, &nX ,&nY, &nBits, &nPitch);
//Create RGB test image
for (int
j = 0; j < nY; j++)
{
for (int
i = 0; i < nX*3; i += 3)
{
pcSource[i + j*nPitch] = 0;
pcSource[i + j*nPitch + 1] = i/3;
pcSource[i + j*nPitch + 2] = 255;
}
}
// Create memory for RGB histogram
DWORD bgrBuffer [256*3];
//Create pointer for each histogram color
DWORD * pBlueHisto
= bgrBuffer;
DWORD *pGreenHisto = bgrBuffer + 256;
DWORD * pRedHisto = bgrBuffer + 512;
//Retrieve histogram and release memory
is_GetImageHistogram
(hCam, nIDSource, IS_CM_RGB8_PACKED, bgrBuffer);
is_FreeImageMem
(hCam, pcSource, nIDSource);
© 2013 Thorlabs GmbH
// Blue pixels
// Green pixels
// Red pixels
4 Programming (SDK)
243

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents