Is_Setallocatedimagemem - THORLABS DCU223x Operation Manual And Sdk

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

Advertisement

4.3.73 is_SetAllocatedImageMem

USB 2.0
USB 3.0
Syntax
INT is_SetAllocatedImageMem (HIDS hCam, INT width, INT height, INT bitspixel,
Description
Using is_SetAllocatedImageMem(), you can make a memory allocated by a user the active memory for
storing digitized images in it. The allocated memory must be large enough and must always be locked globally.
Depending on the selected image format you need more than one byte per pixel for image memory:
unsigned int
uBytesPerPixel = bitspixel/8;
if
(uImageSize % bitspixel != 0)
{
uBytesPerPixel++;
}
unsigned int
uImageSize = width * height * uBytesPerPixel;
You
can
call
the
is_SetAllocatedImageMem() to a sequence.
The address of this memory will be passed to the uc480 driver. For this, you can use the
is_SetAllocatedImageMem() function. In addition, you need to specify the image size, just as you do when
calling
is_AllocImageMem()
The memory area must be removed from the driver management again using the
function. Please note that this does not release the memory. You then need to make sure that the memory will be
released again.
After
is_SetAllocatedImageMem
can be carried out in the image memory.
Input parameters
hCam
width
height
bitspixel
pcImgMem
pid
Return values
IS_CANT_ADD_TO_SEQUENCE
IS_INVALID_CAMERA_HANDLE
IS_INVALID_MEMORY_POINTER
IS_INVALID_PARAMETER
IS_NO_SUCCESS
IS_OUT_OF_MEMORY
IS_SEQUENCE_BUF_ALREADY_LOCKED
IS_SUCCESS
© 2013 Thorlabs GmbH
USB 2.0
USB 3.0
char* pcImgMem, int* pid)
is_AddToSequence()
. The returned memory ID is required by other functions for memory access.
157
you must call
is_SetImageMem
The image memory is already included in the sequence and cannot
be added again.
Invalid camera handle
Invalid pointer or invalid memory ID
One of the submitted parameters is outside the valid range or is not
supported for this sensor or is not available in this mode.
General error message
No memory could be allocated.
The memory could not be locked. The pointer to the buffer is invalid.
Function executed successfully
function
to
add
156
or
is_AddToSequence
Camera handle
Image width
Image height
Image color depth (bits per pixel)
Pointer to the starting address of the allocated memory
Returns the ID of this memory.
4 Programming (SDK)
a
memory
which
was
is_FreeImageMem()
in order that the image caption
set
using
222
301

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dcu224xDcc1240xDcc1545mDcc1645c

Table of Contents