EasyManuals Logo

THORLABS DCU22 Series User Manual

THORLABS DCU22 Series
530 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 #245 background imageLoading...
Page #245 background image
© 2013 Thorlabs GmbH
4 Programming (SDK)
243
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; // Blue pixels
pcSource[i + j*nPitch + 1] = i/3; // Green pixels
pcSource[i + j*nPitch + 2] = 255; // Red pixels
}
}
// 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);

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