Is_Allocimagemem - THORLABS DCU223x Operation Manual And Sdk

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

Advertisement

4.3.2 is_AllocImageMem

USB 2.0
USB 3.0
Syntax
INT is_AllocImageMem (HIDS hCam, INT width, INT height, INT bitspixel, char** ppcImgMem, INT* pid)
Description
is_AllocImageMem() allocates an image memory for an image having its dimensions defined by width and
height and its color depth defined by bitspixel. The memory size is at least:
size = [width * int((bitspixel + 7) / 8) + adjust] * height (for details on adjust, see
below)
The line increment is calculated as:
line = width * int[(bitspixel + 7) / 8]
lineinc = line + adjust
adjust = 0, if line can be divided by 4 without remainder
adjust = 4 - rest(line / 4), if line cannot be divided by 4 without remainder
To read out the line increment, you can use the
The starting address of the memory area is returned in ppcImgMem.
pid returns an ID for the allocated memory. A newly allocated memory is not directly active, i.e. digitised images will
not be stored immediately in this new memory. It must first be made active using
The returned pointer must be write-protected and may not be altered because it will be used for all further
ImageMem functions. To release the memory, you can use
Notes
In the Direct3D or OpenGL modes, image memory allocation is not necessary.
RGB16 and RGB15 require the same amount of memory, but can be distinguished by the bitspixel
parameter. For information on the bit depths of different color formats please refer to the
memory formats
502
In case the operating system is short of physical memory, today's OS versions swap individual areas of the
RAM that have not been used for some time out to the slower hard disk. This can slow down image capture if
more image memory has been allocated than can be provided by the RAM at a time.
Input parameters
hCam
width
height
bitspixel
ppcImgMem
pid
© 2013 Thorlabs GmbH
chapter.
Camera handle
Image width
Image height
Image bit depth (bits per pixel).
Returns the pointer to the memory starting address
Returns the ID of this memory
USB 2.0
USB 3.0
is_GetImgMemPitch()
is_FreeImageMem()
4 Programming (SDK)
function.
248
is_SetImageMem()
.
222
Appendix: Color and
.
337
157

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents