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 #426 background imageLoading...
Page #426 background image
© 2013 Thorlabs GmbH424
DCx Cameras
Example
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_CM_RGB8_PACKED, 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

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