EasyManuals Logo

THORLABS DCC1645C User Manual

THORLABS DCC1645C
420 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 #250 background imageLoading...
Page #250 background image
245SDK (Software development Kit)
© 2010 Thorlabs
Code Sample
Conversion of a raw Bayer image to RGB24. The memory is allocated automatically.
INT nRet;
char * pcSource;
INT nIDSource;
INT nX,nY,nBits,nPitch;
// Create raw Bayer test image
is_AllocImageMem (hCam, 256, 256, 8, &pcSource, &nIDSource);
is_InquireImageMem (hCam, pcSource, nIDSource, &nX ,&nY, &nBits,
&nPitch);
for (int j = 0; j<nY; j++)
{
for (int i = 0; i<nX; i++)
{
pcSource[i + j * nPitch] = i;
}
}
// Define conversion parameters (example)
INT Gamma = 120;
double rgbGains[3];
rgbGains[0] = 1.0 ; // Red channel gain
rgbGains[1] = 3.0 ; // Green channel gain
rgbGains[2] = 1.0 ; // Blue channel gain
char* pcDest; // Pointer to the newly allocated image memory
INT nIDDest; // ID of the newly allocated image memory
// Set conversion parameters
nRet = is_SetConvertParam(hCam, TRUE, IS_SET_BAYER_CV_BETTER,
IS_SET_CM_RGB24, Gamma, rgbGains);
// Convert image
if (nRet == IS_SUCCESS)
{
pcDest = NULL;
is_ConvertImage(hCam, pcSource, nIDSource, &pcDest, &nIDDest, 0);
}
// Release allocated image memory
is_FreeImageMem (hCam, pcSource, nIDSource);
is_FreeImageMem (hCam, pcDest, nIDDest);

Table of Contents

Other manuals for THORLABS DCC1645C

Questions and Answers:

Question and Answer IconNeed help?

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

THORLABS DCC1645C Specifications

General IconGeneral
BrandTHORLABS
ModelDCC1645C
CategorySecurity Camera
LanguageEnglish

Related product manuals