Please enable JavaScript to view this site.

IDS Software Suite - obsolete functions 4.97

Windows_Logo
Linux_Logo

USB 2.0

USB 3.x

GigE

USB 2.0

USB 3.x

GigE

Syntax

INT is_InitImageQueue (HIDS hCam, INT nMode)

Description

hint_info

This function is obsolete and should not be used anymore. We recommend to use the is_ImageQueue() function instead.

is_InitImageQueue() enables the queue mode for existing image memory sequences. New images will be added to the end of the queue on arrival (FIFO principle). The image memory sequence has to be created with is_AddToSequence() prior to calling is_InitImageQueue(). With is_WaitForNextImage() you can query the pointer and sequence ID of the first (i.e. oldest) image in the sequence.

hint_info

Image memory sequences can also be used without queue mode. In this case the current image memory has to be queried with is_GetActSeqBuf() on every frame event. Disadvantage of this proceeding is that at very high frame rates it may happen that additional images arrive between the frame event and accessing/locking the memory. The images arriving in this period will be skipped when you query the current image.

When the queue mode is used (is_InitImageQueue()), however, you can be sure to always receive the oldest image which has not yet been queried. In addition, image memories are automatically locked immediately after receiving the image. This prevents images from being overwritten when very high frame rates and few image memories are used.

Input parameters

hCam

Camera handle

nMode

Queue mode. Currently only nMode = 0 is supported.

Return values

IS_INVALID_CAMERA_HANDLE

Invalid camera handle

IS_INVALID_PARAMETER

One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode.

IS_NO_SUCCESS

General error message

IS_SUCCESS

Function executed successfully

Related functions

is_ExitImageQueue()

is_WaitForNextImage()

is_AddToSequence()

Example

// A previously initialized camera continuously captures images
// until a timeout or transfer error occurs.
// Note: image memories have to be allocated before this
 
is_InitImageQueue(m_hCam, 0);
INT nMemID = 0;
char *pBuffer = NULL;
 
for(int i = 0; i < 10; i++)
{
  is_WaitForNextImage(m_hCam, 1000, &pBuffer, &nMemID);
 
  IMAGE_FILE_PARAMS imgFileParams;
  imgFileParams.pwchFileName = L"image.bmp";
  imgFileParams.nFileType = IS_IMG_BMP;
  imgFileParams.ppcImageMem = &pBuffer;
  imgFileParams.pnImageID = (UINT*)&nMemID;
 
  is_ImageFile(m_hCam, IS_IMAGE_FILE_CMD_SAVE, (void*)&imgFileParams, sizeof(imgFileParams));
 
  is_UnlockSeqBuf(m_hCam, nMemID, pBuffer);
}
is_ExitImageQueue(m_hCam);