EasyManuals Logo

THORLABS DCU223x User Manual

THORLABS DCU223x
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

Questions and Answers:

Question and Answer IconNeed help?

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

THORLABS DCU223x Specifications

General IconGeneral
BrandTHORLABS
ModelDCU223x
CategorySecurity Camera
LanguageEnglish

Related product manuals